> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.messageblue.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.messageblue.ai/_mcp/server.

# Queue snapshot for all connected agents

GET https://api.messageblue.ai/queue/status

Fans out a queue_status request to every agent currently connected to this gateway instance and aggregates pending/processing job counts.

Reference: https://docs.messageblue.ai/api-reference/operations/queue-status-all

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: swagger
  version: 1.0.0
paths:
  /queue/status:
    get:
      operationId: queueStatusAll
      summary: Queue snapshot for all connected agents
      description: >-
        Fans out a queue_status request to every agent currently connected to
        this gateway instance and aggregates pending/processing job counts.
      tags:
        - operations
      parameters:
        - name: limit
          in: query
          description: Max jobs returned per agent snapshot.
          required: false
          schema:
            type: integer
            default: 200
        - name: includeText
          in: query
          required: false
          schema:
            type: boolean
            default: true
        - name: textPreviewLen
          in: query
          required: false
          schema:
            type: integer
            default: 200
        - name: timeoutMs
          in: query
          description: Per-agent WebSocket timeout in milliseconds.
          required: false
          schema:
            type: integer
            default: 5000
        - name: X-App-Id
          in: header
          description: >-
            Your MessageBlue App ID, sent in clear on every request. It is
            paired with request signing: each request is also signed with your
            App Secret (see the **Authentication** tag). The App Secret itself
            is NEVER transmitted — it is only the HMAC signing key.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Aggregated queue status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueueStatusAllResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
servers:
  - url: https://api.messageblue.ai
    description: Production
  - url: http://localhost:8080
    description: Local development
components:
  schemas:
    QueueStatusAllResponseDataTotals:
      type: object
      properties:
        pending:
          type: integer
        processing:
          type: integer
        totalActive:
          type: integer
        byType:
          type: object
          additionalProperties:
            type: integer
      title: QueueStatusAllResponseDataTotals
    QueueSnapshotSummary:
      type: object
      properties:
        total:
          type: integer
        totalActive:
          type: integer
        pending:
          type: integer
        processing:
          type: integer
        byType:
          type: object
          additionalProperties:
            type: integer
        busy:
          type: boolean
        busyForMs:
          type: integer
      title: QueueSnapshotSummary
    QueueJobSnapshotType:
      type: string
      enum:
        - typing_indicator
        - stop_typing
        - read_receipt
        - outbound_msg
      title: QueueJobSnapshotType
    QueueJobSnapshotStatus:
      type: string
      enum:
        - pending
        - processing
        - done
        - failed
      title: QueueJobSnapshotStatus
    QueueJobSnapshot:
      type: object
      properties:
        id:
          type: integer
        jobId:
          type:
            - string
            - 'null'
        type:
          $ref: '#/components/schemas/QueueJobSnapshotType'
        status:
          $ref: '#/components/schemas/QueueJobSnapshotStatus'
        to:
          type:
            - string
            - 'null'
        chatIdentifier:
          type:
            - string
            - 'null'
        duration:
          type:
            - integer
            - 'null'
        textPreview:
          type:
            - string
            - 'null'
        enqueuedAtMs:
          type: integer
        waitingForMs:
          type: integer
      title: QueueJobSnapshot
    QueueSnapshot:
      type: object
      properties:
        agentNumber:
          type: string
        machineId:
          type: string
        capturedAtMs:
          type: integer
        limit:
          type: integer
        truncated:
          type: boolean
        summary:
          $ref: '#/components/schemas/QueueSnapshotSummary'
        jobs:
          type: array
          items:
            $ref: '#/components/schemas/QueueJobSnapshot'
      title: QueueSnapshot
    QueueStatusAllResponseDataAgentsItems:
      type: object
      properties:
        number:
          type: string
        ok:
          type: boolean
        error:
          type:
            - string
            - 'null'
        machineId:
          type:
            - string
            - 'null'
        lastSeenMs:
          type:
            - integer
            - 'null'
        queue:
          oneOf:
            - $ref: '#/components/schemas/QueueSnapshot'
            - type: 'null'
      title: QueueStatusAllResponseDataAgentsItems
    QueueStatusAllResponseData:
      type: object
      properties:
        connectedAgents:
          type: integer
        pendingJobsInFlight:
          type: integer
          description: Gateway-side pending WebSocket jobs awaiting agent response.
        totals:
          $ref: '#/components/schemas/QueueStatusAllResponseDataTotals'
        agents:
          type: array
          items:
            $ref: '#/components/schemas/QueueStatusAllResponseDataAgentsItems'
      description: Endpoint-specific payload wrapped in a standard success envelope.
      title: QueueStatusAllResponseData
    ResponseMeta:
      type: object
      properties:
        requestId:
          type: string
          format: uuid
        timestamp:
          type: string
          format: date-time
      required:
        - requestId
        - timestamp
      title: ResponseMeta
    QueueStatusAllResponse:
      type: object
      properties:
        ok:
          type: boolean
        data:
          $ref: '#/components/schemas/QueueStatusAllResponseData'
          description: Endpoint-specific payload wrapped in a standard success envelope.
        meta:
          $ref: '#/components/schemas/ResponseMeta'
      required:
        - ok
        - data
        - meta
      title: QueueStatusAllResponse
    FieldError:
      type: object
      properties:
        field:
          type: string
        issue:
          type: string
        message:
          type: string
      required:
        - field
        - issue
        - message
      title: FieldError
    ErrorResponseErrorDetails0:
      type: array
      items:
        $ref: '#/components/schemas/FieldError'
      title: ErrorResponseErrorDetails0
    ErrorResponseErrorDetails:
      oneOf:
        - $ref: '#/components/schemas/ErrorResponseErrorDetails0'
        - type: object
          additionalProperties:
            description: Any type
      description: Field validation errors (array) or domain-specific context (object).
      title: ErrorResponseErrorDetails
    ErrorResponseError:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        requestId:
          type: string
          format: uuid
        details:
          $ref: '#/components/schemas/ErrorResponseErrorDetails'
          description: Field validation errors (array) or domain-specific context (object).
      required:
        - code
        - message
        - requestId
      title: ErrorResponseError
    ErrorResponse:
      type: object
      properties:
        ok:
          type: boolean
        error:
          $ref: '#/components/schemas/ErrorResponseError'
      required:
        - ok
        - error
      title: ErrorResponse
  securitySchemes:
    appId:
      type: apiKey
      in: header
      name: X-App-Id
      description: >-
        Your MessageBlue App ID, sent in clear on every request. It is paired
        with request signing: each request is also signed with your App Secret
        (see the **Authentication** tag). The App Secret itself is NEVER
        transmitted — it is only the HMAC signing key.

