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

# Get a received message

> Retrieve a single received message, including parsed body, headers,
verdicts, and links to its attachments and raw MIME source.




## OpenAPI

````yaml https://www.senderkit.com/openapi.yaml get /v1/inbound/messages/{publicId}
openapi: 3.1.0
info:
  title: SenderKit Public API
  version: 1.0.0
  description: >
    Public REST API for SenderKit — send transactional messages (email, SMS,

    push, web push), list message history, and read/render templates.


    ## Authentication

    All endpoints require a Bearer API key:

        Authorization: Bearer sk_live_xxx

    The `sk_live_` / `sk_test_` prefix selects the environment (live vs. test).

    The prefix is only a hint for humans; the secret is the full token. Keys are

    created in the dashboard and shown once at creation.


    ## Sends are asynchronous

    `POST /v1/send` enqueues the message and returns `202` with `status:
    "queued"`.

    Delivery happens out of band; poll `GET /v1/messages` to observe progress.


    ## Rate limits

    All endpoints are rate limited per API key. Sends and reads count against

    separate budgets, so listing messages never competes with sending them.

    A `429` response includes a `Retry-After` header (seconds).
servers:
  - url: https://api.senderkit.com
    description: Production
  - url: http://localhost:3000/api
    description: Local development
security:
  - apiKey: []
tags:
  - name: Context
    description: Inspect the workspace and environment an API key operates in.
  - name: Send
    description: Dispatch messages.
  - name: Messages
    description: Read message history and cancel pending sends.
  - name: Templates
    description: Read and render stored templates.
  - name: Inbound
    description: |
      Provision addresses on your workspace's shared receiving domain and read
      mail sent to them. Requires an API key with the `inbound` scope.
paths:
  /v1/inbound/messages/{publicId}:
    get:
      tags:
        - Inbound
      summary: Get a received message
      description: |
        Retrieve a single received message, including parsed body, headers,
        verdicts, and links to its attachments and raw MIME source.
      operationId: getInboundMessage
      parameters:
        - $ref: '#/components/parameters/InboundMessageId'
      responses:
        '200':
          description: The received message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InboundMessage'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            The API key is missing the required `inbound` scope
            (`insufficient_scope`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No received message with that id in this workspace (`not_found`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    InboundMessageId:
      name: publicId
      in: path
      required: true
      description: Public inbound message ID (e.g. `rcv_...`).
      schema:
        type: string
  schemas:
    InboundMessage:
      type: object
      description: A received message, as returned by the message detail endpoint.
      properties:
        id:
          type: string
          description: Public inbound message ID.
          example: rcv_0a1b2c3d4e5f6g7h
        status:
          $ref: '#/components/schemas/InboundMessageStatus'
        channel:
          $ref: '#/components/schemas/Channel'
        address:
          type:
            - string
            - 'null'
          description: Canonical receiving address, or null for catch-all/unmatched mail.
        plusTag:
          type:
            - string
            - 'null'
        from:
          type: object
          properties:
            email:
              type:
                - string
                - 'null'
            name:
              type:
                - string
                - 'null'
        to:
          type: array
          items:
            type: object
            properties:
              email:
                type: string
              name:
                type:
                  - string
                  - 'null'
        cc:
          type: array
          items:
            type: object
            properties:
              email:
                type: string
              name:
                type:
                  - string
                  - 'null'
        envelope:
          type: object
          properties:
            from:
              type:
                - string
                - 'null'
            to:
              type: array
              items:
                type: string
        subject:
          type:
            - string
            - 'null'
        messageId:
          type:
            - string
            - 'null'
          description: The mail's `Message-ID` header.
        inReplyTo:
          type:
            - string
            - 'null'
        text:
          type:
            - string
            - 'null'
        html:
          type:
            - string
            - 'null'
        strippedReply:
          type:
            - string
            - 'null'
          description: The plain-text reply with quoted history/signature stripped.
        truncated:
          type: boolean
          description: Whether the stored body was truncated.
        headers:
          type: object
          additionalProperties:
            type: string
        attachments:
          type: array
          items:
            type: object
            properties:
              index:
                type: integer
                description: >-
                  Zero-based index; matches the attachments-endpoint path
                  segment.
              filename:
                type:
                  - string
                  - 'null'
              contentType:
                type: string
              size:
                type: integer
              url:
                type: string
                description: >
                  Authenticated API URL. Fetch it with an `Authorization:
                  Bearer`

                  header carrying an API key with the `inbound` scope — this is

                  not a public/signed link.
        verdicts:
          type: object
          description: SES scanning verdicts (e.g. spam/virus/SPF/DKIM), as reported.
          additionalProperties:
            type: string
        sizeBytes:
          type: integer
        rawUrl:
          type: string
          description: |
            Authenticated API URL for the raw RFC 822 source. Same auth
            requirement as attachment `url`s.
        receivedAt:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Stable machine-readable error code.
              example: invalid_request
            message:
              type: string
            issues:
              type: array
              description: Present on validation failures (Zod issues).
              items:
                type: object
                additionalProperties: true
            limit:
              type: integer
              description: Present on rate-limit errors.
    InboundMessageStatus:
      type: string
      description: |
        `received` means the message was stored and the webhook/forward
        pipeline ran; `dropped` means it arrived on a verified inbound domain
        but matched no address (mail to an unknown local part); `quota_exceeded`
        means the workspace's inbound quota was hit — the full message row is
        still stored, but the webhook/forward pipeline was skipped.
      enum:
        - received
        - dropped
        - quota_exceeded
    Channel:
      type: string
      enum:
        - email
        - sms
        - push
        - web-push
  responses:
    Unauthorized:
      description: Missing, malformed, invalid, or revoked API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: API key with an `sk_live_` or `sk_test_` prefix.

````