> ## Documentation Index
> Fetch the complete documentation index at: https://sendmux.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a webhook delivery payload

> Returns the retained JSON request body for one delivery attempt. Payloads are retained for 7 days and may no longer be available after `payload_expires_at`.



## OpenAPI

````yaml /openapi-app.json get /webhooks/{public_id}/deliveries/{delivery_id}/payload
openapi: 3.1.0
info:
  description: Programmatic access to your Sendmux email infrastructure.
  title: Sendmux API
  version: 1.0.0
servers:
  - description: API v1
    url: https://app.sendmux.ai/api/v1
security:
  - bearerAuth: []
paths:
  /webhooks/{public_id}/deliveries/{delivery_id}/payload:
    get:
      tags:
        - Webhooks
      summary: Get a webhook delivery payload
      description: >-
        Returns the retained JSON request body for one delivery attempt.
        Payloads are retained for 7 days and may no longer be available after
        `payload_expires_at`.
      operationId: managementGetDeliveryPayload
      parameters:
        - in: path
          name: public_id
          required: true
          schema:
            description: Webhook public ID
            type: string
        - in: path
          name: delivery_id
          required: true
          schema:
            description: Delivery-attempt public ID
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookDeliveryPayloadResponse'
          description: Delivery payload
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Authentication required
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Insufficient permissions
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Delivery not found or payload no longer available
      security:
        - bearerAuth: []
