curl --request POST \
--url https://omni-api.sendblue.com/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"phone_number": "+14155550100"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({phone_number: '+14155550100'})
};
fetch('https://omni-api.sendblue.com/contacts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omni-api.sendblue.com/contacts"
payload = { "phone_number": "+14155550100" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "d53a8c5d-8d72-4ca6-938d-769234edd88c",
"phone_number": "+14155550100",
"first_name": "Ada",
"last_name": null,
"email": null,
"tags": [],
"opted_out": false,
"created_at": "2026-01-10T00:00:00Z",
"updated_at": "2026-01-10T00:00:00Z"
}{
"id": "d53a8c5d-8d72-4ca6-938d-769234edd88c",
"phone_number": "+14155550100",
"first_name": "Ada",
"last_name": null,
"email": null,
"tags": [],
"opted_out": false,
"created_at": "2026-01-10T00:00:00Z",
"updated_at": "2026-01-10T00:00:00Z"
}{
"error": {
"code": "invalid_request",
"message": "Unknown field",
"details": {
"field": "colour"
}
}
}Create or resolve a US contact.
Available to companies whose contact directory supports direct writes. An identical key and body replay the original response, including after the contact is edited or deleted. A known contact keeps its existing fields. A new contact queues a capability check. Read the assigned canonical ID at GET /contacts/. Other directories return 409 with reason legacy_sync_generation_unverified before a write. An ambiguous existing phone identity returns 409. For a new contact, record consent where the company records it today. An explicit opted_out on create returns 409 with reason contact_consent_owner_unavailable. New numeric variable values support ordinary decimal conversion with at most 15 significant digits. Date variables accept calendar-valid ISO dates or timestamps with an explicit timezone, and supported integer epochs. Locale date strings, radix-prefixed numbers and unsupported precision return 400 invalid_request, field variables, reason contact_variable_value_unverified, before commit. These rules are deliberately strict. On write_outcome_unknown replay the same key and body.
Required permission: contacts:write. Accepted credentials: a signed-in person, an API key, the account token.
curl --request POST \
--url https://omni-api.sendblue.com/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"phone_number": "+14155550100"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({phone_number: '+14155550100'})
};
fetch('https://omni-api.sendblue.com/contacts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omni-api.sendblue.com/contacts"
payload = { "phone_number": "+14155550100" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "d53a8c5d-8d72-4ca6-938d-769234edd88c",
"phone_number": "+14155550100",
"first_name": "Ada",
"last_name": null,
"email": null,
"tags": [],
"opted_out": false,
"created_at": "2026-01-10T00:00:00Z",
"updated_at": "2026-01-10T00:00:00Z"
}{
"id": "d53a8c5d-8d72-4ca6-938d-769234edd88c",
"phone_number": "+14155550100",
"first_name": "Ada",
"last_name": null,
"email": null,
"tags": [],
"opted_out": false,
"created_at": "2026-01-10T00:00:00Z",
"updated_at": "2026-01-10T00:00:00Z"
}{
"error": {
"code": "invalid_request",
"message": "Unknown field",
"details": {
"field": "colour"
}
}
}Authorizations
Headers
Body
Response
The existing contact. Its profile and labels are unchanged.