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

# Retrieve a message

> Returns the SMS or MMS message identified by `id`, including its delivery status and content.



## OpenAPI

````yaml https://wavix.github.io/wavix-openapi/wavix-api.yaml get /v3/messages/{id}
openapi: 3.1.0
info:
  title: Wavix APIs
  description: >-
    Wavix provides robust APIs that let you integrate voice and text messaging
    features directly into your app. Send text, place calls, and access detailed
    reports  programmatically.
  termsOfService: https://wavix.com/terms-and-conditions
  license:
    name: MIT
    identifier: MIT
  contact:
    name: Wavix
    url: https://wavix.com
    email: support@wavix.com
  version: '1.0'
servers:
  - url: https://api.wavix.com
    description: https://api.wavix.com
    variables: {}
security:
  - bearerAuth: []
tags:
  - name: SIP trunks
    description: SIP trunks
  - name: Buy
    description: Numbers
  - name: Cart
    description: Numbers
  - name: My numbers
    description: Numbers
  - name: Billing
    description: Billing, transactions, and invoices
  - name: Profile
    description: Account profile and customer information
  - name: CDRs
    description: Call detail records and call history
  - name: Speech Analytics
    description: Call transcription and speech analytics
  - name: SMS and MMS
    description: Messaging
  - name: Number Validator
    description: Phone number validation
  - name: Link shortener
    description: Short link and click metrics
  - name: 2FA
    description: Two-factor authentication
  - name: 10DLC
    description: 10DLC Campaigns and Brands
  - name: API Keys
    description: API key management
  - name: Call webhooks
    description: Webhook configuration for call events
  - name: Call control
    description: Programmable Voice
  - name: Call streaming
    description: Real-time call audio streaming over WebSocket
  - name: Call recording
    description: Call recording
  - name: Sub-accounts
    description: Sub-account management
  - name: Voice campaigns
    description: Outbound voice campaigns
  - name: Wavix Embeddable
    description: WebRTC embeddable widget
paths:
  /v3/messages/{id}:
    get:
      tags:
        - SMS and MMS
      summary: Retrieve a message
      description: >-
        Returns the SMS or MMS message identified by `id`, including its
        delivery status and content.
      operationId: sms_and_mms_messages_get
      parameters:
        - name: id
          in: path
          description: The unique ID of the message.
          required: true
          style: simple
          explode: false
          schema:
            type: string
            example: 3a525ca2-6909-4c72-9399-905adf7f3a74
      responses:
        '200':
          description: Returns the message.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/MessageResponse'
                  - example:
                      message_id: 3a525ca2-6909-4c72-9399-905adf7f3a74
                      message_type: sms
                      from: '15072429497'
                      to: '16419252149'
                      direction: outbound
                      mcc: '310'
                      mnc: '024'
                      message_body:
                        text: Hello, this is a test message
                        media: null
                      segments: 1
                      status: delivered
                      charge: '0.01'
                      submitted_at: '2022-04-14T13:51:16.096Z'
                      sent_at: '2022-04-14T13:51:16.096Z'
                      delivered_at: '2022-04-14T13:51:16.096Z'
                      error_message: null
                      carrier_fees: '0.0'
                      tag: Fall sale
              examples:
                success:
                  summary: Successful response
                  value:
                    message_id: 3a525ca2-6909-4c72-9399-905adf7f3a74
                    message_type: sms
                    from: '15072429497'
                    to: '16419252149'
                    direction: outbound
                    mcc: '310'
                    mnc: '024'
                    message_body:
                      text: Hello, this is a test message
                      media: null
                    tag: Fall sale
                    status: delivered
                    segments: 1
                    charge: '0.01'
                    submitted_at: '2022-04-14T13:51:16.096Z'
                    sent_at: '2022-04-14T13:51:16.096Z'
                    delivered_at: '2022-04-14T13:51:16.096Z'
                    error_message: null
                    carrier_fees: '0.0'
        '403':
          $ref: '#/components/responses/ForbiddenErrorResponse'
        '404':
          $ref: '#/components/responses/NotFoundErrorResponse'
      deprecated: false
      security:
        - bearerAuth:
            - messages:read
