PlatformsWhatsApp

WhatsApp

WhatsApp Business Platform numbers through your Meta app, connected with Facebook Login for Business (Embedded Signup).

The permissions each operation needs are in App Review: WhatsApp.

  • The Cloud API keeps no message history and lists no 1:1 conversations, so inbound messages and delivery statuses arrive only as events. The one read is whatsapp.groups.conversations, the groups the number is in.
  • Free-form text sends are accepted only inside WhatsApp's 24-hour customer service window.
  • 1:1 reactions are whatsapp.dm.reactions, one per person per message: updated each time a person sets one, the first included, since WhatsApp does not say which is first, and deleted when they remove it. A reaction the business sends gets a whatsapp.dm.statuses event under a message id the publish does not answer.
  • A person is their business-scoped user id (BSUID, such as US.13491208655302741918): a message's author.externalId, a status's recipient.externalId, and the containerId of a 1:1 conversation, which a send takes. Meta shares the phone number only under conditions, as authorPhoneNumber or recipientPhoneNumber, so never key on it.
  • Group chats are their own surface: whatsapp.groups.messages and whatsapp.groups.statuses, with the group's id as containerId, the participant who sent a message as its author, and the one a status reports for as its recipient. To reply in a group, publish to whatsapp.groups.messages with the message's containerId. whatsapp.groups.conversations lists the groups the number is in and reads one group's participants, each keyed by BSUID; its events carry only the fields a change states, so read the group with get for the rest. Meta opens groups only to Official Business Accounts, and a group message cannot be edited or deleted.
CollectionOperationsEventsBackfill
whatsapp.dm.messagesresolve_attachment, publish, perform_actioncreatedno
whatsapp.dm.reactionspublish, deleteupdated, deletedno
whatsapp.dm.statusesnonecreatedno
whatsapp.groups.messagesresolve_attachment, publish, perform_actioncreatedno
whatsapp.groups.statusesnonecreatedno
whatsapp.groups.conversationslist, get, update, deletecreated, updated, deletedyes

whatsapp.dm.messages

1:1 messages between people and the business number. Inbound messages arrive as events only: the Cloud API keeps no history.

resolve_attachment

Get a URL for a file a WhatsApp message carries. WhatsApp serves the file only to the business, so the URL is a Koil link that streams it from WhatsApp; it expires after five minutes.

FieldTypeRequiredDescription
profileIdstringyesKoil Profile associated with the operation.
externalIdstringyesThe item that carries the file.
attachmentExternalIdstringyesThe attachment's externalId, as the read reported it.
JSON Schema
{
  "type": "object",
  "required": [
    "profileId",
    "externalId",
    "attachmentExternalId"
  ],
  "properties": {
    "profileId": {
      "type": "string",
      "description": "Koil Profile associated with the operation.",
      "minLength": 1
    },
    "externalId": {
      "type": "string",
      "minLength": 1,
      "description": "The item that carries the file."
    },
    "attachmentExternalId": {
      "type": "string",
      "minLength": 1,
      "description": "The attachment's `externalId`, as the read reported it."
    }
  },
  "additionalProperties": false
}

publish

Send a WhatsApp message from the business number to a recipient: inside the 24-hour customer service window, text, or one image, video, audio file, or document with an optional caption, optionally quoting one of their messages; at any time, an approved template, which can start a conversation by phone number.

Submit through POST /v1/publish-requests with collection: "whatsapp.dm.messages". These fields go in the item's args; profileId and variant are item fields.

