SendSMSby ZEXTELDocumentation
EN
Cabinet
Open MarkdownOpen in ChatGPTOpen in Claude
⋯ Page actions
Open MarkdownOpen in ChatGPTOpen in ClaudeOpen in CursorOpen in PerplexityOpen in Gemini (question is copied)Open in Microsoft CopilotOpen in IBM Bob (question is copied)

Scenarios

Scenario event state

GET/v1/scenarios/{id}/events/{eventId}

Required permission: messages.send

What became of an event: its state, the message ID (one number) or the run of the scenario (a list), the reason of a refusal. Another account’s event is indistinguishable from a missing one (404).

GET /v1/scenarios/{id}/events/{eventId}

cURL. The key is in the SENDSMS_API_KEY environment variable.

curl --max-time 30 --request GET \
  --url 'https://api.sendsms.to/v1/scenarios/SCENARIO_ID/events/EVENT_ID' \
  --header "X-API-Key: $SENDSMS_API_KEY"

#Parameters

FieldTypeDescription
idrequiredpath · stringScenario ID from the cabinet: Scenarios → the scenario → API connection.
eventIdrequiredpath · string

#Responses

200Successful result

Response format

FieldTypeDescription
eventIdrequiredstring · uuidEvent identifier generated by SendSMS. Keep it to read the event later.
statusrequiredstringqueued — the SMS was accepted by the same handler as POST /v1/messages (messageId); scheduled — it waits for the end of the quiet hours (sendAt); accepted — a list event that becomes a normal campaign of the scenario; refused — not sent (error explains why).
"queued" "scheduled" "accepted" "refused" "sent" "sending" "cancelled" "failed"
messageIdoptionalstring | null · uuidMessage identifier for GET /v1/messages/{id} (one-number events).
sendAtoptionalstring | null · date-timeWhen a waiting event will be sent (the end of the quiet hours).
recipientsoptionalintegerNumber of distinct recipients of a list event.
duplicateoptionalbooleantrue — a repeat of an event already accepted with this Idempotency-Key; nothing was sent again.
campaignIdoptionalstring | null · uuidA list event: the campaign of the scenario run made from it.
runStateoptionalstring | nullA list event: the state of that run (preparing, review, scheduled, done, failed…).
reasonCodeoptionalstring | nullWhy the event or its run did not go out, when it did not.
dryRunoptionalbooleanPresent only in the answer to a trial request (X-Dry-Run: true): nothing was executed; identifiers in this answer are conditional.
const: true
401Invalid or revoked API key

Check the X-API-Key header and key status. Never expose the key in client-side code. The machine code is in the code field: api_key_missing or api_key_invalid.

Response format

FieldTypeDescription
errorrequiredstringError identifier or legacy human-readable text returned by SendSMS. Not every handler exposes a stable machine code here. Check HTTP status and documented identifiers; never parse translated prose as a permanent code.
messageoptionalstringOptional explanation generated by SendSMS. Intended for people; wording/language may change. Absence means the handler supplied no separate explanation.
codeoptionalstringOptional machine-readable code generated by SendSMS or its HTTP framework. Meaning depends on the operation; not a universal numeric provider code.
statusCodeoptionalintegerOptional HTTP status number generated by the server framework for a framework-level error. The actual HTTP response status is authoritative.
403Insufficient key permissions or account/channel policy; or the request came from an IP address not allowed for this key (ip_not_allowed)

Check API key permissions, account settings and channel availability.

Response format

FieldTypeDescription
errorrequiredstringError identifier or legacy human-readable text returned by SendSMS. Not every handler exposes a stable machine code here. Check HTTP status and documented identifiers; never parse translated prose as a permanent code.
messageoptionalstringOptional explanation generated by SendSMS. Intended for people; wording/language may change. Absence means the handler supplied no separate explanation.
codeoptionalstringOptional machine-readable code generated by SendSMS or its HTTP framework. Meaning depends on the operation; not a universal numeric provider code.
statusCodeoptionalintegerOptional HTTP status number generated by the server framework for a framework-level error. The actual HTTP response status is authoritative.
404Resource unavailable to this account

Check the resource ID and whether it belongs to the API key account.

Response format

FieldTypeDescription
errorrequiredstringError identifier or legacy human-readable text returned by SendSMS. Not every handler exposes a stable machine code here. Check HTTP status and documented identifiers; never parse translated prose as a permanent code.
messageoptionalstringOptional explanation generated by SendSMS. Intended for people; wording/language may change. Absence means the handler supplied no separate explanation.
codeoptionalstringOptional machine-readable code generated by SendSMS or its HTTP framework. Meaning depends on the operation; not a universal numeric provider code.
statusCodeoptionalintegerOptional HTTP status number generated by the server framework for a framework-level error. The actual HTTP response status is authoritative.
429Rate limit

Reduce the request rate and delay retries. The general per-second limit: code = rate_limit_exceeded.

Response format

FieldTypeDescription
errorrequiredstringError identifier or legacy human-readable text returned by SendSMS. Not every handler exposes a stable machine code here. Check HTTP status and documented identifiers; never parse translated prose as a permanent code.
messageoptionalstringOptional explanation generated by SendSMS. Intended for people; wording/language may change. Absence means the handler supplied no separate explanation.
codeoptionalstringOptional machine-readable code generated by SendSMS or its HTTP framework. Meaning depends on the operation; not a universal numeric provider code.
statusCodeoptionalintegerOptional HTTP status number generated by the server framework for a framework-level error. The actual HTTP response status is authoritative.
503Temporarily unavailable

The service is temporarily unavailable. Before retrying an SMS submission, check whether the previous request was accepted.

Response format

FieldTypeDescription
errorrequiredstringError identifier or legacy human-readable text returned by SendSMS. Not every handler exposes a stable machine code here. Check HTTP status and documented identifiers; never parse translated prose as a permanent code.
messageoptionalstringOptional explanation generated by SendSMS. Intended for people; wording/language may change. Absence means the handler supplied no separate explanation.
codeoptionalstringOptional machine-readable code generated by SendSMS or its HTTP framework. Meaning depends on the operation; not a universal numeric provider code.
statusCodeoptionalintegerOptional HTTP status number generated by the server framework for a framework-level error. The actual HTTP response status is authoritative.

Type to search