Contacts
Creates a new contact in the project the API key is scoped to. Supply at least one identifying field (such as phone_number or email) along with an optional name, structured additional_attributes, and free-form custom_attributes. On success the API returns the fully created contact wrapped in payload.contact, including the server-assigned numeric id you should store as the contact_id for subsequent calls.
curl --request POST \
--url 'https://api.nabrah.ai/api/ext/omni_v2/contact' \
--header 'X-API-Key: <your-api-key>' \
--header 'Content-Type: application/json' \
--data '{
"phone_number": "+15551234567",
"name": "Sarah Johnson",
"email": "sarah.johnson@example.com",
"additional_attributes": {
"city": "Riyadh",
"country": "Saudi Arabia",
"description": "Returning enterprise customer",
"company_name": "Acme Corp",
"country_code": "SA",
"social_profiles": {
"twitter": "sarahjohnson",
"linkedin": "in/sarahjohnson"
}
},
"custom_attributes": {
"account_tier": "gold",
"lifetime_value": 4200
}
}'{
"payload": {
"contact": {
"id": 0,
"additional_attributes": {
"city": null,
"country": null,
"description": null,
"company_name": null,
"country_code": null,
"social_profiles": null
},
"availability_status": "string",
"email": "string",
"name": "string",
"phone_number": "string",
"blocked": false,
"identifier": "string",
"thumbnail": "string",
"custom_attributes": {},
"last_activity_at": 0,
"created_at": 0
}
}
}Send your Web API key in the X-API-Key header (prefix nb_, from the dashboard Developers tab). The key is scoped to one project, so the contact is created in that project automatically — no project_id is required.
Base your request on the default JSON body below.
phone_number, name, and email describe the person. Provide a phone number and/or email so the contact can be matched and reached across channels.
phone_numbernameemailadditional_attributesOptional structured profile object with city, country, description, company_name, country_code, and social_profiles.
citycountrydescriptioncompany_namecountry_codesocial_profilescustom_attributesOptional free-form key/value object for workspace-defined custom fields.
Read the created contact's id from payload.contact.id and reuse it as contact_id elsewhere.
X-API-KeystringheaderrequiredYour workspace API key. Create one in the dashboard under API keys.
Create a contact with core fields plus structured and custom attributes.
{
"phone_number": "+15551234567",
"name": "Sarah Johnson",
"email": "sarah.johnson@example.com",
"additional_attributes": {
"city": "Riyadh",
"country": "Saudi Arabia",
"description": "Returning enterprise customer",
"company_name": "Acme Corp",
"country_code": "SA",
"social_profiles": {
"twitter": "sarahjohnson",
"linkedin": "in/sarahjohnson"
}
},
"custom_attributes": {
"account_tier": "gold",
"lifetime_value": 4200
}
}Successful Response
application/json
Validation Error
application/json