curl --request POST \
--url https://api.test.doola.com/v1/partner/customers \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"email": "founder@example.com",
"firstName": "Ada",
"lastName": "Lovelace",
"countryOfResidence": "USA",
"phoneNumber": "+12125550100"
}
'import requests
url = "https://api.test.doola.com/v1/partner/customers"
payload = {
"email": "founder@example.com",
"firstName": "Ada",
"lastName": "Lovelace",
"countryOfResidence": "USA",
"phoneNumber": "+12125550100"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
email: 'founder@example.com',
firstName: 'Ada',
lastName: 'Lovelace',
countryOfResidence: 'USA',
phoneNumber: '+12125550100'
})
};
fetch('https://api.test.doola.com/v1/partner/customers', 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://api.test.doola.com/v1/partner/customers",
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([
'email' => 'founder@example.com',
'firstName' => 'Ada',
'lastName' => 'Lovelace',
'countryOfResidence' => 'USA',
'phoneNumber' => '+12125550100'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://api.test.doola.com/v1/partner/customers"
payload := strings.NewReader("{\n \"email\": \"founder@example.com\",\n \"firstName\": \"Ada\",\n \"lastName\": \"Lovelace\",\n \"countryOfResidence\": \"USA\",\n \"phoneNumber\": \"+12125550100\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "<api-key>")
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://api.test.doola.com/v1/partner/customers")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"founder@example.com\",\n \"firstName\": \"Ada\",\n \"lastName\": \"Lovelace\",\n \"countryOfResidence\": \"USA\",\n \"phoneNumber\": \"+12125550100\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.test.doola.com/v1/partner/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"founder@example.com\",\n \"firstName\": \"Ada\",\n \"lastName\": \"Lovelace\",\n \"countryOfResidence\": \"USA\",\n \"phoneNumber\": \"+12125550100\"\n}"
response = http.request(request)
puts response.read_body{
"doolaCustomerId": "<string>",
"email": "founder@example.com",
"firstName": "Ada",
"lastName": "Lovelace",
"countryOfResidence": "USA",
"phoneNumber": "+12125550100",
"source": "MCP",
"created": true,
"companies": [
{
"doolaCompanyId": "<string>",
"name": "Acme Labs LLC",
"entityType": "LLC",
"state": "DE"
}
]
}Create a customer
Creates a customer under the authenticated partner tenant. Returns 201 Created for a new customer, or 200 OK when a customer with the same email already exists under your own tenant and is returned instead of duplicated (created: false). An email belonging to any other principal — another tenant’s customer, a legacy customer with no tenant, or a non-customer such as a dashboard user — is rejected with 409 E_EMAIL_IN_USE and nothing about that record is returned. Idempotent on the Idempotency-Key header: replaying the same key returns the original result — the same response and status as the first call — never a duplicate. If a create fails before it commits, the key is released; fix the request and retry with the same key.
curl --request POST \
--url https://api.test.doola.com/v1/partner/customers \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"email": "founder@example.com",
"firstName": "Ada",
"lastName": "Lovelace",
"countryOfResidence": "USA",
"phoneNumber": "+12125550100"
}
'import requests
url = "https://api.test.doola.com/v1/partner/customers"
payload = {
"email": "founder@example.com",
"firstName": "Ada",
"lastName": "Lovelace",
"countryOfResidence": "USA",
"phoneNumber": "+12125550100"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
email: 'founder@example.com',
firstName: 'Ada',
lastName: 'Lovelace',
countryOfResidence: 'USA',
phoneNumber: '+12125550100'
})
};
fetch('https://api.test.doola.com/v1/partner/customers', 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://api.test.doola.com/v1/partner/customers",
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([
'email' => 'founder@example.com',
'firstName' => 'Ada',
'lastName' => 'Lovelace',
'countryOfResidence' => 'USA',
'phoneNumber' => '+12125550100'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://api.test.doola.com/v1/partner/customers"
payload := strings.NewReader("{\n \"email\": \"founder@example.com\",\n \"firstName\": \"Ada\",\n \"lastName\": \"Lovelace\",\n \"countryOfResidence\": \"USA\",\n \"phoneNumber\": \"+12125550100\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "<api-key>")
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://api.test.doola.com/v1/partner/customers")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"founder@example.com\",\n \"firstName\": \"Ada\",\n \"lastName\": \"Lovelace\",\n \"countryOfResidence\": \"USA\",\n \"phoneNumber\": \"+12125550100\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.test.doola.com/v1/partner/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"founder@example.com\",\n \"firstName\": \"Ada\",\n \"lastName\": \"Lovelace\",\n \"countryOfResidence\": \"USA\",\n \"phoneNumber\": \"+12125550100\"\n}"
response = http.request(request)
puts response.read_body{
"doolaCustomerId": "<string>",
"email": "founder@example.com",
"firstName": "Ada",
"lastName": "Lovelace",
"countryOfResidence": "USA",
"phoneNumber": "+12125550100",
"source": "MCP",
"created": true,
"companies": [
{
"doolaCompanyId": "<string>",
"name": "Acme Labs LLC",
"entityType": "LLC",
"state": "DE"
}
]
}Authorizations
Partner API key. Send the raw key as the Authorization header value — e.g. dk_test_… in sandbox or dk_live_… in production. Generate and rotate keys in the doola Partner Portal.
Headers
Unique key that makes the create safe to retry. Reuse the same value to retry; if the create fails before committing, the key is released, so retry with the same value.
Body
Request body to create a customer under your partner tenant.
Customer email address.
1"founder@example.com"
Customer legal first name.
1"Ada"
Customer legal last name.
1"Lovelace"
ISO 3166-1 alpha-3 country of residence (e.g. USA).
1"USA"
Customer phone number in E.164 format. Optional.
"+12125550100"
Response
OK
A partner customer.
doola customer ID (KSUID).
Customer email address.
"founder@example.com"
"Ada"
"Lovelace"
ISO 3166-1 alpha-3 country of residence (e.g. USA).
"USA"
"+12125550100"
How the customer was created.
MCP, PARTNER_API, WHOP_APP, DOOLA_DASHBOARDS True if this request created the customer; false if it already existed.
Companies owned by this customer. Returned only on the get endpoint.
Show child attributes
Show child attributes