Scheduled Messages API

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 NameTypeMandatoryExample valuesDescription
idStringYes if a date range is not given.cmp_36bzz7d3BObohgoE2t4maNdo7BE, aps_33NFW8JbaqWOoTZln2t4wQUIqGrRetrieve a Campaign or API SMS Request by id.
nameStringNoQuick Send: 09 December 2025, 02:23:39pm, January SaleFuzzy match search on the Campaign Name or API Request Name.
statusArray of StringsNoSCHEDULED, SENT, ERROR, DELETED,I N_PROGRESSSpecify which sending statuses to return.
created_at_startDate StringYes if id or scheduled_at date range is not given.2025-12-03T12:38:16ZDate format: ISO 8601 date-time format with UTC timezone indicated by 'Z' suffix.

Use in conjuction with created_at_end.
created_at_endDate StringYes if id or scheduled_at date range is not given.2025-12-05T12:38:16ZDate format: ISO 8601 date-time format with UTC timezone indicated by 'Z' suffix.

Use in conjuction with created_at_start.
scheduled_at_startDate StringYes if id or created_at date range is not given.2025-12-03T12:38:16ZDate format: ISO 8601 date-time format with UTC timezone indicated by 'Z' suffix.

Use in conjuction with scheduled_at_end.
scheduled_at_endDate StringYes if id or created_at date range is not given2025-12-05T12:38:16ZDate format: ISO 8601 date-time format with UTC timezone indicated by 'Z' suffix.

Use in conjuction with scheduled_at_start.
request_typesArray of StringsNoCAMPAIGN, APISpecify the type of SMS request to return.

Returns all types by default.
sort_byStringNocreated_at, updated_at, scheduled_at, name, statusSpecify the field to sort items by.
sort_orderStringNoASC, DESCDetermines the order that the results are sorted by. Defaults to DESC if not given.
page_numberIntegerNo1Use in conjunction with page_size to return a subset. Defaults to 1 page if not given.
page_sizeIntegerNo5Determines 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

CodeErrorMessage
ERR_CMP_REQ_001MISSING_PARAMETERRequired parameter is missing
ERR_CMP_NF_004RESOURCE_NOT_FOUNDRequested resource not found
ERR_CMP_VAL_012VALIDATION_ERRORRequest validation failed
ERR_CMP_VAL_012VALIDATION_ERRORInvalid date time.
ERR_CMP_VAL_012VALIDATION_ERRORAt least one of the following must be provided: id, created_at (start/end), or scheduled_at (start/end)
ERR_CMP_VAL_012VALIDATION_ERRORID length exceeds maximum allowed length of 32 characters
ERR_CMP_VAL_012VALIDATION_ERRORInvalid ID format: ''. ID must start with 'cmp' for campaigns or 'aps' for API requests
ERR_CMP_VAL_012VALIDATION_ERRORname length exceeds maximum allowed length of 100 characters
ERR_CMP_VAL_012VALIDATION_ERRORstatus set size exceeds maximum allowed size of 5
ERR_CMP_VAL_012VALIDATION_ERRORrequest_types set size exceeds maximum allowed size of 2
ERR_CMP_VAL_012VALIDATION_ERRORscheduled_at date range cannot exceed 90 days
ERR_CMP_VAL_012VALIDATION_ERRORscheduled_at_start must be before scheduled_at_end
ERR_CMP_VAL_012VALIDATION_ERRORscheduled_at_end is required when scheduled_at_start is provided
ERR_CMP_VAL_012VALIDATION_ERRORInvalid format for 'created_at_end'. Expected format: ISO-8601 timestamp (e.g., 2025-01-01T00:00:00Z)
ERR_CMP_VAL_012VALIDATION_ERRORInvalid page number
ERR_CMP_VAL_012VALIDATION_ERRORInvalid page size (too small)
ERR_CMP_VAL_012VALIDATION_ERRORInvalid sort field
ERR_CMP_VAL_012VALIDATION_ERRORInvalid sort order
ERR_CMP_VAL_013INVALID_PARAMETER_TYPEInvalid parameter type
ERR_CMP_VAL_014INVALID_PARAMETER_VALUEInvalid parameter value
ERR_CMP_GEN_001GENERIC_ERRORAn 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

CodeErrorMessage
ERR_CMP_NF_004CAMPAIGN_NOT_FOUNDCampaign with ID not found