FieldTypeRequiredDescription
containerIdstringnoThe 1:1 conversation to send into, as a message's containerId names it: the person's business-scoped user id (BSUID), such as US.13491208655302741918, or a parent BSUID (US.ENT.…). A phone number is refused.
recipientPhoneNumberstringnoWith template only, in place of containerId: the person's phone number in E.164, with or without its +, so an authorPhoneNumber read from a message goes back as it came, to start a conversation with a person the business has none with. Their replies and this message's statuses name the conversation by BSUID.
textstringnoCaption/body text for content.
attachmentsobject | object[]noOne image, video, audio file, or document, with text as its caption (up to 1,024 characters; audio takes none). Staged, then fetched by WhatsApp from a URL Koil signs.
targetobjectnoOne thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL.
previewUrlbooleannoRender a link preview for the first URL in the text.
templateobjectnoAn approved message template and the values that fill its variables. Meta accepts a template outside the 24-hour customer service window, so it can start or reopen a conversation.
JSON Schema
{
  "type": "object",
  "required": [],
  "properties": {
    "containerId": {
      "type": "string",
      "minLength": 1,
      "description": "The 1:1 conversation to send into, as a message's `containerId` names it: the person's business-scoped user id (BSUID), such as `US.13491208655302741918`, or a parent BSUID (`US.ENT.…`). A phone number is refused.",
      "pattern": "^[A-Z]{2}\\.(ENT\\.)?[A-Za-z0-9]{1,128}$"
    },
    "recipientPhoneNumber": {
      "type": "string",
      "pattern": "^\\+?[1-9][0-9]{1,14}$",
      "description": "With `template` only, in place of `containerId`: the person's phone number in E.164, with or without its `+`, so an `authorPhoneNumber` read from a message goes back as it came, to start a conversation with a person the business has none with. Their replies and this message's statuses name the conversation by BSUID."
    },
    "text": {
      "type": "string",
      "description": "Caption/body text for content."
    },
    "attachments": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "required": [
              "mediaId"
            ],
            "properties": {
              "mediaId": {
                "type": "string",
                "minLength": 1
              },
              "contentType": {
                "type": "string",
                "minLength": 1
              },
              "altText": {
                "type": "string",
                "minLength": 1
              },
              "filename": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255,
                "description": "The name the recipient sees on a document, where the destination shows one. Defaults to the uploaded file's name."
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "sourceUrl"
            ],
            "properties": {
              "sourceUrl": {
                "type": "string",
                "minLength": 1
              },
              "contentType": {
                "type": "string",
                "minLength": 1
              },
              "altText": {
                "type": "string",
                "minLength": 1
              },
              "filename": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255,
                "description": "The name the recipient sees on a document, where the destination shows one. Defaults to the uploaded file's name."
              }
            },
            "additionalProperties": false
          }
        ]
      },
      "minItems": 1,
      "maxItems": 1,
      "description": "One image, video, audio file, or document, with `text` as its caption (up to 1,024 characters; audio takes none). Staged, then fetched by WhatsApp from a URL Koil signs."
    },
    "target": {
      "type": "object",
      "required": [
        "kind",
        "externalId"
      ],
      "properties": {
        "kind": {
          "enum": [
            "whatsapp.dm.messages"
          ]
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        }
      },
      "additionalProperties": false,
      "description": "One thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL."
    },
    "previewUrl": {
      "type": "boolean",
      "description": "Render a link preview for the first URL in the text."
    },
    "template": {
      "type": "object",
      "required": [
        "name",
        "language"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[a-z0-9_]+$",
          "description": "The approved template's name."
        },
        "language": {
          "type": "string",
          "minLength": 2,
          "description": "The language of the template's translation to send, as WhatsApp codes it: `en_US`, `pt_BR`, `fr`."
        },
        "header": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "text"
            ],
            "properties": {
              "text": {
                "type": "string",
                "minLength": 1,
                "description": "The value."
              },
              "name": {
                "type": "string",
                "pattern": "^[a-z_]+$",
                "description": "The parameter's name, without its braces (`first_name` for `{{first_name}}`), for a template whose parameters are named. Omit it for a positional template, whose values go in order."
              }
            },
            "additionalProperties": false
          },
          "minItems": 1,
          "maxItems": 1,
          "description": "The value of a text header's one variable. Templates with a media header are not supported yet."
        },
        "body": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "text"
            ],
            "properties": {
              "text": {
                "type": "string",
                "minLength": 1,
                "description": "The value."
              },
              "name": {
                "type": "string",
                "pattern": "^[a-z_]+$",
                "description": "The parameter's name, without its braces (`first_name` for `{{first_name}}`), for a template whose parameters are named. Omit it for a positional template, whose values go in order."
              }
            },
            "additionalProperties": false
          },
          "minItems": 1,
          "description": "The values of the body's variables."
        },
        "buttons": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "type",
                  "index",
                  "payload"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "quick_reply"
                  },
                  "index": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9,
                    "description": "The button's zero-based position in the template."
                  },
                  "payload": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Returned as the reply message's `choice.payload` when the person taps the button. Without one, WhatsApp returns the button's label."
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "object",
                "required": [
                  "type",
                  "index",
                  "text"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "url"
                  },
                  "index": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9,
                    "description": "The button's zero-based position in the template."
                  },
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The value of the URL button's one variable, appended to its URL. Percent-encode special characters."
                  }
                },
                "additionalProperties": false
              }
            ]
          },
          "minItems": 1,
          "maxItems": 10,
          "description": "A payload for each quick-reply button that should return one, and the value of each URL button's variable."
        }
      },
      "additionalProperties": false,
      "description": "An approved message template and the values that fill its variables. Meta accepts a template outside the 24-hour customer service window, so it can start or reopen a conversation."
    }
  },
  "additionalProperties": false,
  "anyOf": [
    {
      "required": [
        "text"
      ]
    },
    {
      "required": [
        "attachments"
      ]
    },
    {
      "required": [
        "template"
      ]
    }
  ],
  "if": {
    "required": [
      "recipientPhoneNumber"
    ]
  },
  "else": {
    "required": [
      "containerId"
    ]
  },
  "dependentRequired": {
    "recipientPhoneNumber": [
      "template"
    ]
  },
  "dependentSchemas": {
    "template": {
      "properties": {
        "text": false,
        "attachments": false,
        "target": false,
        "previewUrl": false
      }
    },
    "recipientPhoneNumber": {
      "properties": {
        "containerId": false
      }
    }
  }
}

