Skip to content

Send a WhatsApp message (template, text, image, document, location, buttons or list) to an E.164 number (credentials.manage, or an API key with whatsapp.send).

POST
/v1/connections/whatsapp/{conn}/send
curl --request POST \
--url https://api.replifier.com/v1/connections/whatsapp/pcn_01hx0000000000000000000000/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "to": "example", "campaignId": "example", "brandId": "example", "contactId": "example", "type": "template", "templateName": "example", "languageCode": "example", "components": [ "example" ] }'

Templates can be sent at any time. Every other type needs the 24-hour window opened by the recipient’s last message (422 whatsapp_window_closed otherwise). An API key must send the Idempotency-Key header (400 idempotency_key_required): a retry with the same key returns the stored response and never sends twice. Limits: per API key (120 messages per minute) and per number, following the Meta messaging tier (429 with Retry-After).

conn
required
string
/^pcn_[a-z0-9]{26}$/

Example

pcn_01hx0000000000000000000000
idempotency-key

Required when authenticating with an API key. Unique per message (for example a UUID).

string
>= 1 characters <= 255 characters

Required when authenticating with an API key. Unique per message (for example a UUID).

Media typeapplication/json
Any of:
object
to
required
string
>= 1 characters <= 32 characters
campaignId
string
brandId
string
contactId
string
type
string
Allowed values: template
templateName
required
string
>= 1 characters
languageCode
required
string
>= 2 characters <= 10 characters
components
Array

Send result

Media typeapplication/json
object
ok
required
boolean
providerMessageId
string
providerCode
string
providerMessage
string

Example generated

{
"ok": true,
"providerMessageId": "example",
"providerCode": "example",
"providerMessage": "example"
}

Invalid data

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

No session, expired session, or invalid, expired or revoked API key

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Not allowed, API key missing the scope, IP not allowed, or request rejected (csrf_rejected)

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Does not exist or is not visible to you

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Conflict

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Too many attempts

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Internal error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}