HomeUser GuidesAPI Reference
Get Started
HomeAPI Reference
Authentication
Branches
Contact Groups
Contacts
Conversations
Error HandlingInvoices
Messages
Orders
Rate LimitingSDKs & Code ExamplesTemplatesTicketsAPI VersioningWABA NumbersWebhooks
User GuideAPI ReferenceCreate ContactCreate Contact

Create Contact

Add a new contact with all details

Reading time: 1 minute

Create Contact

Add a new contact with all details.

POST{{base_url}}/contacts

Query Parameters

ParameterTypeRequiredDescription
phone_number_idstringYesPhone number ID of the sender

Request Body (form-data)

ParameterTypeRequiredDescriptionDefault
namestringYesContact name-
phonestringYesPhone number in international format (96650000000)-
emailstringNoEmail address-
branch_idstringNoBranch ID-
contact_group_idstringNoContact group ID-
descriptionstringNoContact description-
addressstringNoFull address-
full_namestringNoFull name-
is_favoritebooleanNoMark as favorite contactfalse
filefileNoAvatar image (JPG, PNG - max 5MB)-
avatarstringNoAvatar image URL-

Phone Number Requirements:

  • Must be in international format (96650000000)
  • No special characters (+ or -)
  • Starts with country code

Example Request

Example Requestbash
curl -X POST "{{base_url}}/contacts?phone_number_id=123456" \
-H "Accept: application/json" \
-H "X-Awal-Signature-256: sha256=abc..." \
-H "X-Timestamp: 1704124800" \
-H "X-Domain: your-workspace" \
-H "X-Client-ID: your-client-id" \
-F "name=Ahmed Mohammed" \
-F "phone=96650000000" \
-F "email=ahmed@example.com" \
-F "contact_group_id=1" \
-F "is_favorite=true" \
-F "file=@/path/to/avatar.jpg"

Example Response

Response201 Created
{
"status": true,
"message": "Contact created successfully",
"data": {
  "id": 1,
  "name": "Ahmed Mohammed",
  "phone": "96650000000",
  "email": "ahmed@example.com",
  "contact_group_id": 1,
  "is_favorite": true,
  "avatar": "https://storage.awalchat.com/contacts/1/avatar.jpg",
  "created_at": "2024-01-15T10:30:00Z"
}
}

Related

← Back to Contacts
View Guide
View