```

## Examples



**Request**

```json
{}
```

**Response**

```json
{
  "ok": true,
  "data": {
    "connectedAgents": 3,
    "pendingJobsInFlight": 5,
    "totals": {
      "pending": 7,
      "processing": 3,
      "totalActive": 10,
      "byType": {
        "outbound_msg": 6,
        "read_receipt": 1,
        "stop_typing": 1,
        "typing_indicator": 2
      }
    },
    "agents": [
      {
        "number": "+14155552671",
        "ok": true,
        "error": null,
        "machineId": "macbook-pro-01",
        "lastSeenMs": 1689001234567,
        "queue": {
          "agentNumber": "+14155552671",
          "machineId": "macbook-pro-01",
          "capturedAtMs": 1689001234567,
          "limit": 200,
          "truncated": false,
          "summary": {
            "total": 4,
            "totalActive": 4,
            "pending": 3,
            "processing": 1,
            "byType": {
              "outbound_msg": 3,
              "typing_indicator": 1
            },
            "busy": true,
            "busyForMs": 12000
          },
          "jobs": [
            {
              "id": 101,
              "jobId": "job-abc123",
              "type": "outbound_msg",
              "status": "pending",
              "to": "+14155551234",
              "chatIdentifier": "chat-xyz789",
              "duration": null,
              "textPreview": "Hey, are you available for a quick call?",
              "enqueuedAtMs": 1689001200000,
              "waitingForMs": 30000
            }
          ]
        }
      }
    ]
  },
  "meta": {
    "requestId": "550e8400-e29b-41d4-a716-446655440000",
    "timestamp": "2026-07-10T06:00:00.000Z"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.messageblue.ai/queue/status"

payload = {}
headers = {
    "X-App-Id": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.get(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.messageblue.ai/queue/status';
const options = {
  method: 'GET',
  headers: {'X-App-Id': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.messageblue.ai/queue/status"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", url, payload)

	req.Header.Add("X-App-Id", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.messageblue.ai/queue/status")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-App-Id"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.messageblue.ai/queue/status")
  .header("X-App-Id", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.messageblue.ai/queue/status', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-App-Id' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.messageblue.ai/queue/status");
var request = new RestRequest(Method.GET);
request.AddHeader("X-App-Id", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-App-Id": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.messageblue.ai/queue/status")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```