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

# Get Queue Status

> Returns the live status of the message send queue of the phone in the x-phone header.

<Warning>
  **Deprecated.** Use [`GET /message/queues/health`](/api-reference/message/queue-health) instead
</Warning>


## OpenAPI

````yaml api-reference/openapi-generated.json GET /v1/queue
openapi: 3.0.3
info:
  title: Periskope API
  version: 1.0.0
  description: >-
    Periskope external API.


    Responses use a flat, unwrapped shape: most endpoints return the resource at
    the top level, and list endpoints return a wrapper object with pagination
    inline (e.g. `{ from, to, count, chats: [...] }`). The documented response
    schemas describe these shapes directly.
servers:
  - url: https://api.periskope.app
security:
  - bearerAuth: []
paths:
  /v1/queue:
    get:
      tags:
        - Queue
      summary: Get the message queue status
      description: >-
        Returns the live status of the message send queue of the phone in the
        x-phone header.
      operationId: getQueueStatus
      parameters:
        - schema:
            type: string
            minLength: 1
            example: '919876543210'
            description: >-
              Phone to act with: country code + number without symbols or spaces
              (e.g. 911111111111), or a phone_id (phone-xxxxxxxxxxxx). The phone
              must be connected to the org and accessible by the API token.
          required: true
          description: >-
            Phone to act with: country code + number without symbols or spaces
            (e.g. 911111111111), or a phone_id (phone-xxxxxxxxxxxx). The phone
            must be connected to the org and accessible by the API token.
          name: x-phone
          in: header
      responses:
        '200':
          description: The current status of the message queue
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueueStatus'
              examples:
                default:
                  summary: Response body
                  value:
                    is_running: true
                    active: 0
                    completed: 16
                    failed: 10
                    pending: 0
        '400':
          description: The phone server is disconnected or not reachable
          content:
            application/json:
              examples:
                error:
                  summary: The phone server is disconnected or not reachable
                  value:
                    code: ERROR
                    message: The phone server is disconnected or not reachable
                    status: 400
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: ERROR
                  message:
                    type: string
                    example: The phone server is disconnected or not reachable
                  status:
                    type: integer
                    example: 400
                example:
                  code: ERROR
                  message: The phone server is disconnected or not reachable
                  status: 400
        '401':
          description: Invalid, expired or missing API token
          content:
            application/json:
              examples:
                error:
                  summary: Invalid, expired or missing API token
                  value:
                    code: UNAUTHORIZED_ERROR
                    message: Invalid bearer auth token
                    status: 401
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED_ERROR
                  message:
                    type: string
                    example: Invalid bearer auth token
                  status:
                    type: integer
                    example: 401
                example:
                  code: UNAUTHORIZED_ERROR
                  message: Invalid bearer auth token
                  status: 401
        '422':
          description: Request validation failed
          content:
            application/json:
              examples:
                error:
                  summary: Request validation failed
                  value:
                    code: VALIDATION_ERROR
                    message: Request validation failed
                    status: 422
                    fields:
                      body.chat_id:
                        message: chat_id is required
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: VALIDATION_ERROR
                  message:
                    type: string
                    example: Request validation failed
                  status:
                    type: integer
                    example: 422
                  fields:
                    type: object
                    additionalProperties:
                      type: object
                      properties:
                        message:
                          type: string
                        value: {}
                    example:
                      body.chat_id:
                        message: chat_id is required
                example:
                  code: VALIDATION_ERROR
                  message: Request validation failed
                  status: 422
                  fields:
                    body.chat_id:
                      message: chat_id is required
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              examples:
                error:
                  summary: Rate limit exceeded
                  value:
                    code: RATE_LIMIT_ERROR
                    message: You can only make 100 requests per second
                    status: 429
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: RATE_LIMIT_ERROR
                  message:
                    type: string
                    example: You can only make 100 requests per second
                  status:
                    type: integer
                    example: 429
                example:
                  code: RATE_LIMIT_ERROR
                  message: You can only make 100 requests per second
                  status: 429
        '500':
          description: Internal server error
          content:
            application/json:
              examples:
                error:
                  summary: Internal server error
                  value:
                    code: UNKNOWN_ERROR
                    message: Internal server error
                    status: 500
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNKNOWN_ERROR
                  message:
                    type: string
                    example: Internal server error
                  status:
                    type: integer
                    example: 500
                example:
                  code: UNKNOWN_ERROR
                  message: Internal server error
                  status: 500
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: typescript
          label: TypeScript
          source: |-
            import { PeriskopeApi } from '@periskope/periskope-client';

            const client = new PeriskopeApi({
              authToken: 'YOUR_API_KEY',
              phone: '919876543210', // the phone to act with (x-phone)
            });

            async function main() {
              const response = await client.queue.getQueueStatus();
              console.log(response);
            }

            main();
        - lang: bash
          label: cURL
          source: |-
            curl -X GET 'https://api.periskope.app/v1/queue' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'x-phone: 919876543210'
components:
  schemas:
    QueueStatus:
      type: object
      properties:
        is_running:
          type: boolean
          description: >-
            Whether the message queue of the phone is currently running. Reverts
            to false while the phone connection is DISCONNECTED — queued jobs
            wait until the phone reconnects.
          example: true
        active:
          type: integer
          description: >-
            Number of jobs currently being processed (submitted to WhatsApp) by
            the queue
          example: 0
        completed:
          type: integer
          description: Number of jobs that completed successfully in the last 24 hours
          example: 16
        failed:
          type: integer
          description: Number of jobs that failed in the last 24 hours
          example: 10
        pending:
          type: integer
          description: Number of jobs currently waiting in the queue to be processed
          example: 0
      description: >-
        Live status of the message send queue of a phone. Every outgoing message
        and broadcast is queued on the phone instance and submitted to WhatsApp
        one job at a time.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your Periskope API token, sent as `Authorization: Bearer <token>`.
        Generate one from the Periskope dashboard under **Settings → API &
        Webhooks**. API access requires an active Pro or Enterprise plan.

````

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