Base URL: https://api.connectby.io
Retrieve a paginated list of contacts.
Headers:
secret_key: string (required)
Query Parameters:
page: integer (optional, default: 1)
Response:
{"contacts": [{"id": 1, "name": "John Doe", "phone": "1234567890"}]}
Create a new contact.
Headers:
secret_key: string (required)
Request Body:
| Parameter | Type | Description |
|---|---|---|
| name | string | Required. The name of the contact. |
| country_code | string | Required. The country code for the phone number. |
| phone_number | string | Required. The phone number of the contact. |
| string | Optional. The email address of the contact. | |
| gender | string | Optional. The gender of the contact. |
| dob | string | Optional. The date of birth of the contact (format: YYYY-MM-DD). |
| note | string | Optional. Additional notes about the contact. |
Response:
{"message": "Contact created successfully", "contactId": 2}
Update a contact.
Headers:
secret_key: string (required)
Request Body:
| Parameter | Type | Description |
|---|---|---|
| name | string | Required. The updated name of the contact. |
| string | Optional. The updated email address of the contact. | |
| gender | string | Optional. The updated gender of the contact. |
| dob | string | Optional. The updated date of birth of the contact (format: YYYY-MM-DD). |
| note | string | Optional. Additional updated notes about the contact. |
Response:
{"message": "Contact updated successfully"}
Delete a contact.
Headers:
secret_key: string (required)
Response:
{"message": "Contact deleted successfully"}
Retrieve a paginated list of flow data.
Headers:
secret_key: string (required)
Query Parameters:
page: integer (optional, default: 1)
Response:
{
"flowdata": [
{
"flow_id": "1234567890123456",
"from_number": "919876543210",
"flow_response":"{\"screen_0_Email_ID_4\":\"Test\@test.com\",\"flow_token\":\"919876543210-1234567890123456\",\"screen_0_Duration_of_Symptoms_7\":\"Test\",\"screen_0_Patient_Phone_Number_5\":\"9876543210\",\"screen_0_Preferred_Date_1\":\"2025-02-04\",\"screen_0_First_Visit_or_FollowUp_0\":\"0_First_Visit\",\"screen_0_Patient_Name_3\":\"Test patient\",\"screen_0_Preferred_Time_2\":\"0_10:00_AM\",\"screen_0_Describe_Issues_6\":\"Test\"}",
"updated_at": "1738651325",
"created_at": "1738651325"
},
{
"flow_id": "1234567890123456",
"from_number": "919876543210",
"flow_response":"{\"screen_0_Email_ID_4\":\"Test\@test.com\",\"flow_token\":\"919876543210-1234567890123456\",\"screen_0_Duration_of_Symptoms_7\":\"Test\",\"screen_0_Patient_Phone_Number_5\":\"9876543210\",\"screen_0_Preferred_Date_1\":\"2025-02-04\",\"screen_0_First_Visit_or_FollowUp_0\":\"0_First_Visit\",\"screen_0_Patient_Name_3\":\"Test patient\",\"screen_0_Preferred_Time_2\":\"0_10:00_AM\",\"screen_0_Describe_Issues_6\":\"Test\"}",
"updated_at": "1738651325",
"created_at": "1738651325"
}
}
Send a WhatsApp message.
Headers:
secret_key: string (required)
Request Body:
| Parameter | Type | Description |
|---|---|---|
| to_number | string | Required. The recipient's phone number. |
| message | string | Required. The message to be sent. The message text should be no more than 1024 characters in length. |
Response:
{"success": true, "responseData": {...}}
Send a WhatsApp message with media (image, video, document).
Headers:
secret_key: string (required)
Request Body:
| Parameter | Type | Description |
|---|---|---|
| to_number | string | Required. The recipient's phone number. |
| file | multipart/form-data | Required. The media file (image, video, document) to be sent. The file size limits are as follows: |
| Image: Max 5 MB | ||
| Video: Max 16 MB | ||
| Document: Max 16 MB |
Response:
{"success": true, "responseDataArray": [{...}]}
Retrieve a paginated list of message templates.
Headers:
secret_key: string (required)
Query Parameters:
after: string (optional, cursor for pagination)
before: string (optional, cursor for pagination)
Response:
{
"success": true,
"responseData": {
"data": [
{ "id": "123", "name": "template_1", "language": "en" },
{ "id": "456", "name": "template_2", "language": "es" }
],
"paging": {
"previous": "https://api.connectby.io/v1.0/templates?before=prev_cursor",
"next": "https://api.connectby.io/v1.0/templates?after=next_cursor"
}
}
}
Upload media for template (image, video, document).
Headers:
secret_key: string (required)
Request Body:
| Parameter | Type | Description |
|---|---|---|
| file | multipart/form-data | Required. The media file (image, video, document) to be sent. The file size limits are as follows: |
| Image: Max 5 MB | ||
| Video: Max 16 MB | ||
| Document: Max 16 MB |
Response:
{"success": true, "fileUrl": "https://api.connectby.io/whatsapp_media/142324.jpg"}
Send a WhatsApp template message.
Headers:
secret_key: string (required)
Request Body:
| Parameter | Type | Description |
|---|---|---|
| to_number | string | Required. The recipient's phone number. |
| components | JSON | Required if the header contains media, a body, or an example variable. |
| template | JSON | Required. The template JSON received from the get template API. |
{
"to_number": "911234567890",
"components": [
{
"type": "header",
"parameters": [
{
"type": "image",
"image": {
"link": "https://example.com/dummy-image.jpg"
}
}
]
},
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Dummy text message"
}
]
}
],
"template": {
"name": "dummy_template",
"language": "en",
"parameter_format": "POSITIONAL",
"components":[...],
"status": "APPROVED",
"category": "MARKETING",
"id": "1044750020823458"
}
}
{
"to_number": "911234567890",
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "ONE-TIME PASSWORD"
}
]
},
{
"type": "button",
"sub_type": "url",
"index": "0",
"parameters": [
{
"type": "text",
"text": "ONE-TIME PASSWORD"
}
]
}
],
"template": {
"name": "dummy_template",
"language": "en",
"parameter_format": "POSITIONAL",
"components":[...],
"status": "APPROVED",
"category": "MARKETING",
"id": "1044750020823458"
}
}
Response:
{"success": true, "responseData": {...}}