Query and cancel scheduled SMS.
Retrieve Scheduled Campaigns and API SMS Requests
Method: POST
Rate Limit: 10 transactions per second
Parameters
To get a success response, ensure that either the id or a date range is passed in your request.
| Parameter Name | Type | Mandatory | Example values | Description |
|---|---|---|---|---|
| id | String | Yes if a date range is not given. | cmp_36bzz7d3BObohgoE2t4maNdo7BE, aps_33NFW8JbaqWOoTZln2t4wQUIqGr | Retrieve a Campaign or API SMS Request by id. |
| name | String | No | Quick Send: 09 December 2025, 02:23:39pm, January Sale | Fuzzy match search on the Campaign Name or API Request Name. |
| status | Array of Strings | No | SCHEDULED, SENT, ERROR, DELETED,I N_PROGRESS | Specify which sending statuses to return. |
| created_at_start | Date String | Yes if id or scheduled_at date range is not given. | 2025-12-03T12:38:16Z | Date format: ISO 8601 date-time format with UTC timezone indicated by 'Z' suffix. Use in conjuction with created_at_end. |
| created_at_end | Date String | Yes if id or scheduled_at date range is not given. | 2025-12-05T12:38:16Z | Date format: ISO 8601 date-time format with UTC timezone indicated by 'Z' suffix. Use in conjuction with created_at_start. |
| scheduled_at_start | Date String | Yes if id or created_at date range is not given. | 2025-12-03T12:38:16Z | Date format: ISO 8601 date-time format with UTC timezone indicated by 'Z' suffix. Use in conjuction with scheduled_at_end. |
| scheduled_at_end | Date String | Yes if id or created_at date range is not given | 2025-12-05T12:38:16Z | Date format: ISO 8601 date-time format with UTC timezone indicated by 'Z' suffix. Use in conjuction with scheduled_at_start. |
| request_types | Array of Strings | No | CAMPAIGN, API | Specify the type of SMS request to return. Returns all types by default. |
| sort_by | String | No | created_at, updated_at, scheduled_at, name, status | Specify the field to sort items by. |
| sort_order | String | No | ASC, DESC | Determines the order that the results are sorted by. Defaults to DESC if not given. |
| page_number | Integer | No | 1 | Use in conjunction with page_size to return a subset. Defaults to 1 page if not given. |
| page_size | Integer | No | 5 | Determines the number of items returned per page. Defaults to 25 items if not given. |
Sample request
{
"filter" : {
"status" : ["SENT", "SCHEDULED", "DELETED"],
"request_types" : ["CAMPAIGN"],
"name" : "January",
"scheduled_at_start" : "2025-12-18T15:30:00Z",
"scheduled_at_end" : "2026-01-15T19:01:00Z"
},
"page" : {
"page_number" : 1,
"page_size" : 30
},
"sort" : {
"sort_order" : "ASC",
"sort_by" : "scheduled_at"
}
}
Sample response
{
"paging": {
"current_page": 1,
"total_items": 4,
"total_pages": 1
},
"items": [
{
"id": "aps_76NFW8JbqqWOoTZln2t4wQUIqBr",
"sender_name": "MattCo",
"created_at": "2025-12-04T09:05:50Z",
"scheduled_at": "2025-12-15T16:09:17Z",
"type": "API",
"status": "SCHEDULED",
"api_project_name": "My API Project"
},
{
"id": "aps_36bcIAIlR4QRPLl1hmPd5sO8U6A",
"sender_name": "MattCo",
"created_at": "2025-12-09T11:10:28Z",
"scheduled_at": "2025-12-18T02:20:20Z",
"type": "API",
"status": "SCHEDULED",
"api_project_name": "My API Project",
"estimated_cost": 0.039
},
{
"id": "aps_36bdYov9dRLE8PNRHM0xSwpme61",
"sender_name": "+447800000000",
"created_at": "2025-12-09T11:20:55Z",
"scheduled_at": "2025-12-18T02:20:20Z",
"type": "API",
"status": "SCHEDULED",
"api_project_name": "My Other API Project",
"estimated_cost": 0.039
},
{
"id": "cmp_36bze7d9BObohgoE2t4maNdo7BT",
"name": "Quick Send: 09 December 2025, 02:23:39pm",
"sender_name": "51234",
"created_at": "2025-12-09T14:25:18Z",
"scheduled_at": "2025-12-31T17:00:00Z",
"type": "CAMPAIGN",
"status": "DELETED",
"estimated_cost": 0.078
}
]
}
{
"trace_id": "ba98346734297a6a",
"code": "ERR_CMP_VAL_012",
"error": "VALIDATION_ERROR",
"message": "At least one of the following must be provided: id, created_at (start/end), or scheduled_at (start/end)",
"status": 400,
"timestamp": "2025-12-10T14:27:43.435478549Z",
"validation_errors": null
}
Error Codes
| Code | Error | Message |
|---|---|---|
| ERR_CMP_REQ_001 | MISSING_PARAMETER | Required parameter is missing |
| ERR_CMP_NF_004 | RESOURCE_NOT_FOUND | Requested resource not found |
| ERR_CMP_VAL_012 | VALIDATION_ERROR | Request validation failed |
| ERR_CMP_VAL_012 | VALIDATION_ERROR | Invalid date time. |
| ERR_CMP_VAL_012 | VALIDATION_ERROR | At least one of the following must be provided: id, created_at (start/end), or scheduled_at (start/end) |
| ERR_CMP_VAL_012 | VALIDATION_ERROR | ID length exceeds maximum allowed length of 32 characters |
| ERR_CMP_VAL_012 | VALIDATION_ERROR | Invalid ID format: ''. ID must start with 'cmp' for campaigns or 'aps' for API requests |
| ERR_CMP_VAL_012 | VALIDATION_ERROR | name length exceeds maximum allowed length of 100 characters |
| ERR_CMP_VAL_012 | VALIDATION_ERROR | status set size exceeds maximum allowed size of 5 |
| ERR_CMP_VAL_012 | VALIDATION_ERROR | request_types set size exceeds maximum allowed size of 2 |
| ERR_CMP_VAL_012 | VALIDATION_ERROR | scheduled_at date range cannot exceed 90 days |
| ERR_CMP_VAL_012 | VALIDATION_ERROR | scheduled_at_start must be before scheduled_at_end |
| ERR_CMP_VAL_012 | VALIDATION_ERROR | scheduled_at_end is required when scheduled_at_start is provided |
| ERR_CMP_VAL_012 | VALIDATION_ERROR | Invalid format for 'created_at_end'. Expected format: ISO-8601 timestamp (e.g., 2025-01-01T00:00:00Z) |
| ERR_CMP_VAL_012 | VALIDATION_ERROR | Invalid page number |
| ERR_CMP_VAL_012 | VALIDATION_ERROR | Invalid page size (too small) |
| ERR_CMP_VAL_012 | VALIDATION_ERROR | Invalid sort field |
| ERR_CMP_VAL_012 | VALIDATION_ERROR | Invalid sort order |
| ERR_CMP_VAL_013 | INVALID_PARAMETER_TYPE | Invalid parameter type |
| ERR_CMP_VAL_014 | INVALID_PARAMETER_VALUE | Invalid parameter value |
| ERR_CMP_GEN_001 | GENERIC_ERROR | An error occurred |
Cancel a Campaign or API SMS Request
Method: DELETE
Rate Limit: 10 transactions per second
Parameters
This endpoint requires no additional parameters.
Sample request
https://api.webexinteract.com/campaigns/v1/cancel/aps_36bRIAIlR4QRPLl1hmPd8sO8U6F
Sample responses
HTTP/1.1 204 No Content
{
"trace_id": "b41d705e0fe312e8",
"code": "ERR_CMP_NF_004",
"error": "CAMPAIGN_NOT_FOUND",
"message": "Campaign with ID 'aps_36bcIAIlR4QRPLl1hmPd8sO8U6B' not found",
"status": 404,
"timestamp": "2025-12-09T16:58:53.069553424Z",
"validation_errors": null
}
Error Codes
| Code | Error | Message |
|---|---|---|
| ERR_CMP_NF_004 | CAMPAIGN_NOT_FOUND | Campaign with ID not found |