Create Contact

Create a single contact in your Bulkit account and optionally assign it to one group.

Last updated · Markdown version

HTTP method and path

HTTP
POST /api/v2/contacts

Authorization requirements

Authenticate using standard HTTP Bearer token:

HTTP
Authorization: Bearer bk_live_8n6JQv3K1h9Lp0Md
Content-Type: application/json

For backward compatibility, Bulkit also accepts apikey and apisecret in the JSON request body or X-API-Key / X-API-Secret headers.

Request example

cURL / Bash
curl -X POST "https://api.bulkitsms.com/api/v2/contacts" \
  -H "Authorization: Bearer bk_live_8n6JQv3K1h9Lp0Md" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "John Doe",
    "phone_number": "0700000000",
    "email": "john@doe.com",
    "group_ids": [14]
  }'

Parameters

ParameterRequiredTypeDescription
nameYesstringContact full name
phone_numberYesstringContact mobile number
emailNostringContact email address
group_idsNoarray of integers/UUIDsGroup IDs for assignment. Only one group is supported for now
custom_metadataNoobjectIntegration metadata payload accepted for compatibility

Success response example

JSON
{
  "status": "success",
  "message": "Contact created successfully",
  "data": {
    "id": 442,
    "first_name": "John",
    "last_name": "Doe",
    "mobile": "254700000000",
    "email": "john@doe.com"
  }
}

Error response examples

JSON
{
  "status": "error",
  "message": "Invalid phone number"
}
JSON
{
  "status": "error",
  "message": "Contact already exists"
}
JSON
{
  "status": "error",
  "message": "Group not found"
}