Media requirements

An asset that meets everything under Copied as is is published exactly as uploaded. Otherwise Koil converts only what misses, a billed media add-on that needs a paid plan. Anything under Refused fails the publish request, since no conversion fixes it.

MediaCopied as isOtherwise convertedRefused
ImageJPEG or PNGre-encoded to JPEGover 5 MB once staged
VideoMP4/MOV, H.264re-encoded to H.264 in MP4over 16 MB once staged
AudioAAC, AMR, MP3, M4A or Ogg—any other format; over 16 MB
DocumentPDF, DOC, DOCX, XLS, XLSX, PPT or PPTX—any other format; over 100 MB

perform_action

Mark a message the person sent, and those before it, as read, showing them a read receipt; typing_on also shows that the business is typing, until it replies or for 25 seconds.

FieldTypeRequiredDescription
profileIdstringyesKoil Profile associated with the operation.
externalIdstringyesThe person's message, as its externalId names it (a wamid), from a created event.
action"seen" | "typing_on"yesWhat to do with the item: seen (show the person a read receipt for their messages), typing_on (show the person that the profile is typing).
JSON Schema
{
  "type": "object",
  "required": [
    "profileId",
    "externalId",
    "action"
  ],
  "properties": {
    "profileId": {
      "type": "string",
      "description": "Koil Profile associated with the operation.",
      "minLength": 1
    },
    "externalId": {
      "type": "string",
      "minLength": 1,
      "description": "The person's message, as its `externalId` names it (a `wamid`), from a `created` event."
    },
    "action": {
      "enum": [
        "seen",
        "typing_on"
      ],
      "description": "What to do with the item: `seen` (show the person a read receipt for their messages), `typing_on` (show the person that the profile is typing).",
      "x-koil-narrows": "ContentAction"
    }
  },
  "additionalProperties": false
}

Not offered

  • list: platform no endpoint
  • get: platform no endpoint
  • update: platform not supported
  • delete: platform not supported
  • perform_action typing_off: platform not supported — WhatsApp has no call that clears the typing indicator; it clears when the business replies or after 25 seconds.

Events

Backfill: not offered — platform no endpoint.

Item schema

What list and get return and what events carry as data.

