curl --request POST \
--url https://api.notifique.dev/v1/chat/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": "clxxapp...",
"to": [
"cnv_xxxxx"
],
"type": "text",
"payload": {
"message": "Hi Alice, your order is out for delivery."
},
"senderExternalUserId": "agent:clxxuser...",
"clientMessageId": "msg_text_001"
}
'{
"success": true,
"data": {
"id": "clxxmsg...",
"conversationId": "cnv_xxxxx",
"type": "TEXT",
"body": "Oi, Alice",
"createdAt": "2023-11-07T05:31:56Z",
"senderId": "<string>",
"mediaUrl": null,
"replyToId": "<string>",
"clientMessageId": "msg_text_001",
"deletedAt": "2023-11-07T05:31:56Z",
"sender": {
"id": "<string>",
"externalUserId": "user_alice",
"name": "<string>",
"kind": "USER"
}
},
"idempotent": true
}{
"success": false,
"error": "<string>",
"code": "<string>",
"message": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>",
"message": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>",
"message": "<string>"
}Messages
Send message
Same PIV1 contract as other channels: from (Chat App), to (conversation id), type, and payload. With API Key, senderExternalUserId is required. Scope: chat:messages:send. 1 CHAT_MESSAGE credit.
POST
/
v1
/
chat
/
messages
curl --request POST \
--url https://api.notifique.dev/v1/chat/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": "clxxapp...",
"to": [
"cnv_xxxxx"
],
"type": "text",
"payload": {
"message": "Hi Alice, your order is out for delivery."
},
"senderExternalUserId": "agent:clxxuser...",
"clientMessageId": "msg_text_001"
}
'{
"success": true,
"data": {
"id": "clxxmsg...",
"conversationId": "cnv_xxxxx",
"type": "TEXT",
"body": "Oi, Alice",
"createdAt": "2023-11-07T05:31:56Z",
"senderId": "<string>",
"mediaUrl": null,
"replyToId": "<string>",
"clientMessageId": "msg_text_001",
"deletedAt": "2023-11-07T05:31:56Z",
"sender": {
"id": "<string>",
"externalUserId": "user_alice",
"name": "<string>",
"kind": "USER"
}
},
"idempotent": true
}{
"success": false,
"error": "<string>",
"code": "<string>",
"message": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>",
"message": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>",
"message": "<string>"
}Authorizations
ntfChatBearerAuthntfChatApiKeyHeader
API Key sk_live_… / sk_test_… ou JWT do usuário do chat (eyJ…).
Body
application/json
Chat App id. If set, it must match the conversation.
Example:
"clxxapp..."
Conversation id (string or list).
Example:
"cnv_xxxxx"
Available options:
text, image, audio, file Example:
"text"
PIV1 content. Text in message; media in mediaUrl (HTTPS).
Show child attributes
Show child attributes
Required with API Key. externalUserId of a USER or AGENT.
Example:
"user_alice"
Example:
"msg_001"
Legacy. Prefer payload.message.
Legacy. Prefer payload.mediaUrl.
Was this page helpful?

