Send message
https://api.flownally.com/v1/messagesSends a message to the customer that recipient points to: an existing conversation, a
contact or a phone number. Choose the sending inbox with GET /inboxes and pass it as
inboxId; it's required for contact and phone recipients. To send a WhatsApp template,
find it with GET /inboxes/{id}/whatsapp/templates; to send a file, upload it first with
POST /media/uploads.The response is 202 Accepted. Poll GET /messages/{id} or
GET /conversations/{id}/messages to follow delivery state when you are not using
webhooks.A send to a conversation whose customer is banned fails with 422
messaging_customer_banned; a send by phone number or channel ID may instead be accepted
and fail later with failureCode customer_banned.While another responder holds the recipient's conversation (shown as activeOwner type
external while its session is open), anything but a WhatsApp template fails with 422
and code messaging_assignment_held_externally, and nothing is sent.
Authorization
- owner
- admin
- agent
Send an outbound message. Conversation and channel recipients require message:create in conversation scope; contact recipients also resolve through contact:read.
Parameters
- Name
Idempotency-Key- Type
- header · string
Client-generated key that makes a message send safe to retry. Use a new unique key for every message; without a key, a retried request can send the message twice.- Keys are scoped to the workspace, not to an API key or a conversation.
- Retrying with the same key and the same request from the same service account or user
returns the original message (same
id) instead of sending it again. - Reusing a key for a different request or sender within 24 hours returns
409with codemessaging_messaging_idempotency_conflict. - After 24 hours, a key whose message was accepted still returns that message and never sends it again, even if the new request has different content.
- After
503with codemessaging_messaging_send_result_pending, retry with the same key.
Body parameters
Send a application/json body. The body is required.
- Name
recipient- Type
- MessageRecipient
- required
- Name
content- Type
- OutboundMessageContent
- required
- Name
expectedContext- Type
- InboxActionContext
- Name
inboxId- Type
- string
Sending inbox ID. Required forcontactandphonerecipients. For aconversationrecipient it's optional and must match the conversation'sinboxId.- Name
contexts- Type
- array<SendMessageContext>
The message this one replies to, in the recipient's conversation. Not supported forphonerecipients, or forcontactrecipients without a conversation in the inbox.
Responses
- 202Message accepted for deliveryapplication/json
- defaultErrorapplication/json
Related schemas
- ProblemDetails
- FieldViolation
- Window
- CreateMessageRequest
- InboxActionContext
- MessageRecipient
- ConversationRecipient
- ContactRecipient
- PhoneRecipient
- OutboundMessageContent
- TextMessageContent
- TextContent
- MediaMessageContent
- Content
- TemplateMessageContent
- WhatsAppTemplateContent
- TemplateComponent
- TemplateParameter
- Parameter
- CurrencyParameter
- DateTimeParameter
- RichMessageContent
- RichMessage
- Card
- CardHeader
- CardBody
- CardFooter
- CardAction
- WhatsAppFlowAction
- WhatsAppMessageContent
- WhatsAppContent
- WhatsAppRequestContactInfoContent
- SendMessageContext
- MessageContextMessageReference
- SendMessageResponse
- Message
- MessageContent
- FormResponseMessageContent
- FormResponseContent
- LocationMessageContent
- LocationContent
- InteractiveReplyMessageContent
- InteractiveReplyContent
- SystemMessageContent
- SystemContent
- Reaction
- MessageContext
- MessageContextReference
- MessageContextResourceReference
- MessageContextUnavailableReference
- ExternalResourceSnapshot
- Conversation
- ConversationOwner
- ConversationBan
- ConversationBanActor
Generated from the API spec.