FieldTypeRequiredDescription
containerIdstringyesThe conversation: the same on every message in it, on reads and events alike, so an inbox groups by it. It is TikTok's conversation id, a WhatsApp group's id, and in a 1:1 chat on Instagram, Facebook or WhatsApp the counterpart's own id, since Meta's messaging webhooks carry no conversation id.
targetobjectnoThe one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to.
referencesobject[]no
textstringnoCaption/body text for content.
authorobjectyesPlatform actor reference for observed content.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
attachmentsunknown | unknown | unknown[]no
choiceobjectnoThe option the person picked instead of typing: a quick reply, a button or a list row a message offered, or one of the account's ice breakers. Its label is the message's text, and the message that offered it is target where the platform names it. Present where the platform reports the tap, which on Instagram and Messenger is the message's event only: a read of the same message returns its text without choice. Absent too when the platform withholds the payload (Meta sends a postback's payload only to the app that sent the button), so such a tap reads as typed text.
publishedAtstring (date-time)noWhen the platform published it.
externalIdstringyesPlatform-owned content identifier.
variant"text" | "image" | "video" | "audio" | "document" | "sticker" | "location" | "contacts" | "interactive" | "button" | "referral" | "order" | "system" | "unsupported" | "other"yesThe Cloud API message type. Media types carry one attachments entry; location carries location; unsupported is a type the Cloud API cannot deliver (e.g. a poll); other is a type Meta added that Koil does not model yet.
authorPhoneNumberstringnoThe person's phone number in E.164 digits, present only when Meta shares it: when the business messaged or called that number, or was messaged or called from it, in the last 30 days, or has it in its contacts. Never a key: it can be absent on one message and present on the next, so identify the person by their BSUID.
locationobjectnoGeographic place reference for content.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"whatsapp.dm.messages"yesThe collection that delivered this item.

whatsapp.dm.reactions

People's reactions to the business number's 1:1 messages, and the business's own reactions to theirs. Inbound reactions arrive as events only: the Cloud API keeps no history.

publish

React to a person's message as the business number. Meta accepts a reaction to a message older than 30 days, deleted, or itself a reaction, and then does not deliver it.

Submit through POST /v1/publish-requests with collection: "whatsapp.dm.reactions". These fields go in the item's args; profileId and variant are item fields.

FieldTypeRequiredDescription
containerIdstringyesThe 1:1 conversation to send into, as a message's containerId names it: the person's business-scoped user id (BSUID), such as US.13491208655302741918, or a parent BSUID (US.ENT.…). A phone number is refused.
targetobjectyesThe message to react to: one the person sent in the last 30 days.
emojistringyesThe emoji reacted with, as the platform sent it.
JSON Schema
{
  "type": "object",
  "required": [
    "containerId",
    "target",
    "emoji"
  ],
  "properties": {
    "containerId": {
      "type": "string",
      "minLength": 1,
      "description": "The 1:1 conversation to send into, as a message's `containerId` names it: the person's business-scoped user id (BSUID), such as `US.13491208655302741918`, or a parent BSUID (`US.ENT.…`). A phone number is refused.",
      "pattern": "^[A-Z]{2}\\.(ENT\\.)?[A-Za-z0-9]{1,128}$"
    },
    "target": {
      "type": "object",
      "required": [
        "kind",
        "externalId"
      ],
      "properties": {
        "kind": {
          "enum": [
            "whatsapp.dm.messages"
          ]
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        }
      },
      "additionalProperties": false,
      "description": "The message to react to: one the person sent in the last 30 days."
    },
    "emoji": {
      "type": "string",
      "minLength": 1,
      "description": "The emoji reacted with, as the platform sent it."
    }
  },
  "additionalProperties": false
}

delete

Remove the business number's own reaction.

FieldTypeRequiredDescription
profileIdstringyesKoil Profile associated with the operation.
containerIdstringyesThe 1:1 conversation to send into, as a message's containerId names it: the person's business-scoped user id (BSUID), such as US.13491208655302741918, or a parent BSUID (US.ENT.…). A phone number is refused.
externalIdstringyesThe business number's own reaction, as a publish answered it: {phone number id}:{message id}.
JSON Schema
{
  "type": "object",
  "required": [
    "profileId",
    "containerId",
    "externalId"
  ],
  "properties": {
    "profileId": {
      "type": "string",
      "description": "Koil Profile associated with the operation.",
      "minLength": 1
    },
    "containerId": {
      "type": "string",
      "minLength": 1,
      "description": "The 1:1 conversation to send into, as a message's `containerId` names it: the person's business-scoped user id (BSUID), such as `US.13491208655302741918`, or a parent BSUID (`US.ENT.…`). A phone number is refused.",
      "pattern": "^[A-Z]{2}\\.(ENT\\.)?[A-Za-z0-9]{1,128}$"
    },
    "externalId": {
      "type": "string",
      "minLength": 1,
      "description": "The business number's own reaction, as a publish answered it: `{phone number id}:{message id}`."
    }
  },
  "additionalProperties": false
}

