curl --request POST \
--url https://omni-api.sendblue.com/accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '{}'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({})
};
fetch('https://omni-api.sendblue.com/accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omni-api.sendblue.com/accounts"
payload = {}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"status": "active",
"type": "root",
"created_at": "2023-11-07T05:31:56Z"
}{
"id": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx01",
"name": "Acme",
"status": "active",
"type": "root",
"created_at": "2026-11-23T18:04:05.123456Z"
}{
"error": {
"code": "invalid_request",
"message": "Unknown field",
"details": {
"field": "colour"
}
}
}Create the account of the signed-in person's company.
Creates the root account of the company the signed-in person belongs
to. The company comes from the session and nothing in the request
chooses it; the caller must be an admin of the company. A company
has one root account. Repeating the request returns the existing
account with 200, even with a different valid Idempotency-Key.
A missing or invalid key returns 400 invalid_request. When first-root
enrollment is restricted, an administrator whose company is outside
the list receives 403 forbidden with details.reason equal to
company_not_enabled. The restriction applies to first creation only.
No account token is returned or shown. People use their session;
programs use an API key from POST /admin/keys, or the company’s
existing Sendblue API key.
A key or an account token is answered 403 permission_denied: an account is
created by a person. Signing up a company that has no Sendblue
account at all is not part of this API.
Required permission: accounts:create. Accepted credentials: a signed-in administrator.
curl --request POST \
--url https://omni-api.sendblue.com/accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '{}'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({})
};
fetch('https://omni-api.sendblue.com/accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omni-api.sendblue.com/accounts"
payload = {}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"status": "active",
"type": "root",
"created_at": "2023-11-07T05:31:56Z"
}{
"id": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx01",
"name": "Acme",
"status": "active",
"type": "root",
"created_at": "2026-11-23T18:04:05.123456Z"
}{
"error": {
"code": "invalid_request",
"message": "Unknown field",
"details": {
"field": "colour"
}
}
}Authorizations
Headers
Body
No members. The company comes from the session.