---
title: "POST messageSent"
method: POST
path: "messageSent"
---

# POST messageSent

`POST messageSent` (webhook)

The `message.sent` event is delivered whenever a message is sent from a Surge number to a contact.

## Payload

- MessageSentEvent
  - `account_id` string, required — The ID of the account in which this event occurred
  - `data` object, required — The data associated with the event
    - `attachments` object[] — Attachments included with the message
      - `id` string, required — The unique identifier for the attachment
      - `type` 'file' | 'image' | 'link' | 'contact' | 'video', required — The type of attachment
      - `url` string, required — The URL to download the attachment
    - `blast_id` string — The ID of the blast this message belongs to, if any. This can be used to attribute messages back to a specific blast.
    - `body` string, nullable, required — The content of the message
    - `conversation` object, required — The conversation this message belongs to
      - `contact` Contact, required — A contact who has consented to receive messages
        - `email` string, email — The contact's email address.
        - `first_name` string — The contact's first name.
        - `id` string, required — Unique identifier for the object.
        - `last_name` string — The contact's last name.
        - `metadata` Metadata — Set of key-value pairs that will be stored with the object.
        - `phone_number` string, phone-number, required — The contact's phone number in E.164 format.
      - `id` string, required — The unique identifier for the conversation
      - `phone_number` PhoneNumber, required — A phone number that can be used to send and receive messages and calls
        - `campaign` PhoneNumberCampaign, required — Campaign attachment details for a domestic local phone number
          - `attachment_status` 'attached' | 'attachment_pending' | 'detached' | 'detachment_pending', required — The current campaign attachment status for this phone number.
          - `id` string, required — The unique identifier of the campaign this phone number is attached to
        - `campaign_id` string, nullable, required — Deprecated. The unique identifier of the campaign this phone number is attached to, if any
        - `id` string, required — Unique identifier for the phone number
        - `name` string, nullable, required — A human-readable name for the phone number
        - `number` string, phone-number, required — The phone number in E.164 format
        - `type` 'local' | 'short_code' | 'toll_free', required — Whether the phone number is local, toll-free, or short code
    - `id` string, required — The unique identifier for the message
    - `metadata` Metadata, required — Set of key-value pairs that will be stored with the object.
    - `sent_at` string, date-time, required — When the message was sent
  - `timestamp` string, date-time, required — The timestamp when this event occurred, in ISO8601 format
  - `type` 'message.sent', required — The type of the event. Always `message.sent` for this event.

## Acknowledgement `200`

Return a 200 status to indicate that the data was received successfully

---

[API](https://skmtc.net/surgeapi/apis/surge.md) · [All operations](https://skmtc.net/surgeapi/apis/surge/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/surgeapi/surge/revisions/b5b0b6f62245/schema)
