curl --request POST \
--url https://app.base44.com/api/billing/business-email/purchase-url \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"domain": "acme.com"
}
'import requests
url = "https://app.base44.com/api/billing/business-email/purchase-url"
payload = { "domain": "acme.com" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({domain: 'acme.com'})
};
fetch('https://app.base44.com/api/billing/business-email/purchase-url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.base44.com/api/billing/business-email/purchase-url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'domain' => 'acme.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/billing/business-email/purchase-url"
payload := strings.NewReader("{\n \"domain\": \"acme.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.base44.com/api/billing/business-email/purchase-url")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"domain\": \"acme.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/billing/business-email/purchase-url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"domain\": \"acme.com\"\n}"
response = http.request(request)
puts response.read_body{
"url": "https://billing.example.com/session/7c1e9f2a4b8d4e6f9a3c5b7d1e2f4a6c"
}{
"detail": [
{
"type": "missing",
"loc": [
"body",
"domain"
],
"msg": "Field required",
"input": {}
}
]
}Get business email purchase link
Creates a one-time link to the checkout page for business email on one of your workspace’s custom domains.
Pass a domain that’s connected to an app in this workspace and verified. Find your domains with List custom domains. The check uses the domain’s last recorded status, so a domain you just connected may need to finish verifying first. The person who opens the link picks a plan and pays, and nothing is bought until they finish checkout. The new business email then appears in Get business email status as PENDING_SETUP.
Only the workspace owner can create the link. A workspace whose plan is paid through the App Store can’t buy business email. A read-only token is refused, and workspace API keys aren’t accepted.
Each call returns a new link and buys nothing, so retrying is safe. Limited to 6 requests a minute per caller. Some workspaces have a different limit.
curl --request POST \
--url https://app.base44.com/api/billing/business-email/purchase-url \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"domain": "acme.com"
}
'import requests
url = "https://app.base44.com/api/billing/business-email/purchase-url"
payload = { "domain": "acme.com" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({domain: 'acme.com'})
};
fetch('https://app.base44.com/api/billing/business-email/purchase-url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.base44.com/api/billing/business-email/purchase-url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'domain' => 'acme.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/billing/business-email/purchase-url"
payload := strings.NewReader("{\n \"domain\": \"acme.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.base44.com/api/billing/business-email/purchase-url")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"domain\": \"acme.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/billing/business-email/purchase-url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"domain\": \"acme.com\"\n}"
response = http.request(request)
puts response.read_body{
"url": "https://billing.example.com/session/7c1e9f2a4b8d4e6f9a3c5b7d1e2f4a6c"
}{
"detail": [
{
"type": "missing",
"loc": [
"body",
"domain"
],
"msg": "Field required",
"input": {}
}
]
}Authorizations
Personal access token, sent as Authorization: Bearer <token>. Each operation lists the permission it needs: read_only or full_access. A full-access token can call every operation. A read-only token can call only the operations that list read_only; anything else returns 403 read_only_credential_route_not_allowed.
Body
Custom domain the business email is for, without www..
"acme.com"
Response
A one-time checkout link.
Link to open in the browser of the person who acts on it. Treat it as opaque. It works once, so create a new one each time.
"https://billing.example.com/session/7c1e9f2a4b8d4e6f9a3c5b7d1e2f4a6c"
Was this page helpful?