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

# A campaign's messages

> Per person: number, status, why it did not reach them, price. Up to 1,000 a page. Read them all in order with cursor (each answer's next_cursor); page still works.

Permission: Any key (Full, Send only or Read only).



## OpenAPI

````yaml /openapi.json get /v1/campaigns/{id}/messages
openapi: 3.1.0
info:
  title: GetReply API
  version: 1.0.0
  description: >-
    Send WhatsApp messages, templates, OTPs and campaigns from your own
    software. Every request needs an API key (Developer → API keys) as a Bearer
    token.


    Requests sent here are real and charged like any other.
servers:
  - url: https://api.getreply.in
    description: GetReply
security:
  - bearerAuth: []
tags:
  - name: Account
  - name: Messages
  - name: Templates
  - name: Contacts
  - name: Inbox
  - name: Campaigns
  - name: Webhooks
paths:
  /v1/campaigns/{id}/messages:
    get:
      tags:
        - Campaigns
      summary: A campaign's messages
      description: >-
        Per person: number, status, why it did not reach them, price. Up to
        1,000 a page. Read them all in order with cursor (each answer's
        next_cursor); page still works.


        Permission: Any key (Full, Send only or Read only).
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: The id.
        - name: status
          in: query
          required: false
          description: Filter by a message status.
          schema:
            type: string
        - name: page
          in: query
          required: false
          description: Page number, from 1 (or use cursor).
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: per_page
          in: query
          required: false
          description: How many on a page (at most 1000).
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 50
        - name: cursor
          in: query
          required: false
          description: next_cursor from the page before. Leave out for the first page.
          schema:
            type: string
      responses:
        '200':
          description: A page of messages.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Message'
                  page:
                    type:
                      - integer
                      - 'null'
                  per_page:
                    type: integer
                  total:
                    type: integer
                  next_cursor:
                    type:
                      - string
                      - 'null'
              example:
                data:
                  - id: string
                    to: string
                    customer:
                      phone: string
                      user_id: string
                      username: string
                    country: string
                    type: string
                    category: string
                    campaign_id: string
                    campaign_reference: string
                    text: string
                    media:
                      id: string
                      type: string
                      mime_type: string
                    status: accepted
                    reason: string
                    failure:
                      code: string
                      message: string
                    price: string
                    charged: string
                    currency: string
                    reference: string
                    created_at: string
                    accepted_at: string
                    delivered_at: string
                    read_at: string
                    failed_at: string
                    timeline:
                      - status: string
                        at: string
                page: 1
                per_page: 1
                total: 1
                next_cursor: string
        '400':
          description: 'validation_error: Some fields are missing or wrong.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                validation_error:
                  value:
                    error:
                      code: validation_error
                      message: Some fields are missing or wrong.
        '401':
          description: 'unauthorized: API key is missing or not valid.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                unauthorized:
                  value:
                    error:
                      code: unauthorized
                      message: API key is missing or not valid.
        '403':
          description: >-
            key_off: This API key is switched off. · forbidden_scope: This API
            key isn't allowed to do this. · ip_not_allowed: Requests from this
            IP address aren't allowed for this key. · needs_pro_plan: The API
            needs the Pro plan. · plan_ended: Your plan has ended. Renew it to
            send messages.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                key_off:
                  value:
                    error:
                      code: key_off
                      message: This API key is switched off.
                forbidden_scope:
                  value:
                    error:
                      code: forbidden_scope
                      message: This API key isn't allowed to do this.
                ip_not_allowed:
                  value:
                    error:
                      code: ip_not_allowed
                      message: >-
                        Requests from this IP address aren't allowed for this
                        key.
                needs_pro_plan:
                  value:
                    error:
                      code: needs_pro_plan
                      message: The API needs the Pro plan.
                plan_ended:
                  value:
                    error:
                      code: plan_ended
                      message: Your plan has ended. Renew it to send messages.
        '404':
          description: 'not_found: Not found.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                not_found:
                  value:
                    error:
                      code: not_found
                      message: Not found.
        '429':
          description: 'rate_limited: Too many requests. Try again in a few seconds.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                rate_limited:
                  value:
                    error:
                      code: rate_limited
                      message: Too many requests. Try again in a few seconds.
        '500':
          description: 'server_error: Something went wrong on our side. Try again.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                server_error:
                  value:
                    error:
                      code: server_error
                      message: Something went wrong on our side. Try again.
components:
  schemas:
    Message:
      type: object
      properties:
        id:
          type: string
        to:
          type:
            - string
            - 'null'
          description: The customer's phone; null when they shared none (see customer).
        customer:
          $ref: '#/components/schemas/Customer'
        country:
          type:
            - string
            - 'null'
        type:
          type: string
        category:
          type:
            - string
            - 'null'
        campaign_id:
          type:
            - string
            - 'null'
          description: The campaign it belongs to; null when it is not a campaign message.
        campaign_reference:
          type:
            - string
            - 'null'
          description: That campaign's reference.
        text:
          type:
            - string
            - 'null'
          description: The words that were sent (a template with its values put in).
        media:
          type:
            - object
            - 'null'
          description: >-
            The file that was sent: id (for GET /v1/media/{id}), type and
            mime_type; null when none.
          properties:
            id:
              type:
                - string
                - 'null'
            type:
              type: string
            mime_type:
              type:
                - string
                - 'null'
        status:
          type: string
          enum:
            - accepted
            - sent
            - delivered
            - read
            - failed
        reason:
          type:
            - string
            - 'null'
        failure:
          type:
            - object
            - 'null'
          properties:
            code:
              type: string
            message:
              type: string
        price:
          type:
            - string
            - 'null'
        charged:
          type:
            - string
            - 'null'
        currency:
          type: string
        reference:
          type:
            - string
            - 'null'
        created_at:
          type:
            - string
            - 'null'
        accepted_at:
          type:
            - string
            - 'null'
        delivered_at:
          type:
            - string
            - 'null'
        read_at:
          type:
            - string
            - 'null'
        failed_at:
          type:
            - string
            - 'null'
        timeline:
          type: array
          items:
            type: object
            properties:
              status:
                type: string
              at:
                type: string
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
            field:
              type: string
              description: The one field that is wrong, when there is one.
    Customer:
      type: object
      description: >-
        Who the customer is. phone can be null: a customer who uses a WhatsApp
        username may not share their number. user_id is WhatsApp's
        business-scoped user ID (for example "IN.13491208655302741918").
      properties:
        phone:
          type:
            - string
            - 'null'
        user_id:
          type:
            - string
            - 'null'
        username:
          type:
            - string
            - 'null'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Your API key, e.g. gr_live_…

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.