Skip to content

Create the Bulk

POST
/bulks

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

#!/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"
}'

The new bulks resource

One of:
object
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

Bulks resource created

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

Scheduled delivery timestamp

integer
sender_id

Sender ID or phone number

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
Example
192.168.1.1
is_unicode

True if message contains Unicode characters, False otherwise

boolean | null
is_dryrun

Type of the bulk ‘dryrun’ or not

boolean
service_code

Service or gateway code

Allowed values: direct text2speech text2speech_ssml
key_id

API key identifier

integer
>= 1
source

Message source or origin

integer | null
voice_lang

Voice message language. Possible values: null (auto-detection) or one of: EN (English), DE (German), FR (French), IT (Italian), ES (Spanish), PL (Polish), NL (Dutch), RO (Romanian), PT (Portuguese), CS (Czech), HU (Hungarian), SV (Swedish), DA (Danish), FI (Finnish), SK (Slovak), HR (Croatian), TR (Turkish), RU (Russian), BG (Bulgarian), UK (Ukrainian).

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 if message text was deleted, False otherwise

boolean
msg_total_cost

Cost of the messages created by the bulk

integer

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.