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

# Retrieve All Sent Messages in a List

> This endpoint retrieves all sent messages in a list.

## Request URL

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

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

  * The `message_links` attribute will only be present on messages that have bit.ly links in their content.
  * The `tracking_links` attribute will only be present on messages that have tracking links in their content.
  * The `parts` attribute will be available 30 minutes after the message was sent.
</Note>


## OpenAPI

````yaml GET /api/v2/lists/{ID}/messages
openapi: 3.1.0
info:
  title: momoGood Messaging API v2
  description: >-
    The platform management API for momoGood Messaging (formerly the Tatango v2
    API). Manage lists, subscribers, custom fields, tags, webhooks, shortcodes,
    MOMT reports, and scheduled broadcasts from a single REST surface.
  version: 2.0.0
servers:
  - url: https://app.tatango.com
security:
  - basicAuth: []
paths:
  /api/v2/lists/{ID}/messages:
    get:
      tags:
        - Messaging
      summary: Retrieve All Sent Messages in a List
      description: This endpoint retrieves all sent messages in a list.
      parameters:
        - name: ID
          in: path
          description: The ID of the list
          required: true
          schema:
            type: integer
        - name: start_date
          in: query
          description: >-
            A date in YYYYMMDD format. Messages sent before this date will not
            be returned (UTC).
          required: false
          schema:
            type: string
            pattern: ^[0-9]{8}$
        - name: end_date
          in: query
          description: >-
            A date in YYYYMMDD format. Messages sent after this date will not be
            returned (UTC).
          required: false
          schema:
            type: string
            pattern: ^[0-9]{8}$
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrieveAllSentMessagesResponse'
              example:
                status: OK
                per_page: 10
                count: 2
                page: 1
                pages_count: 1
                messages:
                  - id: 14523
                    content: >-
                      AMCE Retail: Save $20 off this weekend when you spend more
                      than $100 in-store. Show this text message to redeem.
                      Reply STOP to end.
                    status: sent
                    sent_at: '2016-09-07T14:10:53-07:00'
                    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
                    cancelled_at: null
                    parts:
                      sum: 679599
                      minimum: 1
                      maximum: 2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >-
            curl "https://app.tatango.com/api/v2/lists/<ID>/messages" -d
            '{"start_date":"20160901", "end_date":"20161030"}' -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')

            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")

            request.body({"start_date":"20160901", "end_date":"20161030"});

            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",
              false
            );

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

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

            var data = JSON.stringify({ start_date: "20160901", end_date:
            "20161030" });

            request.send(data);
components:
  schemas:
    RetrieveAllSentMessagesResponse:
      type: object
      properties:
        status:
          type: string
          example: OK
        per_page:
          type: integer
          description: Number of items per page
          example: 10
        count:
          type: integer
          description: Number of messages returned
          example: 2
        page:
          type: integer
          example: 1
          description: Current page number
        pages_count:
          type: integer
          description: Total number of pages
          example: 1
        messages:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
                description: Message ID
                example: 14523
              content:
                type: string
                description: Message content
                example: >-
                  AMCE Retail: Save $20 off this weekend when you spend more
                  than $100 in-store. Show this text message to redeem. Reply
                  STOP to end.
              status:
                type: string
                description: Message status
                example: sent
              sent_at:
                type: string
                format: date-time
                description: Timestamp when the message was sent
                example: '2016-09-07T14:10:53-07:00'
              name:
                type: string
                description: Message name
                example: my message name
              is_broadcast:
                type: boolean
                description: Whether this is a broadcast message
                example: true
              recipient_count:
                type: integer
                description: Number of recipients
                example: 679571
              success_count:
                type: integer
                description: Number of successful deliveries
                example: 675232
              bounces_count:
                type: integer
                description: Number of bounced messages
                example: 4339
              pending_count:
                type: integer
                description: Number of pending messages
                example: 0
              clean_count:
                type: integer
                description: Number of cleaned messages
                example: 2342
              unsubscribe_count:
                type: integer
                description: Number of unsubscribes triggered by this message
                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
              cancelled_at:
                type:
                  - string
                  - 'null'
                format: date-time
                description: Timestamp when the message was cancelled
              parts:
                type: object
                description: Message parts information (available 30 minutes after sending)
                properties:
                  sum:
                    type: integer
                    description: Total number of message parts
                    example: 679599
                  minimum:
                    type: integer
                    description: Minimum number of parts per message
                    example: 1
                  maximum:
                    type: integer
                    description: Maximum number of parts per message
                    example: 2
              message_links:
                type: array
                description: >-
                  Bit.ly links in the message content (only present if message
                  contains bit.ly links)
                items:
                  type: string
              tracking_links:
                type: array
                description: >-
                  Tracking links in the message content (only present if message
                  contains tracking links)
                items:
                  type: string
            required:
              - id
              - content
              - status
              - sent_at
              - name
              - is_broadcast
              - recipient_count
              - success_count
              - bounces_count
              - pending_count
              - clean_count
              - unsubscribe_count
              - sms_count
              - mms_count
              - rcs_count
              - send_cost
              - cancelled_at
      required:
        - status
        - per_page
        - count
        - page
        - pages_count
        - messages
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        The momoGood Messaging API v2 authenticates 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.

````