---
title: "Message received"
method: POST
path: "message.received"
---

# Message received

`POST message.received` (webhook)

## Payload

- object
  - `type` 'message.received', required
  - `timestamp` string, required
  - `data` object, required
    - `mailboxId` string, nullable
    - `channel` 'sms' | 'whatsapp' | 'email', required
    - `status` string, nullable
    - `metadata` object, nullable
    - `cost` number, nullable
    - `recipient` string, nullable
    - `occurredAt` string, nullable
    - `failureReason` string, nullable
    - `errorCode` string, nullable
    - `conversationId` string, nullable
    - `isBillable` boolean, nullable
    - `messageType` string, nullable
    - `templateCategory` 'marketing' | 'utility' | 'authentication', nullable
    - `subject` string, nullable
    - `toEmails` string[], nullable
    - `providerMessageId` string, nullable
    - `waId` string, nullable
    - `hasAttachments` boolean, nullable
    - `isAutoReply` boolean, nullable
    - `segments` number, nullable
    - `to` string, nullable
    - `from` string, nullable
    - `body` string, nullable
    - `direction` 'inbound' | 'outbound', nullable
    - `errorMessage` string, nullable
    - `parts` number, nullable
    - `carrier` string, nullable
    - `whatsapp` object, nullable
      - `text` string, nullable
      - `template` object, nullable
        - `name` string, required
        - `language` string, required
        - `components` object[], required
          - `type` 'header' | 'body' | 'footer' | 'button', required
          - `sub_type` 'url' | 'quick_reply' | 'copy_code' | 'flow', nullable
          - `index` string, nullable
          - `parameters` object[], required
            - `type` 'text' | 'currency' | 'date_time' | 'image' | 'document' | 'video' | 'coupon_code' | 'action', required
            - `text` string, nullable
            - `currency` object, nullable
              - …
            - `date_time` object, nullable
              - …
            - `image` object, nullable
              - …
            - `document` object, nullable
              - …
            - `video` object, nullable
              - …
            - `coupon_code` string, nullable
            - `action` object, nullable
              - …
      - `interactive` union
        - object
          - `type` 'buttons', required
          - `header` union
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
          - `body` string, required
          - `footer` string
          - `buttons` object[], required
            - `id` string, required
            - `title` string, required
        - object
          - `type` 'list', required
          - `header` object
            - `type` 'text', required
            - `text` string, required
          - `body` string, required
          - `footer` string
          - `button` string, required
          - `sections` object[], required
            - `title` string
            - `rows` object[], required
              - …
        - object
          - `type` 'cta_url', required
          - `header` union
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
          - `body` string, required
          - `footer` string
          - `displayText` string, required
          - `url` string, required
        - object
          - `type` 'flow', required
          - `header` object
            - `type` 'text', required
            - `text` string, required
          - `body` string, required
          - `footer` string
          - `flowId` string, required
          - `cta` string, required
          - `token` string
          - `action` 'navigate' | 'data_exchange'
          - `screen` string
          - `data` object
          - `flowVersionId` string, required
          - `providerFlowId` string, required
      - `media` union
        - object
          - `type` 'image' | 'video' | 'audio' | 'document' | 'sticker', required
          - `url` string, required
          - `caption` string
          - `filename` string
        - object
          - `type` 'image' | 'video' | 'audio' | 'document' | 'sticker', required
          - `mediaId` string, required
          - `caption` string
          - `filename` string
        - object
          - `type` 'image' | 'video' | 'audio' | 'document' | 'sticker', required
          - `providerMediaId` string, required
          - `mimeType` string, nullable
          - `caption` string, nullable
          - `filename` string
      - `reaction` object
        - `messageId` string, nullable, required
        - `providerMessageId` string, required
        - `emoji` string, nullable, required
      - `location` object
        - `latitude` number, required
        - `longitude` number, required
        - `name` string
        - `address` string
        - `url` string
      - `contacts` object[]
        - `name` object
          - `formattedName` string
          - `firstName` string
          - `lastName` string
          - `middleName` string
          - `prefix` string
          - `suffix` string
        - `phones` object[]
          - `phone` string
          - `type` string
          - `waId` string
        - `emails` object[]
          - `email` string
          - `type` string
        - `urls` object[]
          - `url` string
          - `type` string
        - `org` object
          - `company` string
          - `department` string
          - `title` string
        - `addresses` object[]
          - `street` string
          - `city` string
          - `state` string
          - `zip` string
          - `country` string
          - `countryCode` string
          - `type` string
        - `birthday` string
      - `reply` object
        - `type` 'button' | 'list' | 'template_button', required
        - `id` string, required
        - `title` string, required
        - `description` string
      - `flowResponse` object
        - `flowToken` string, nullable, required
        - `response` object, required
        - `body` string
      - `context` object
        - `messageId` string, nullable, required
        - `providerMessageId` string, required
    - `messageId` string, required
    - `organizationId` string, required

## Acknowledgement `200`

Any 2xx status acknowledges the event.

---

[API](https://skmtc.dev/samva/apis/samva-api.md) · [All operations](https://skmtc.dev/samva/apis/samva-api/llms.txt) · [OpenAPI document](https://skmtc.dev/samva/apis/samva-api/revisions/a99408542cc3?raw)
