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 BranchCreate Branch

Create Branch

Add a new branch with all details

Reading time: 1 minute

Create New Branch

Add a new branch with all details.

POST{{base_url}}/branches

Query Parameters

ParameterTypeRequiredDescription
phone_number_idstringYesPhone number ID

Request Body (form-data)

ParameterTypeRequiredDescriptionDefault
namestringYesBranch name (max 255 characters)-
phonestringNoBranch phone number-
emailstringNoBranch email address-
addressstringNoFull branch address-
descriptionstringNoBranch description-
branch_idstringNoExternal branch ID (for integration with other systems)-
contact_group_idstringNoContact group ID-
full_namestringNoFull name of branch manager-
is_favoritebooleanNoMark as favorite branchfalse
filefileNoAttachment file (logo, image - max 10MB)-

File Requirements:

  • Maximum size: 10 MB
  • Supported formats: JPG, PNG, PDF
  • Recommended format: PNG with dimensions 512x512

Example Request

Example Requestbash
curl -X POST "{{base_url}}/branches?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=Khobar Branch" \
-F "phone=966500000002" \
-F "email=khobar@example.com" \
-F "address=Corniche, Khobar, Saudi Arabia" \
-F "description=New branch in Khobar" \
-F "is_favorite=false" \
-F "file=@/path/to/branch-logo.png"

Example Response

Response200 OK
{
"status": true,
"message": "Branch created successfully",
"data": {
  "id": 3,
  "name": "Khobar Branch",
  "phone": "966500000002",
  "email": "khobar@example.com",
  "address": "Corniche, Khobar, Saudi Arabia",
  "description": "New branch in Khobar",
  "is_favorite": false,
  "file_url": "https://storage.awalchat.com/branches/3/logo.png",
  "created_at": "2025-01-08T15:00:00Z"
}
}

Use Case: Create Branch with Contact Group

Create with Groupbash
POST /branches?phone_number_id=123456
-F "name=Dammam Branch"
-F "contact_group_id=5"

Error Codes

CodeDescriptionCauseSolution
400Bad RequestInvalid dataCheck sent data
409ConflictDuplicate branch nameUse a different name
413Payload Too LargeFile size too largeUse file smaller than 10MB
422Validation ErrorValidation errorReview error message

Related

← Back to Branches
View Guide
View