Not offered

  • list: platform no endpoint
  • get: platform no endpoint
  • resolve_attachment: not applicable
  • update: not applicable — Publishing a reaction again replaces the business's reaction to that message.
  • perform_action: not applicable

Events

Backfill: not offered — platform no endpoint.

Item schema

What list and get return and what events carry as data.

FieldTypeRequiredDescription
targetobjectyesThe message reacted to.
containerIdstringyesThe 1:1 conversation of the message reacted to: the person's BSUID, as its messages' containerId names it.
emojistringnoThe emoji reacted with, as the platform sent it.
authorobjectyesPlatform actor reference for observed content.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
publishedAtstring (date-time)noWhen the platform published it.
externalIdstringyesPlatform-owned content identifier.
authorPhoneNumberstringnoThe person's phone number in E.164 digits, present only when Meta shares it: when the business messaged or called that number, or was messaged or called from it, in the last 30 days, or has it in its contacts. Never a key: it can be absent on one message and present on the next, so identify the person by their BSUID.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"whatsapp.dm.reactions"yesThe collection that delivered this item.

whatsapp.dm.statuses

Delivery and read statuses of messages the number sent. Events only.

Not offered

  • list: platform no endpoint
  • get: not applicable
  • resolve_attachment: not applicable
  • publish: not applicable
  • update: not applicable
  • perform_action: not applicable
  • delete: not applicable

Events

Backfill: not offered — platform no endpoint.

Item schema

What list and get return and what events carry as data.

FieldTypeRequiredDescription
externalIdstringyesPlatform-owned content identifier.
containerIdstringyesThe conversation of the message this status reports on: the recipient's business-scoped user id (BSUID), as that conversation's messages name it.
targetobjectyesThe outbound message this status reports on, by the externalId its publish request returned.
status"sent" | "delivered" | "read" | "played" | "failed" | "other"yesThe delivery state this status reports. other is a state Meta added that Koil does not model yet.
recipientobjectyesPlatform actor reference for observed content.
recipientPhoneNumberstringnoThe person's phone number in E.164 digits, present only when Meta shares it: when the business messaged or called that number, or was messaged or called from it, in the last 30 days, or has it in its contacts. Never a key: it can be absent on one message and present on the next, so identify the person by their BSUID.
occurredAtstring (date-time)no
conversationobjectno
pricingobjectno
errorsobject[]no
callbackDatastringno
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"whatsapp.dm.statuses"yesThe collection that delivered this item.

whatsapp.groups.messages

Messages in WhatsApp groups the business number is in. Inbound messages arrive as events only: the Cloud API keeps no history.

resolve_attachment

Get a URL for a file a WhatsApp group message carries. WhatsApp serves the file only to the business, so the URL is a Koil link that streams it from WhatsApp; it expires after five minutes.

FieldTypeRequiredDescription
profileIdstringyesKoil Profile associated with the operation.
externalIdstringyesThe item that carries the file.
attachmentExternalIdstringyesThe attachment's externalId, as the read reported it.
JSON Schema
{
  "type": "object",
  "required": [
    "profileId",
    "externalId",
    "attachmentExternalId"
  ],
  "properties": {
    "profileId": {
      "type": "string",
      "description": "Koil Profile associated with the operation.",
      "minLength": 1
    },
    "externalId": {
      "type": "string",
      "minLength": 1,
      "description": "The item that carries the file."
    },
    "attachmentExternalId": {
      "type": "string",
      "minLength": 1,
      "description": "The attachment's `externalId`, as the read reported it."
    }
  },
  "additionalProperties": false
}

publish

Send a WhatsApp message from the business number into a group: text, or one image, video, audio file, or document with an optional caption, optionally quoting one of its messages.

Submit through POST /v1/publish-requests with collection: "whatsapp.groups.messages". These fields go in the item's args; profileId and variant are item fields.

