Skip to Content
ContactsCreate and Update Contacts

Create and Update Contacts

Create a contact

POST /v1/organization/contacts

Request body

FieldTypeRequiredDescription
numberstringContact phone number
first_namestringFirst name
middle_namestringMiddle name
last_namestringLast name
full_namestringFull name
emailstringEmail
tagsstring[]Contact tags
segment_idstringSegment ID
attributesobjectCustom attributes key/value map
curl -X POST https://api.bahasha.app/v1/organization/contacts \ -H "Authorization: Bearer bh_live_xxxxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{ "full_name": "Jane Doe", "number": "+254700000000", "email": "[email protected]", "tags": ["vip", "newsletter"], "segment_id": "67f12bb3882d745f33f3d300", "attributes": { "city": "Nairobi", "customer_tier": "Gold" } }'

Update a contact

PATCH /v1/organization/contacts/:id

Send only the fields you want to update.

curl -X PATCH https://api.bahasha.app/v1/organization/contacts/68011f5f8f7f109de8f62f5e \ -H "Authorization: Bearer bh_live_xxxxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{ "tags": ["vip", "new_segment"], "attributes": { "city": "Mombasa", "customer_tier": "Platinum" } }'

To remove a contact from its segment, send "segment_id": null.