Skip to main content
POST

Authorizations

apiKey
string
header
required

API key from Settings → API keys.

apiSecret
string
header
required

Secret shown once when the API key is created.

Path Parameters

accountId
string
required

Your Gallabox account ID. Must be the API key's own account. A 24-character hexadecimal ID.

Pattern: ^[a-fA-F0-9]{24}$
Example:

"6650a1b2c3d4e5f6a7b8c9d0"

mode
enum<string>
required

sync waits until the message is created and returns its id; async queues it and returns at once.

Available options:
sync,
async

Query Parameters

checkActiveSession
boolean

Applies to non-template messages in sync mode only. When true, the request fails with 422 if more than 24 hours have passed since the contact last wrote to this number. Ignored in async mode.

checkOptIn
boolean

Applies to template messages. When true, a template to a contact who has not opted in is refused: sync returns 421; in async mode the message is not sent.

Body

application/json
channelId
string
required

A 24-character hexadecimal ID.

Pattern: ^[a-fA-F0-9]{24}$
Example:

"6650a1b2c3d4e5f6a7b8c9d0"

recipient
object
required

Who to send to. Give phone or identifier. A new contact is created if none exists.

whatsapp
object
required

Set type and the object of the same name.

localMessageId
string

Your own reference for this message, returned in async responses and webhooks.

botId
string

Hand the conversation to this bot; the contact's reply goes to it.

Pattern: ^[a-fA-F0-9]{24}$
Example:

"6650a1b2c3d4e5f6a7b8c9d0"

context
object
replyTo
object

Who handles the contact's reply.

retryConfig
object

Retry the message if WhatsApp refuses it with error 131049 (Meta's per-user marketing limit) or a rate limit. smart: Gallabox picks retry times until maxDate. manual: retry at the times you list.

Response

The message was accepted. sync returns the Gallabox message id; async returns the localMessageId (yours, or one Gallabox generated). warnings lists anything in the request that was ignored.

For WhatsApp, running out of message credits doesn't fail the request. The message is saved but not sent: its status becomes error with error code 1044 (Insufficient message credits). Check it with the message status endpoint.

id
string

A 24-character hexadecimal ID.

Pattern: ^[a-fA-F0-9]{24}$
Example:

"6650a1b2c3d4e5f6a7b8c9d0"

localMessageId
string
status
enum<string>
Available options:
ACCEPTED
message
string
warnings
any[]