Contact Attributes
Use attributes to define reusable custom fields for contacts (for example customer_tier, preferred_branch, lead_source).
List attributes
GET /v1/organization/contacts/attributescurl https://api.bahasha.app/v1/organization/contacts/attributes \
-H "Authorization: Bearer bh_live_xxxxxxxxxxxx"Response
{
"data": [
{ "key": "city", "label": "city" },
{ "key": "customer_tier", "label": "Customer Tier" }
]
}Create or update attributes
POST /v1/organization/contacts/attributesUse this endpoint to register or relabel reusable custom fields.
curl -X POST https://api.bahasha.app/v1/organization/contacts/attributes \
-H "Authorization: Bearer bh_live_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"attributes": [
{ "key": "customer_tier", "label": "Customer Tier" },
{ "key": "preferred_branch", "label": "Preferred Branch" }
]
}'Response
{
"data": [
{ "key": "city", "label": "city" },
{ "key": "customer_tier", "label": "Customer Tier" },
{ "key": "preferred_branch", "label": "Preferred Branch" }
]
}