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

# Querying an Existing Message

> This endpoint retrieves a message.

<Note>
  **Please note the following:**

  * It takes some time after a message is sent to receive delivery status notifications from the various carriers. We recommend waiting until at least 10 minutes after a message is sent to query for delivery statistics.

  * The `message_links` attribute will only be present on messages that have bit.ly links in their content.

  * The `parts` attribute will be available 30 minutes after the message was sent.
</Note>

## Request URL

```http theme={null}
GET https://app.tatango.com/api/v2/lists/{ID}/messages/{MESSAGE_ID}
```


## OpenAPI

````yaml GET /api/v2/lists/{ID}/messages/{MESSAGE_ID}
openapi: 3.1.0
info:
  title: Tatango Legacy v2 API
  description: Tatango legacy v2 API endpoints for existing integrations.
  version: 2.0.0
servers:
  - url: https://app.tatango.com
security:
  - basicAuth: []
paths:
  /api/v2/lists/{ID}/messages/{MESSAGE_ID}:
    get:
      tags:
        - Messaging
      summary: Querying an Existing Message
      description: This endpoint retrieves a message.
      parameters:
        - name: ID
          in: path
          description: ID of the list
          required: true
          schema:
            type: integer
        - name: MESSAGE_ID
          in: path
          description: ID of the message
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryExistingMessageResponse'
              example:
                status: OK
                message:
                  id: 14523
                  content: >-
                    AMCE Retail: Go to http://bit.ly/acme to see deals on
                    anvils. Reply STOP to end.
                  sent_at: '2016-09-07T14:10:53-07:00'
                  status: sent
                  name: my message name
                  is_broadcast: true
                  recipient_count: 679571
                  success_count: 675232
                  bounces_count: 4339
                  pending_count: 0
                  clean_count: 2342
                  unsubscribe_count: 1362
                  sms_count: 168808
                  mms_count: 506424
                  rcs_count: 0
                  send_cost: 5096.78
                  attachment: https://url-to-your-mms-attachment
                  cancelled_at: null
                  message_links:
                    - id: 42
                      link: http://bit.ly/acme
                      count: 2356
                      display_count: 2356
                  parts:
                    sum: 679599
                    minimum: 1
                    maximum: 2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >-
            curl "https://app.tatango.com/api/v2/lists/ID/messages/MESSAGE_ID"
            -X GET \
              -H "Accept: application/json" \
              -H "Content-Type: application/json" \
              -u emailaddress@mydomain.com:my_api_key \
              -H "Host: example.org" \
              -H "Cookie: "
        - lang: Ruby
          label: Ruby
          source: >-
            require 'net/http'

            require 'uri'


            uri =
            URI.parse('https://app.tatango.com/api/v2/lists/ID/messages/MESSAGE_ID')

            http = Net::HTTP.new(uri.host, uri.port)

            request = Net::HTTP::Get.new(uri.request_url)

            request.basic_auth("emailaddress@mydomain.com", "my_api_key")

            response = http.request(request)
        - lang: JavaScript
          label: JavaScript
          source: >-
            var request = new XMLHttpRequest();

            request.open('GET',
            'https://app.tatango.com/api/v2/lists/ID/messages/MESSAGE_ID',
            false);

            request.setRequestHeader('Content-Type', 'application/json');

            request.setRequestHeader('Authorization', 'Basic ' +
            btoa('emailaddress@mydomain.com:my_api_key'));

            request.send(null);
components:
  schemas:
    QueryExistingMessageResponse:
      type: object
      properties:
        status:
          type: string
          description: Response status
          example: OK
        message:
          type: object
          properties:
            content:
              type: string
              description: The actual content of the message that was sent to subscribers.
              example: >-
                AMCE Retail: Go to http://bit.ly/acme to see deals on anvils.
                Reply STOP to end.
            id:
              type: integer
              description: A unique ID that identifies this specific message.
              example: 14523
            name:
              type: string
              description: An optional name or description for a message.
              example: my message name
            sent_at:
              type: string
              format: date-time
              description: The date/time this message completed it's send.
              example: '2016-09-07T14:10:53-07:00'
            status:
              type: string
              description: The status of the message.
              example: sent
            is_broadcast:
              type: boolean
              description: >-
                If true, the message was sent to the whole list. If false, was
                sent only to the phone_number specified.
              example: true
            phone_number:
              type: string
              description: The wireless phone number of the subscriber.
            recipient_count:
              type: integer
              description: The number of recipients the message was sent to.
              example: 679571
            success_count:
              type: integer
              description: >-
                The number of recipients that succesfully received the message
                on their mobile phones.
              example: 675232
            bounces_count:
              type: integer
              description: >-
                The number of recipients that did not receive the message on
                their mobile phones.
              example: 4339
            pending_count:
              type: integer
              description: >-
                The number of messages that do not have a delivery status as of
                the time of the query.
              example: 0
            clean_count:
              type: integer
              description: >-
                The number of recipients that Tatango automatically unsubscribed
                from your list due to our
              example: 2342
            unsubscribe_count:
              type: integer
              description: >-
                The number of recipients that unsubscribed from the list, in
                response to the message that was sent to them.
              example: 1362
            sms_count:
              type: integer
              description: Number of SMS messages sent
              example: 168808
            mms_count:
              type: integer
              description: Number of MMS messages sent
              example: 506424
            rcs_count:
              type: integer
              description: Number of RCS messages sent
              example: 0
            send_cost:
              type: number
              format: float
              description: Cost of sending the message
              example: 5096.78
            attachment:
              type: string
              description: URL to MMS attachment
              example: https://url-to-your-mms-attachment
            cancelled_at:
              type: string
              format: date-time
              description: Date/time when message was cancelled
            message_links:
              type: array
              description: >-
                Links contained in the message (only present on messages that
                have bit.ly links)
              items:
                type: object
                properties:
                  id:
                    type: integer
                    example: 42
                  link:
                    type: string
                    example: http://bit.ly/acme
                  count:
                    type: integer
                    example: 2356
                  display_count:
                    type: integer
                    example: 2356
            parts:
              type: object
              description: >-
                Message parts information (available 30 minutes after message
                was sent)
              properties:
                sum:
                  type: integer
                  example: 679599
                minimum:
                  type: integer
                  example: 1
                maximum:
                  type: integer
                  example: 2
          required:
            - content
            - id
            - name
            - sent_at
            - status
            - is_broadcast
            - recipient_count
            - success_count
            - bounces_count
            - pending_count
            - clean_count
            - unsubscribe_count
      required:
        - status
        - message
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        Tatango authenticates API requests by validating an API key passed via
        HTTP Basic Authentication. Use your login email as the username and your
        API key as the password.

````