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:
Name | In | Type | Required | Description |
---|---|---|---|---|
workspaceId | query | string | No | Filter by workspace ID |
limit | query | string | No | Max number of results |
page | query | string | No | Page number for pagination |
endDate | query | string | No | Filter by end date |
searchText | query | string | No | Free text search |
x-api-key | header | string | Yes | API 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:
Name | In | Type | Required | Description |
---|---|---|---|---|
broadcastId | path | string | Yes | Broadcast unique ID |
x-api-key | header | string | Yes | API 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:
Name | In | Type | Required | Description |
---|---|---|---|---|
broadcastId | path | string | Yes | Broadcast unique ID |
x-api-key | header | string | Yes | API 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:
Name | In | Type | Required | Description |
---|---|---|---|---|
broadcastId | path | string | Yes | Broadcast unique ID |
x-api-key | header | string | Yes | API 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:
Name | In | Type | Required | Description |
---|---|---|---|---|
broadcastId | path | string | Yes | Broadcast unique ID |
x-api-key | header | string | Yes | API authentication key |
Query Parameters:
Name | In | Type | Required | Description |
---|---|---|---|---|
limit | query | string | No | Max number of results |
page | query | string | No | Page 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
}