Skip to main content
POST
/
api
/
messaging
/
contacts
{
  "name": "John Doe",
  "phone_e164": "+255614853618",
  "email": "john@example.com",
  "attributes": {
    "company": "Example Corp",
    "position": "Manager"
  },
  "tags": ["VIP", "Customer"]
}
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "John Doe",
  "phone_e164": "+255614853618",
  "email": "john@example.com",
  "attributes": {
    "company": "Example Corp",
    "position": "Manager"
  },
  "tags": ["VIP", "Customer"],
  "is_active": true,
  "opt_in_at": "2025-11-27T10:30:00Z",
  "opt_out_at": null,
  "created_at": "2025-11-27T10:30:00Z",
  "updated_at": "2025-11-27T10:30:00Z"
}
Create a new contact.
name
string
required
Contact name
phone_e164
string
required
Phone number in E.164 format
email
string
Email address
attributes
object
Custom attributes (key-value pairs)
tags
array
Array of tag strings

Request Example

{
  "name": "John Doe",
  "phone_e164": "+255614853618",
  "email": "john@example.com",
  "attributes": {
    "company": "Example Corp",
    "position": "Manager"
  },
  "tags": ["VIP", "Customer"]
}

Success Response (201)

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "John Doe",
  "phone_e164": "+255614853618",
  "email": "john@example.com",
  "attributes": {
    "company": "Example Corp",
    "position": "Manager"
  },
  "tags": ["VIP", "Customer"],
  "is_active": true,
  "opt_in_at": "2025-11-27T10:30:00Z",
  "opt_out_at": null,
  "created_at": "2025-11-27T10:30:00Z",
  "updated_at": "2025-11-27T10:30:00Z"
}