components:
  schemas:
    MessageResponse:
      title: MessageResponse
      required:
        - message_id
        - message_type
        - from
        - to
        - direction
        - mcc
        - mnc
        - message_body
        - tag
        - status
        - segments
        - charge
        - submitted_at
        - sent_at
        - delivered_at
        - error_message
      type: object
      additionalProperties: false
      properties:
        message_id:
          type: string
          description: Message ID.
          example: 871b4eeb-f798-4105-be23-32df9e991456
        message_type:
          type: string
          description: Message type. Possible values are `sms`, `mms`.
          example: sms
        from:
          type: string
          description: Sender ID.
          example: Wavix
        to:
          type: string
          description: Recipient phone number.
          example: '447537151866'
        direction:
          type: string
          description: Message direction. Possible values are `outbound`, `inbound`.
          example: outbound
        mcc:
          type:
            - string
            - 'null'
          description: Mobile country code.
          example: '301'
        mnc:
          type:
            - string
            - 'null'
          description: Mobile network code.
          example: '204'
        message_body:
          $ref: '#/components/schemas/MessageBody'
        tag:
          type:
            - string
            - 'null'
          description: Tag to group messages, such as for a specific campaign.
          example: Fall sale
        status:
          $ref: '#/components/schemas/MessageDeliveryStatus'
        segments:
          type: integer
          description: Number of SMS segments. Always 1 for MMS.
          format: int32
          example: 1
        charge:
          type: string
          description: Total charge for the message in USD.
          example: '0.01'
        submitted_at:
          type: string
          description: Date and time the message was accepted in ISO 8601 format.
          example: '2022-04-14T13:51:16.096Z'
        sent_at:
          type:
            - string
            - 'null'
          description: >-
            Date and time the message was sent in ISO 8601 format. For
            mobile-terminated messages only.
          example: '2022-04-14T13:51:16.096Z'
        delivered_at:
          type:
            - string
            - 'null'
          description: >-
            Date and time the message was delivered in ISO 8601 format. Refers
            to DLR reception for mobile-terminated messages
             or webhook relay for mobile-originated messages.
          example: '2022-04-14T13:51:16.096Z'
        error_message:
          type:
            - string
            - 'null'
          description: Human-readable error message.
        carrier_fees:
          type:
            - string
            - 'null'
          description: Mobile carrier fees in USD.
          example: '0.0'
    MessageBody:
      title: MessageBody
      required:
        - text
        - media
      type: object
      additionalProperties: false
      properties:
        text:
          type: string
          description: Message text.
          example: Hi there, this is a sample message
        media:
          maxItems: 5
          minItems: 0
          type:
            - array
            - 'null'
          items:
            type: string
          description: |-
            List of media URLs.
             If provided, the message is sent as an MMS;
              otherwise, it is sent as an SMS.
          example:
            - https://you-site.com/media
    MessageDeliveryStatus:
      title: MessageDeliveryStatus
      enum:
        - accepted
        - pending
        - sent
        - delivered
        - undelivered
        - expired
        - rejected
        - dlr_expired
      type: string
      description: >-
        Current delivery status of the message. One of:


        - `accepted` — the message was accepted by the platform for sending.

        - `pending` — the message is queued and awaiting a carrier response.

        - `sent` — the message was handed to the carrier.

        - `delivered` — the carrier confirmed delivery to the handset.

        - `undelivered` — the carrier reported that delivery failed.

        - `expired` — the validity period elapsed before the message was sent.

        - `rejected` — the message was rejected before sending.

        - `dlr_expired` — no delivery receipt arrived from the carrier within
        the expected window.
    ForbiddenErrorResponse:
      title: ForbiddenErrorResponse
      type: object
      properties:
        success:
          type: boolean
          description: >-
            Indicates whether the request was successful. Always `false` for
            this error.
          example: false
        message:
          type: string
          description: Human-readable description of why access is forbidden.
          example: The service is not provisioned for your account.
    NotFoundErrorResponse:
      title: NotFoundErrorResponse
      type: object
      properties:
        success:
          type: boolean
          description: >-
            Indicates whether the request was successful. Always `false` for
            this error.
          example: false
        message:
          type: string
          description: >-
            Human-readable description stating that no resource matches the
            given ID.
          example: Record not found
  responses:
    ForbiddenErrorResponse:
      description: Request failed. The feature is disabled for your account.
      headers: {}
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ForbiddenErrorResponse'
    NotFoundErrorResponse:
      description: Request failed. An object with the specified ID is not found.
      headers: {}
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NotFoundErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Wavix API key. Pass as `Authorization: Bearer <api_key>`. Keys support
        per-resource scopes (none / read / write). See [Restricted keys and
        scopes](https://docs.wavix.com/api-reference/authentication#restricted-keys-and-scopes).

````