Skip to content

Stopping postponed and not yet sent SMS messages

POST
/sms/ops/batch_cancel

With this API you can delete SMS messages that have not yet been sent or interrupt the sending process. For scheduled SMS messages, the transmission time must be in the future. If the SMS is not scheduled, the transmission to the mobile phone provider may take a few seconds, which will possibly allow you to stop the transmission in exceptional cases.

_order[created_at]

Sort order direction (ascending or descending)

string
default: asc
Allowed values: asc desc

Sort by timestamp when the entity was created

_order[gateway_sent_at]

Sort order direction (ascending or descending)

string
default: asc
Allowed values: asc desc

Sort by timestamp when the message was transmitted to the mobile network

is_sent
boolean

Boolean filter SMS by the is_sent field to distinguish between already sent and not yet sent sms

is_unicode
boolean

Boolean filter SMS by the is_unicode field to distinguish between GSM and Unicode messages

uuid

Unique entity UUID

string
/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

Exact filter by SMS ID

uuid[]
Array<string>

Exact filter by SMS ID

iso2

Country code

string
>= 2 characters <= 2 characters /^[A-Z]{2}$/

Exact filter SMS by the phone’s country (ISO 3166-1 alpha-2)

iso2[]
Array<string>

Exact filter SMS by the phone’s countries (ISO 3166-1 alpha-2)

dlr_code
integer
Allowed values: 0 1 2 4 8 16
Example
1

Exact filter SMS by the delivery report status

dlr_code[]
Array<integer>
Allowed values: 0 1 2 4 8 16

Exact filter SMS by the delivery report statuses

status_code

Status of the sms. For more info see SMS status codes

integer
Allowed values: 0 100 208 400 410 2000 3000 5000 6000

Exact filter SMS by the status code

status_code[]
Array<integer>
Allowed values: 0 100 208 400 410 2000 3000 5000 6000

Exact filter SMS by the statuses codes

gateway_sent_at

Timestamp when message was sent to the mobile network provider

integer

Exact filter SMS by the send to gateway timestamp

gateway_sent_at[]
Array<integer>

Exact and range filter SMS by send to gateway timestamps

delivery_at

Scheduled delivery timestamp

integer

Exact filter SMS by the delivery timestamp

delivery_at[]
Array<integer>

Exact and range filter SMS by the delivery timestamps

created_at

Timestamp when the entity was added to the system by the user

integer

Exact filter entities by the creation timestamp

created_at[]
Array<integer>

Exact and range filter entities by the creation timestamps

chars_count
integer
>= 1

Range filter SMS by the message chars count

chars_count[]
Array<integer>

Exact and range filter SMS by the message chars count

parts_count

Count of the SMS parts (concatenated messages)

integer
>= 1

Exact filter SMS by the message parts count

parts_count[]
Array<integer>

Exact and range filter SMS by the message parts count

bulk

Unique entity UUID

string
/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

Exact filter SMS by the Bulk

bulk[]
Array<string>

Exact and range filter SMS by the Bulk

source
integer

Exact filter SMS by the sources

source[]
Array<integer>

Exact and range filter SMS by the sources

text

The message text can have a length of up to 1530 characters. With a Unicode SMS, the maximum character length is reduced to 670 characters. Internal encoding is UTF-8.

string

Partial case-insensitive text filter SMS by the message text

phone
string
>= 1 characters <= 16 characters /^\+?[0-9]{1,15}$/

Partial text filter SMS by the phone number

sender_id

Sender-ID of the message. Can be a number (up to 15 digits) or a text (up to 11 character). In case of a number please use preferentially E.164 phone number format. A sender of text may contain spaces but no other special characters. Please note that some countries do not support own sender IDs or do require pre-registration. Our system automatically tries to detect whether a sender ID is a text or a phone number. Avoid special characters in a number and enter it the same way as it would be dialed on a phone.

For voice messages (text2speech, text2speech_ssml): if sender_id does not conform to E.164 format (e.g., missing leading +, non-digit characters), the message will be sent from the system default number +493075435114. Some downstream telephony providers may override or not respect the user-defined sender number — the actual caller ID presented to the recipient depends on provider capabilities.

string
/^(\+?[1-9]\d{0,14}|[a-zA-Z0-9 ]{1,11})$/

Partial text case-insensitive filter SMS by the sender number or text

ip

IP address of the host which sent request

string format: ipv4
Example
192.168.1.1

Partial text filter SMS by the IP which created the message

key_id

API key identifier

integer
>= 1

Exact filter entities by the used API key

key_id[]
Array<integer>

Exact filter entities by the used API keys

callback_data

String which will be send back to your endpoint. E.g. it can be usable to pass your system message id.

string | null
<= 36 characters

Exact filter SMS by callback_data property

callback_data[]
Array<string | null>

Exact filter SMS by callback_data property

Count of the canceled SMS

Media type application/json

Batch cancel operation response

object
deleted_sms_count

Count of the SMS which was canceled

integer
Example generated
{
"deleted_sms_count": 1
}

Invalid input

Client ID or API key isn’t active or invalid!

Account isn’t activated. Please wait or contact to support!

The request was well-formed but was unable to be followed due to semantic errors

IP address was temporary blocked, because during short time from it was sent many request with invalid credentials. Please wait and try later.

Code Samples

curl -X POST https://api.lox24.eu/sms/ops/batch_cancel?uuid=20f39273-0566-11ea-a637-96000028b339 \
-H 'X-LOX24-AUTH-TOKEN: 1234567:e3f3a759b6677959b6ebfcxxxxxxxxxx'