Skip to main content
WhatsApp endpoints let you read the organization’s connected sender accounts and send a single ad-hoc message to a lead — immediately, outside the sequence engine. Sent messages thread into the lead’s inbox conversation. Every endpoint on this page operates inside the calling organization’s tenant — you cannot read or write WhatsApp accounts or messages from another organization with the same key.

List WhatsApp accounts

GET /whatsapp/accounts
Scope: whatsapp:read. Lists the organization’s connected WhatsApp sender accounts. Use the returned id as the whatsappAccountId when creating a WhatsApp sequence or sending a message.

Request

curl https://panel.flowestate.app/api/v1/whatsapp/accounts \
  -H "Authorization: Bearer fe_k_your_key_here"

Response 200

{
  "data": [
    {
      "id": "uuid",
      "accountType": "organization",
      "phoneNumber": "+18095551234",
      "status": "connected",
      "memberId": null
    },
    {
      "id": "uuid",
      "accountType": "member",
      "phoneNumber": "+18095555678",
      "status": "connected",
      "memberId": "uuid"
    }
  ]
}
FieldTypeNotes
idstring (uuid)The account id. Pass it as whatsappAccountId.
accountTypeenumorganization (the org-global account) or member (a member’s account).
phoneNumberstring | nullThe connected sender number, or null if not yet provisioned.
statusstringAlways connected — only connected accounts are returned.
memberIdstring (uuid) | nullThe owning member for member accounts; null for the org-global account.

Send a WhatsApp message

POST /whatsapp/send
Scope: whatsapp:write. Sends a one-off WhatsApp message to a single lead immediately — outside the sequence engine. The message is sent from the given account and threads into the lead’s inbox conversation.
This costs 1 monthly unit against your quota, like any ordinary request. See Rate limits.

Request body

FieldTypeNotes
leadIdstring (uuid)Required. The lead to message. Must belong to your organization and have a valid phone number.
whatsappAccountIdstring (uuid)Required. The sending account id, from GET /whatsapp/accounts.
messagestringRequired, 1..4096 chars. When media is present, this is used as the media caption.
mediaobjectOptional. { url (https string), type, mimetype? (string), fileName? (string) }, where type is one of WhatsappMediaType: image, video, document.

Request

curl -X POST https://panel.flowestate.app/api/v1/whatsapp/send \
  -H "Authorization: Bearer fe_k_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "leadId": "uuid",
    "whatsappAccountId": "uuid",
    "message": "Hi! Here is the brochure you asked about.",
    "media": {
      "url": "https://cdn.example.com/brochure.pdf",
      "type": "document",
      "mimetype": "application/pdf",
      "fileName": "brochure.pdf"
    }
  }'

Response 200

{ "messageId": "..." }

Common errors

  • 404 NOT_FOUND — the lead does not exist or belongs to another organization.
  • 400 OPTED_OUT — the lead opted out of WhatsApp and cannot be messaged.
  • 400 ACCOUNT_UNAVAILABLE — the WhatsApp account was not found or is not connected.
  • 400 BAD_REQUEST — the lead has no valid phone number.
  • 400 VALIDATION_ERROR — invalid body (e.g. empty message, leadId not a UUID, invalid media.type).