Skip to content

Send Message

POST
/platform/v1/messages
curl --request POST \
--url https://example.com/platform/v1/messages \
--header 'Content-Type: application/json' \
--header 'X-API-Key: example' \
--data '{ "channel_id": 1, "components": [ { "parameters": [ { "parameter_name": "example", "text": "example", "type": "text" } ], "type": "header" } ], "contacts": [ "example" ], "context": {}, "interactive": {}, "language_code": "es", "location": {}, "media": { "caption": "example", "filename": "example", "id": "example", "link": "example", "voice": false }, "preview_url": false, "reaction": {}, "template_name": "example", "text": "example", "to": "example", "type": "text" }'

Send a WhatsApp/Instagram message via the developer’s platform channel.

Idempotency-Key
Any of:
string
X-API-Key
required
X-Api-Key
string
Media type application/json
PlatformSendRequest

Body for POST /platform/v1/messages.

type=texttext required, template_name ignored. type=templatetemplate_name required, WhatsApp channels only. type=image|video|audio|document|stickermedia required. type=interactive / cataloginteractive required (passthrough). type=locationlocation required. type=contactscontacts required. type=reactionreaction required. type=typing → no body field required (just channel_id + to).

Reply-to and link preview:

  • context.message_id injects a reply-to context into the Meta payload (text/media — WA + IG native).
  • preview_url enables WhatsApp link preview for type=text (IG ignores).
object
channel_id
required
Channel Id
integer
components
Any of:
Array
One of: discriminator: type
PlatformSendHeaderComponent

header — fills the template’s HEADER placeholder(s).

object
parameters
required
Parameters
Array
>= 1 items
One of: discriminator: type
PlatformSendTextParameter

text — the only parameter kind that fills a NAMED body placeholder.

object
parameter_name
Any of:
string
text
required
Text
string
type
required
Type
string
Allowed value: text
type
required
Type
string
Allowed value: header
contacts
Any of:
Array
context
Any of:
object
key
additional properties
any
interactive
Any of:
object
key
additional properties
any
language_code
Language Code
string
default: es
location
Any of:
object
key
additional properties
any
media
Any of:
MediaSource

Outbound media source for type=image|video|audio|document|sticker.

Exactly one of link (public URL) XOR id (a media_id from the future POST /platform/v1/media upload endpoint, WF3). Validator enforces the XOR.

Per-type field semantics:

  • caption — image/video/document only (Meta drops it on audio/sticker).
  • filename — document only; WhatsApp REQUIRES it when sending by link.
  • voice — audio only; WA-specific OGG/OPUS voice note (IG ignores).
object
caption
Any of:
string
<= 1024 characters
filename
Any of:
string
<= 255 characters
id
Any of:
string
<= 255 characters
link
Any of:
string
<= 2048 characters
voice
Voice
boolean
preview_url
Preview Url
boolean
reaction
Any of:
object
key
additional properties
any
template_name
Any of:
string
text
Any of:
string
<= 4096 characters
to
required
To
string
>= 1 characters <= 64 characters
type
Type
string
default: text
Allowed values: text template image video audio document sticker interactive location contacts reaction typing catalog

Successful Response

Media type application/json
PlatformSendResponse

Response for POST /platform/v1/messages.

object
channel_id
required
Channel Id
integer
message_id
required
Message Id
string
type
required
Type
string
Example generated
{
"channel_id": 1,
"message_id": "example",
"type": "example"
}

Bad request — wa_only (type only supported on WhatsApp) or other validation rejected before any Meta call.

Channel not found or not owned by this developer account.

Unprocessable entity — body shape invalid for the requested type.

Rate limit or template quota exceeded — retry after the window resets.

X-RateLimit-Limit
integer

Total requests permitted in the current window.

X-RateLimit-Remaining
integer

Requests remaining in the current window.

X-RateLimit-Reset
integer

Unix epoch seconds when the window resets.

Upstream Meta API error — structured envelope with Meta’s code / title / message / fbtrace_id for debugging.

Media type application/json
object
error
required
string
fbtrace_id
required
string
nullable
message
required
string
meta_code
required
integer
nullable
meta_subcode
required
integer
nullable
meta_title
required
string
nullable
Example generated
{
"error": "example",
"fbtrace_id": "example",
"message": "example",
"meta_code": 1,
"meta_subcode": 1,
"meta_title": "example"
}