FieldTypeRequiredDescription
containerIdstringyesThe group to send into, as a message's containerId names it: the group's id.
textstringnoCaption/body text for content.
attachmentsobject | object[]noOne image, video, audio file, or document, with text as its caption (up to 1,024 characters; audio takes none). Staged, then fetched by WhatsApp from a URL Koil signs.
targetobjectnoOne thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL.
previewUrlbooleannoRender a link preview for the first URL in the text.
JSON Schema
{
  "type": "object",
  "required": [
    "containerId"
  ],
  "properties": {
    "containerId": {
      "type": "string",
      "minLength": 1,
      "description": "The group to send into, as a message's `containerId` names it: the group's id."
    },
    "text": {
      "type": "string",
      "description": "Caption/body text for content."
    },
    "attachments": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "required": [
              "mediaId"
            ],
            "properties": {
              "mediaId": {
                "type": "string",
                "minLength": 1
              },
              "contentType": {
                "type": "string",
                "minLength": 1
              },
              "altText": {
                "type": "string",
                "minLength": 1
              },
              "filename": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255,
                "description": "The name the recipient sees on a document, where the destination shows one. Defaults to the uploaded file's name."
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "sourceUrl"
            ],
            "properties": {
              "sourceUrl": {
                "type": "string",
                "minLength": 1
              },
              "contentType": {
                "type": "string",
                "minLength": 1
              },
              "altText": {
                "type": "string",
                "minLength": 1
              },
              "filename": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255,
                "description": "The name the recipient sees on a document, where the destination shows one. Defaults to the uploaded file's name."
              }
            },
            "additionalProperties": false
          }
        ]
      },
      "minItems": 1,
      "maxItems": 1,
      "description": "One image, video, audio file, or document, with `text` as its caption (up to 1,024 characters; audio takes none). Staged, then fetched by WhatsApp from a URL Koil signs."
    },
    "target": {
      "type": "object",
      "required": [
        "kind",
        "externalId"
      ],
      "properties": {
        "kind": {
          "enum": [
            "whatsapp.groups.messages"
          ]
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        }
      },
      "additionalProperties": false,
      "description": "One thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL."
    },
    "previewUrl": {
      "type": "boolean",
      "description": "Render a link preview for the first URL in the text."
    }
  },
  "additionalProperties": false,
  "anyOf": [
    {
      "required": [
        "text"
      ]
    },
    {
      "required": [
        "attachments"
      ]
    }
  ]
}

Media requirements

An asset that meets everything under Copied as is is published exactly as uploaded. Otherwise Koil converts only what misses, a billed media add-on that needs a paid plan. Anything under Refused fails the publish request, since no conversion fixes it.

MediaCopied as isOtherwise convertedRefused
ImageJPEG or PNGre-encoded to JPEGover 5 MB once staged
VideoMP4/MOV, H.264re-encoded to H.264 in MP4over 16 MB once staged
AudioAAC, AMR, MP3, M4A or Ogg—any other format; over 16 MB
DocumentPDF, DOC, DOCX, XLS, XLSX, PPT or PPTX—any other format; over 100 MB

perform_action

Mark a message a participant sent as read, showing them a read receipt. Unlike in a 1:1 chat, WhatsApp marks only that message, not those before it.

FieldTypeRequiredDescription
profileIdstringyesKoil Profile associated with the operation.
externalIdstringyesThe participant's message, as its externalId names it (a wamid), from a created event.
action"seen"yesWhat to do with the item: seen (show the person a read receipt for their messages).
JSON Schema
{
  "type": "object",
  "required": [
    "profileId",
    "externalId",
    "action"
  ],
  "properties": {
    "profileId": {
      "type": "string",
      "description": "Koil Profile associated with the operation.",
      "minLength": 1
    },
    "externalId": {
      "type": "string",
      "minLength": 1,
      "description": "The participant's message, as its `externalId` names it (a `wamid`), from a `created` event."
    },
    "action": {
      "enum": [
        "seen"
      ],
      "description": "What to do with the item: `seen` (show the person a read receipt for their messages).",
      "x-koil-narrows": "ContentAction"
    }
  },
  "additionalProperties": false
}

Not offered

  • list: platform no endpoint
  • get: platform no endpoint
  • update: platform not supported
  • delete: platform not supported
  • perform_action typing_on: platform not supported — WhatsApp shows a typing indicator in 1:1 chats only; in a group it only marks a message read.
  • perform_action typing_off: platform not supported — WhatsApp shows a typing indicator in 1:1 chats only; in a group it only marks a message read.

Events

Backfill: not offered — platform no endpoint.

Item schema