components:
  schemas:
    WebhookDeliveryPayloadResponse:
      allOf:
        - $ref: '#/components/schemas/SuccessEnvelope'
        - properties:
            data:
              $ref: '#/components/schemas/WebhookDeliveryPayload'
            meta:
              $ref: '#/components/schemas/ResponseMeta'
          required:
            - data
          type: object
      unevaluatedProperties: false
    ApiError:
      additionalProperties: false
      properties:
        error:
          additionalProperties: false
          properties:
            code:
              description: Machine-readable error code
              enum:
                - invalid_parameter
                - missing_parameter
                - authentication_required
                - insufficient_permissions
                - not_found
                - conflict
                - limit_exceeded
                - idempotency_conflict
                - payload_too_large
                - validation_error
                - rate_limit_exceeded
                - service_unavailable
                - internal_error
              example: invalid_parameter
              type: string
            doc_url:
              description: Link to relevant documentation
              type: string
            errors:
              description: >-
                Accumulated per-field issues for validation errors. Only present
                on 400/422 responses.
              items:
                $ref: '#/components/schemas/ApiErrorDetail'
              type: array
            message:
              description: Human-readable error description
              type: string
            param:
              description: The parameter that caused the error
              type: string
            retryable:
              description: >-
                Whether the caller may safely retry this request. 4xx are
                typically false (except 429); 5xx are typically true.
              example: false
              type: boolean
          required:
            - code
            - message
            - retryable
          type: object
        meta:
          additionalProperties: false
          properties:
            request_id:
              example: req_clxxxxxxxxxxxxxxxxxxxxxxxxx
              type: string
          required:
            - request_id
          type: object
        ok:
          enum:
            - false
          type: boolean
      required:
        - ok
        - error
        - meta
      type: object
    SuccessEnvelope:
      properties:
        meta:
          additionalProperties: {}
          properties: {}
          type: object
        ok:
          enum:
            - true
          type: boolean
      required:
        - ok
        - meta
      type: object
    WebhookDeliveryPayload:
      additionalProperties: false
      properties:
        created_at:
          description: ISO 8601 attempt timestamp
          example: '2026-05-21T09:12:00Z'
          type: string
        delivery_attempt:
          description: 1-based retry attempt number.
          example: 1
          exclusiveMinimum: 0
          type: integer
        event_id:
          description: Webhook event ID
          example: evt_clxxxxxxxxxxxxxxxxxxxxxxxxx
          type: string
        event_type:
          description: >-
            Event types a webhook may subscribe to. `sendmux.test` is accepted
            so you can verify end-to-end delivery via POST /webhooks/{id}/test.
          enum:
            - message.delivered
            - message.bounced
            - message.complained
            - message.rejected
            - message.delivery_delayed
            - message.received
            - message.received.spam
            - sendmux.test
          example: message.bounced
          type: string
        expires_at:
          description: Timestamp when this retained payload expires.
          example: '2026-05-28T09:12:00Z'
          type: string
        id:
          description: Delivery-attempt public ID
          example: whda_clxxxxxxxxxxxxxxxxxxxxxxxxx
          type: string
        payload:
          $ref: '#/components/schemas/WebhookEventPayload'
      required:
        - id
        - event_id
        - event_type
        - delivery_attempt
        - created_at
        - expires_at
        - payload
      type: object
    ResponseMeta:
      additionalProperties: false
      properties:
        request_id:
          example: req_clxxxxxxxxxxxxxxxxxxxxxxxxx
          type: string
      required:
        - request_id
      type: object
    ApiErrorDetail:
      additionalProperties: false
      properties:
        code:
          description: >-
            Machine-readable issue code from the validator (e.g. zod issue
            code).
          example: invalid_string
          type: string
        field:
          description: Dot-path of the offending request field.
          example: recipient.email
          type: string
        message:
          description: Human-readable issue description.
          type: string
      required:
        - field
        - code
        - message
      type: object
    WebhookEventPayload:
      additionalProperties: false
      description: The JSON request body delivered to the webhook endpoint.
      example:
        data:
          bounce_subtype: null
          bounce_type: null
          complaint_subtype: null
          complaint_type: null
          delay_expires_at: null
          delay_type: null
          is_spam: false
          mailbox_id: mbx_123
          message_id: ME3P282MB076951B3AAD3255D686EA8EDCA0F2@example.com
          message_id_kind: rfc5322
          recipients:
            - inbox@example.com
          reject_reason: null
          sender: sender@example.com
          sendmux_message_id: null
          webhook_id: null
        id: evt_clxxxxxxxxxxxxxxxxxxxxxxxxx
        occurred_at: '2026-05-21T09:12:00Z'
        team_public_id: team_clxxxxxxxxxxxxxxxxxxxxxxxxx
        type: message.received
      properties:
        data:
          $ref: '#/components/schemas/WebhookEventData'
        id:
          description: >-
            Stable per-event identifier. Also sent in the X-Sendmux-Event-Id
            header.
          example: evt_clxxxxxxxxxxxxxxxxxxxxxxxxx
          type: string
        occurred_at:
          description: When the event occurred.
          example: '2026-05-21T09:12:00Z'
          type: string
        team_public_id:
          description: Team that owns the event.
          example: team_clxxxxxxxxxxxxxxxxxxxxxxxxx
          type: string
        type:
          description: Dotted event type. Same value as the X-Sendmux-Event-Type header.
          enum:
            - message.delivered
            - message.bounced
            - message.complained
            - message.rejected
            - message.delivery_delayed
            - message.received
            - message.received.spam
            - sendmux.test
          example: message.received
          type: string
      required:
        - id
        - type
        - team_public_id
        - occurred_at
        - data
      type: object
    WebhookEventData:
      additionalProperties: false
      properties:
        bounce_subtype:
          description: More specific bounce category when available.
          example: null
          type:
            - string
            - 'null'
        bounce_type:
          description: Bounce category for `message.bounced` events.
          enum:
            - Permanent
            - Transient
            - Undetermined
          example: null
          type:
            - string
            - 'null'
        complaint_subtype:
          description: More specific complaint category when available.
          example: null
          type:
            - string
            - 'null'
        complaint_type:
          description: Complaint category for `message.complained` events.
          example: null
          type:
            - string
            - 'null'
        delay_expires_at:
          description: When delivery retries are expected to stop, when provided.
          example: null
          type:
            - string
            - 'null'
        delay_type:
          description: Delay category for `message.delivery_delayed` events.
          example: null
          type:
            - string
            - 'null'
        is_spam:
          description: Only populated for inbound mailbox events.
          example: false
          type:
            - boolean
            - 'null'
        mailbox_id:
          description: Mailbox public ID for inbound mailbox events when resolved.
          example: mbx_123
          type:
            - string
            - 'null'
        message_id:
          description: Message identifier from the event source.
          example: ME3P282MB076951B3AAD3255D686EA8EDCA0F2@example.com
          type:
            - string
            - 'null'
        message_id_kind:
          description: >-
            `provider` for sending feedback IDs; `rfc5322` for inbound email
            Message-ID header values.
          enum:
            - provider
            - rfc5322
          example: rfc5322
          type:
            - string
            - 'null'
        recipients:
          description: All affected recipients. Empty for synthetic test events.
          example:
            - inbox@example.com
          items:
            type: string
          type: array
        reject_reason:
          description: Reject reason for `message.rejected` events.
          example: null
          type:
            - string
            - 'null'
        sender:
          description: Sender/envelope-from address when available.
          example: sender@example.com
          type:
            - string
            - 'null'
        sendmux_message_id:
          description: >-
            Sendmux message correlation ID for outbound sending feedback when
            available.
          example: null
          type:
            - string
            - 'null'
        webhook_id:
          description: Target webhook ID for synthetic `sendmux.test` payloads.
          example: null
          type:
            - string
            - 'null'
      required:
        - message_id
        - message_id_kind
        - sendmux_message_id
        - sender
        - recipients
        - mailbox_id
        - bounce_type
        - bounce_subtype
        - complaint_type
        - complaint_subtype
        - reject_reason
        - delay_type
        - delay_expires_at
        - is_spam
        - webhook_id
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: API Key
      description: >-
        Sendmux API key. Use a root API key for Management API routes, or a
        mailbox credential for Mailbox API routes. Obtain keys from the
        dashboard under API Keys.
      scheme: bearer
      type: http

````