Skip to content

Send message

POST /api/outbound/send

Queues an outbound message to the given channel (WhatsApp, Instagram, Messenger). On WhatsApp, to accepts an E.164 phone number without + or a BSUID (US.… / US.ENT.…); Neike detects the format and routes it to the right Cloud API field (error 131062 = the message does not support BSUID recipients). Answers 202 and the result arrives through the status webhook. Requires the messages:send scope.

FieldTypeDescription
channelIdstringrequiredchannel_id of the connected channel (nk_ prefix). Example: "nk_dvzobn7m4h4y".
tostringrequiredRecipient. On WhatsApp, a phone number in E.164 format without +, or a BSUID (US.13491208655302741918 / parent US.ENT.…): Neike detects the format and routes it to the right Cloud API field. On Messenger it is the contact’s PSID and on Instagram their IGSID, both exactly as they arrive in the incoming webhook. Example: "5491112345678".
typetext · image · video · audio · document · file · template · interactive · reactionrequiredMessage type. text and the media types (image, video, audio, document) work on all three platforms. The rest do not: template and interactive are exclusive to WhatsApp, reaction is available on WhatsApp and Instagram but not on Messenger, and file is available on Instagram and Messenger but not on WhatsApp. Sending a type that the channel’s platform does not support returns 400 with the list of the supported ones. Any letter case and surrounding spaces are accepted: Neike normalizes it to lowercase before sending. Example: "text".
contentobjectrequiredContent according to type. text → { text }; media → { [type]: { link|id, caption?, filename? } } (on Instagram and Messenger, { [type]: { url } }); WhatsApp voice note → { audio: { link, voice: true } } (mono OGG/OPUS served as audio/ogg, no caption); template → { template: {...} }; interactive → { interactive: {...} }; reaction → { reaction: { message_id, emoji } }. Example: {"text":"Hello, this is a test message"}.
humanAgentbooleanoptionalInstagram and Messenger: adds the HUMAN_AGENT tag, which extends the 24-hour reply window to 7 days. Only for messages written by a person, never automated. WhatsApp ignores it. Example: false.
StatusDescriptionSchema
202Message queued.SendMessageResponseDto
429You exceeded the request limit of your API key or account. Wait Retry-After seconds.—
Terminal window
curl -X POST https://api.neike.dev/api/outbound/send \
-H "x-neike-api-key: whk_live_…" \
-H "Content-Type: application/json" \
-d '{
"channelId": "nk_dvzobn7m4h4y",
"to": "5491112345678",
"type": "text",
"content": {
"text": "Hello, this is a test message"
}
}'
FieldTypeDescription
okbooleanrequiredtrue if the message was queued successfully. Example: true.
jobIdstringoptionalJob id in the outbound queue. Example: "outbound_nk_dvzobn7m4h4y_1712345678901".
reasonstringoptionalReason, when ok=false.