What list and get return and what events carry as data.

FieldTypeRequiredDescription
containerIdstringyesThe conversation: the same on every message in it, on reads and events alike, so an inbox groups by it. It is TikTok's conversation id, a WhatsApp group's id, and in a 1:1 chat on Instagram, Facebook or WhatsApp the counterpart's own id, since Meta's messaging webhooks carry no conversation id.
targetobjectnoThe one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to.
referencesobject[]no
textstringnoCaption/body text for content.
authorobjectyesPlatform actor reference for observed content.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
attachmentsunknown | unknown | unknown[]no
choiceobjectnoThe option the person picked instead of typing: a quick reply, a button or a list row a message offered, or one of the account's ice breakers. Its label is the message's text, and the message that offered it is target where the platform names it. Present where the platform reports the tap, which on Instagram and Messenger is the message's event only: a read of the same message returns its text without choice. Absent too when the platform withholds the payload (Meta sends a postback's payload only to the app that sent the button), so such a tap reads as typed text.
publishedAtstring (date-time)noWhen the platform published it.
externalIdstringyesPlatform-owned content identifier.
variant"text" | "image" | "video" | "audio" | "document" | "sticker" | "location" | "contacts" | "interactive" | "button" | "referral" | "order" | "system" | "unsupported" | "other"yesThe Cloud API message type. Media types carry one attachments entry; location carries location; unsupported is a type the Cloud API cannot deliver (e.g. a poll); other is a type Meta added that Koil does not model yet.
authorPhoneNumberstringnoThe person's phone number in E.164 digits, present only when Meta shares it: when the business messaged or called that number, or was messaged or called from it, in the last 30 days, or has it in its contacts. Never a key: it can be absent on one message and present on the next, so identify the person by their BSUID.
locationobjectnoGeographic place reference for content.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"whatsapp.groups.messages"yesThe collection that delivered this item.

whatsapp.groups.statuses

Delivery and read statuses of messages the number sent to groups, per participant (recipient) where Meta names one. Events only.

Not offered

  • list: platform no endpoint
  • get: not applicable
  • resolve_attachment: not applicable
  • publish: not applicable
  • update: not applicable
  • perform_action: not applicable
  • delete: not applicable

Events

Backfill: not offered — platform no endpoint.

Item schema

What list and get return and what events carry as data.

FieldTypeRequiredDescription
externalIdstringyesPlatform-owned content identifier.
containerIdstringyesThe group the message this status reports on went to, as the group's messages name it.
targetobjectyesThe outbound message this status reports on, by the externalId its publish request returned.
status"sent" | "delivered" | "read" | "played" | "failed" | "other"yesThe delivery state this status reports. other is a state Meta added that Koil does not model yet.
recipientobjectnoPlatform actor reference for observed content.
occurredAtstring (date-time)no
conversationobjectno
pricingobjectno
errorsobject[]no
callbackDatastringno
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"whatsapp.groups.statuses"yesThe collection that delivered this item.

whatsapp.groups.conversations

The WhatsApp groups the business number is in, each keyed by the group id its messages carry as containerId. An event carries only the fields its change states: a create's subject and join approval mode, an applied subject or description, a suspension, or no field when people join or leave. Meta opens groups only to Official Business Accounts.

list

List the groups the business number is in now, with each group's subject and creation time. A group the number has left or deleted is not listed; get reads the rest of a group.

FieldTypeRequiredDescription
profileIdstringyesKoil Profile associated with the operation.
cursorstringnoOpaque cursor for fetching the next result page.
limitintegernoMaximum number of items to return.
includePlatformRawbooleannoWhether to include transient platform-native payloads.
JSON Schema
{
  "type": "object",
  "required": [
    "profileId"
  ],
  "properties": {
    "profileId": {
      "type": "string",
      "description": "Koil Profile associated with the operation.",
      "minLength": 1
    },
    "cursor": {
      "type": "string",
      "description": "Opaque cursor for fetching the next result page.",
      "minLength": 1
    },
    "limit": {
      "type": "integer",
      "description": "Maximum number of items to return.",
      "minimum": 1,
      "maximum": 100
    },
    "includePlatformRaw": {
      "type": "boolean",
      "description": "Whether to include transient platform-native payloads."
    }
  },
  "additionalProperties": false
}

get

