Skip to main content

Broadcast API

Trigger and manage bulk messaging campaigns with the Broadcast API endpoints.


Endpoints

1. List/Search Broadcasts

GET /v1/broadcasts

  • Description: Retrieve a list of broadcasts with optional filtering and search.
  • Authentication: Requires x-api-key header.

Query Parameters:

NameInTypeRequiredDescription
workspaceIdquerystringNoFilter by workspace ID
limitquerystringNoMax number of results
pagequerystringNoPage number for pagination
endDatequerystringNoFilter by end date
searchTextquerystringNoFree text search
x-api-keyheaderstringYesAPI authentication key

Response: [200 OK] - Array of BroadcastResponse


2. Create a Broadcast

POST /v1/broadcasts

  • Description: Create a new broadcast campaign.
  • Authentication: Requires x-api-key header.

Request Body: BroadcastRequest (application/json)

Response: [200 OK] - BroadcastResponse


3. Get Broadcast by ID

GET /v1/broadcasts/{broadcastId}

  • Description: Retrieve a broadcast by its unique ID.
  • Authentication: Requires x-api-key header.

Path Parameters:

NameInTypeRequiredDescription
broadcastIdpathstringYesBroadcast unique ID
x-api-keyheaderstringYesAPI authentication key

Response: [200 OK] - BroadcastResponse


4. Update Broadcast by ID

PUT /v1/broadcasts/{broadcastId}

  • Description: Update an existing broadcast by its unique ID.
  • Authentication: Requires x-api-key header.

Path Parameters:

NameInTypeRequiredDescription
broadcastIdpathstringYesBroadcast unique ID
x-api-keyheaderstringYesAPI authentication key

Request Body: BroadcastRequest (application/json)

Response: [200 OK] - BroadcastResponse


5. Delete Broadcast by ID

DELETE /v1/broadcasts/{broadcastId}

  • Description: Delete a broadcast by its unique ID.
  • Authentication: Requires x-api-key header.

Path Parameters:

NameInTypeRequiredDescription
broadcastIdpathstringYesBroadcast unique ID
x-api-keyheaderstringYesAPI authentication key

Response: [200 OK] - DeleteResponse


6. Get Broadcast Logs

GET /v1/broadcasts/{broadcastId}/logs

  • Description: Retrieve logs for a specific broadcast.
  • Authentication: Requires x-api-key header.

Path Parameters:

NameInTypeRequiredDescription
broadcastIdpathstringYesBroadcast unique ID
x-api-keyheaderstringYesAPI authentication key

Query Parameters:

NameInTypeRequiredDescription
limitquerystringNoMax number of results
pagequerystringNoPage number for pagination

Response: [200 OK] - Array of BroadcastLog


Schemas

BroadcastRequest Schema

{
"workspace": { "id": "string" },
"name": "string",
"type": "string"
}

BroadcastResponse Schema

{
"workspace": { "id": "string" },
"name": "string",
"type": "string"
}

BroadcastLog Schema

{
"broadcast": { "id": "string", "name": "string" },
"recepientName": "string",
"countryCode": "string",
"phone": "string",
"status": "string",
"reply": "string",
"error": "string",
"createdAt": "string",
"updatedAt": "string"
}

BroadcastResponses Schema

[
{ /* BroadcastResponse object */ }
]

DeleteResponse Schema

{
"success": true
}