Pular para o conteúdo

Create the Bulk

POST
/bulks

Create a bulk SMS campaign by sending a POST request with message details and recipient information.

The new bulks resource

Media type application/json
Any of:

Bulk SMS creation request payload

object
delivery_at
One of:

Timestamp de entrega programada

integer
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.

Para mensagens de voz (text2speech, text2speech_ssml): se sender_id não estiver em conformidade com o formato E.164 (por exemplo, sem o prefixo +, contendo caracteres não numéricos), a mensagem será enviada a partir do número padrão do sistema +493075435114. Alguns provedores de telefonia downstream podem substituir ou não respeitar o número de remetente definido pelo usuário — o identificador de chamada real apresentado ao destinatário depende das capacidades do provedor.

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

Max text length is 1785 character. But don’t forget that the final 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
<= 1785 characters
phones
required

List of the recipients (international) numbers:

  • +491701234567 (E.164)
  • 00491701234567
  • 491701234567
  • 01701234567 (if the account is registered in Germany) will be convert to +491701234567

If the number is not in an E.164 format then the service will convert it based on user’s address. To avoid problems with the converting please use E.164 preferentially.

array | null
msg_groups

List of the recipients groups

array | null
is_unicode

True se a mensagem contém caracteres Unicode, False caso contrário

boolean | null
service_code
One of:

Código de serviço ou gateway

Allowed values: direct text2speech text2speech_ssml
source

Fonte ou origem da mensagem

integer | null
voice_lang

Idioma da mensagem de voz. Valores possíveis: null (detecção automática) ou um dos seguintes: EN (inglês), DE (alemão), FR (francês), IT (italiano), ES (espanhol), PL (polaco), NL (neerlandês), RO (romeno), PT (português), CS (checo), HU (húngaro), SV (sueco), DA (dinamarquês), FI (finlandês), SK (eslovaco), HR (croata), TR (turco), RU (russo), BG (búlgaro), UK (ucraniano).

string | null
Allowed values: EN DE FR IT ES PL NL RO PT CS HU SV DA FI SK HR TR RU BG UK
is_text_deleted
One of:

True se o texto da mensagem foi excluído, False caso contrário

boolean
Examples
Example example_bulks_request

Create bulk with static text and phones

Example of creating a bulk with static text to multiple phone numbers

{
"sender_id": "testbulk",
"text": "Hello! This is a test bulk message.",
"phones": [
"+49751234567",
"+49751234568",
"+49751234569"
],
"service_code": "direct"
}

Bulks resource created

Bulk SMS details (JSON-LD)

object
@id

JSON-LD ID

string
@type

JSON-LD type

string
@context
One of:
string
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}$/
delivery_at

Timestamp de entrega programada

integer
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.

Para mensagens de voz (text2speech, text2speech_ssml): se sender_id não estiver em conformidade com o formato E.164 (por exemplo, sem o prefixo +, contendo caracteres não numéricos), a mensagem será enviada a partir do número padrão do sistema +493075435114. Alguns provedores de telefonia downstream podem substituir ou não respeitar o número de remetente definido pelo usuário — o identificador de chamada real apresentado ao destinatário depende das capacidades do provedor.

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

Max text length is 1785 character. But don’t forget that the final 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
<= 1785 characters
phones

List of the recipients (international) numbers:

  • +491701234567 (E.164)
  • 00491701234567
  • 491701234567
  • 01701234567 (if the account is registered in Germany) will be convert to +491701234567

If the number is not in an E.164 format then the service will convert it based on user’s address. To avoid problems with the converting please use E.164 preferentially.

array | null
msg_groups

List of the recipients groups

array | null
status_code

Bulk’s status:

  • 0 - new and not processed
  • 5 - bulks in progress
  • 10 - bulks was successfully processed
  • 15 - bulk’s processing was canceled by the user
  • 20 - system error
  • 201 - error: no recipients found
integer
Allowed values: 0 5 10 15 20 201
msg_total_count

Count of the messages created by the bulk

integer
created_at

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

integer
processed_at

Timestamp of last changes

integer | null
ip

IP address of the host which sent request

string format: ipv4
is_unicode

True se a mensagem contém caracteres Unicode, False caso contrário

boolean | null
is_dryrun

Type of the bulk ‘dryrun’ or not

boolean
service_code

Código de serviço ou gateway

Allowed values: direct text2speech text2speech_ssml
key_id

Identificador da chave API

integer
>= 1
source

Fonte ou origem da mensagem

integer | null
voice_lang

Idioma da mensagem de voz. Valores possíveis: null (detecção automática) ou um dos seguintes: EN (inglês), DE (alemão), FR (francês), IT (italiano), ES (espanhol), PL (polaco), NL (neerlandês), RO (romeno), PT (português), CS (checo), HU (húngaro), SV (sueco), DA (dinamarquês), FI (finlandês), SK (eslovaco), HR (croata), TR (turco), RU (russo), BG (búlgaro), UK (ucraniano).

string | null
Allowed values: EN DE FR IT ES PL NL RO PT CS HU SV DA FI SK HR TR RU BG UK
is_text_deleted

True se o texto da mensagem foi excluído, False caso contrário

boolean
msg_total_cost

Cost of the messages created by the bulk

number
Examples
Example example_bulks_response_post

Bulk created (JSON-LD)

Example response for POST /bulks with Accept: application/ld+json

{
"@context": "/contexts/Bulk",
"@id": "/bulks/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"@type": "Bulk",
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"delivery_at": 0,
"sender_id": "testbulk",
"text": "Hello! This is a test bulk message.",
"phones": [
"+49751234567",
"+49751234568",
"+49751234569"
],
"msg_groups": [
7116,
7117
],
"status_code": 10,
"msg_total_count": 1000,
"created_at": 1755868416,
"processed_at": 1755868500,
"ip": "10.1.1.1",
"is_unicode": false,
"is_dryrun": false,
"service_code": "direct",
"key_id": 8291,
"source": 0,
"voice_lang": null,
"is_text_deleted": false,
"msg_total_cost": 56
}

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

O endereço IP foi bloqueado temporariamente, pois durante um curto período de tempo foram enviadas várias solicitações com credenciais inválidas. Aguarde e tente mais tarde.

Code Samples

#!/usr/bin/env bash
curl -X POST https://api.lox24.eu/bulks \
-H 'Content-Type: application/json' \
-H 'X-LOX24-AUTH-TOKEN: 1234567:e3f3a759b6677959b6ebfcxxxxxxxxxx' \
-d '{
"sender_id": "testbulk",
"text": "test bulk text",
"service_code": "direct",
"phones": ["+49751234567"],
"msg_groups": [7117],
"delivery_at": 1573724611,
"is_unicode": true,
"source": 1234,
"voice_lang": "DE"
}'