Get one WhatsApp group by its id: its subject, description, settings and participants, each keyed by BSUID.

FieldTypeRequiredDescription
profileIdstringyesKoil Profile associated with the operation.
externalIdstringyes
includePlatformRawbooleannoWhether to include transient platform-native payloads.
JSON Schema
{
  "type": "object",
  "required": [
    "profileId",
    "externalId"
  ],
  "properties": {
    "profileId": {
      "type": "string",
      "description": "Koil Profile associated with the operation.",
      "minLength": 1
    },
    "externalId": {
      "type": "string",
      "minLength": 1
    },
    "includePlatformRaw": {
      "type": "boolean",
      "description": "Whether to include transient platform-native payloads."
    }
  },
  "additionalProperties": false
}

update

Change a WhatsApp group's subject or description, answering with the group as read right after. Meta reports each change's outcome later, as an updated event carrying the fields it applied, so the answer may not show a change Meta has yet to apply.

FieldTypeRequiredDescription
profileIdstringyesKoil Profile associated with the operation.
externalIdstringyesThe group's id, as its externalId names it.
subjectstringnoThe group's new name.
descriptionstringnoThe group's new description.
includePlatformRawbooleannoWhether to include transient platform-native payloads.
JSON Schema
{
  "type": "object",
  "required": [
    "profileId",
    "externalId"
  ],
  "properties": {
    "profileId": {
      "type": "string",
      "description": "Koil Profile associated with the operation.",
      "minLength": 1
    },
    "externalId": {
      "type": "string",
      "minLength": 1,
      "description": "The group's id, as its `externalId` names it."
    },
    "subject": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "description": "The group's new name."
    },
    "description": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2048,
      "description": "The group's new description."
    },
    "includePlatformRaw": {
      "type": "boolean",
      "description": "Whether to include transient platform-native payloads."
    }
  },
  "additionalProperties": false,
  "anyOf": [
    {
      "required": [
        "subject"
      ]
    },
    {
      "required": [
        "description"
      ]
    }
  ]
}

delete

Delete a WhatsApp group, removing every participant, the business included.

FieldTypeRequiredDescription
profileIdstringyesKoil Profile associated with the operation.
externalIdstringyesThe group's id, as its externalId names it.
JSON Schema
{
  "type": "object",
  "required": [
    "profileId",
    "externalId"
  ],
  "properties": {
    "profileId": {
      "type": "string",
      "description": "Koil Profile associated with the operation.",
      "minLength": 1
    },
    "externalId": {
      "type": "string",
      "minLength": 1,
      "description": "The group's id, as its `externalId` names it."
    }
  },
  "additionalProperties": false
}

Not offered

  • resolve_attachment: not applicable
  • publish: not implemented — Meta creates a group asynchronously: the create answers with a request id only, and the group's id and invite link arrive later on a group_lifecycle_update webhook, which Koil emits as created but cannot route back to the publish that asked for it, so a publish could not answer with the group it made.
  • perform_action: platform not supported

Events

Backfill: supported (partial coverage); see Backfill history.

Item schema

What list and get return and what events carry as data.

FieldTypeRequiredDescription
counterpartobjectnoThe person the account is talking to in a 1:1 conversation. A group chat has none.
messageRequestbooleannoWhether the conversation is still a message request: the person wrote and the account has not replied yet. Absent when the read or event did not say.
updatedAtstring (date-time)noWhen the conversation last changed, as the platform reports it.
externalIdstringyesThe group's id: the containerId its messages carry, which a group send takes.
subjectstringnoThe group's name.
descriptionstringnoThe group's description. Read by get; an event carries it only when it changed.
participantsobject[]noThe people in the group, not counting the business, each keyed by BSUID as a group message's author is. Read by get only.
participantCountintegernoHow many people are in the group, not counting the business. Read by get only.
joinApprovalMode"approval_required" | "auto_approve" | "other"noWhether a person who opens the group's invite link needs the business's approval to join (approval_required) or joins at once (auto_approve). Read by get, and carried by the created event.
suspendedbooleannoWhether WhatsApp has suspended the group, which stops activity in it. Read by get, and carried by the updated event of a suspension or its lifting.
createdAtstring (date-time)noWhen the group was created.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"whatsapp.groups.conversations"yesThe collection that delivered this item.

On this page