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

# List queued calls

GET https://api.levrage.ai/v1/calls/queued

Calls placed with POST /call outside calling hours, newest first. A waiting call
goes out at `scheduled_for`; once placed, `session_id` is the call (GET /calls/\{call\_id})
and `call_status` its result.

Reference: https://docs.levrage.ai/api-reference/calls/list-queued-calls

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Query parameters

- `page` (integer, optional, default: 1) — Page number
- `page_size` (integer, optional, default: 20) — Items per page
- `status` (string, optional, nullable) — waiting, calling, placed, completed, not_reached, failed, cancelled, expired
- `state` (enum, optional, nullable) — open = still to go out or on the call; finished; cancelled
  - Allowed values: `open`, `finished`, `cancelled`
- `phone_number` (string, optional, nullable) — Only this number's queued calls

## Response

### 200

Successful Response

- `data` (list of QueuedCall, required)
- `total` (integer, required)
- `page` (integer, required)
- `page_size` (integer, required)
- `has_more` (boolean, required)
- `request_id` (string, required)
- `timestamp` (datetime, required)
- `success` (boolean, optional, default: true)

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### QueuedCall

A call placed with POST /call outside calling hours, held until they open.

- `id` (string, required) — Queued call ID
- `status` (string, required) — waiting, calling, placed, completed (answered), not_reached, failed, cancelled, expired
- `agent_id` (string, required)
- `phone_number` (string, required)
- `source_number` (string, required)
- `open` (boolean, optional, default: false) — Still to go out, or on the call now
- `metadata` (QueuedCallMetadata, optional, nullable) — The metadata of the latest request for this number
- `note` (string, optional, nullable) — Why it is waiting, or how it ended
- `requests` (integer, optional, default: 1) — Requests for this number that joined this one call
- `scheduled_for` (datetime, optional, nullable) — When it goes out (while waiting)
- `expires_at` (datetime, optional, nullable) — Not placed after this, it is given up
- `placed_at` (datetime, optional, nullable)
- `session_id` (string, optional, nullable) — Once placed: the call's session\_id (GET /calls/\{call\_id})
- `call_status` (string, optional, nullable) — Once placed: the call's status in call history
- `retry` (QueuedCallRetry, optional, nullable) — Retry settings, when it is called again if not answered
- `attempts` (integer, optional, default: 0) — Tries placed so far
- `tries` (integer, optional, default: 1) — Calls at most: the first plus its retries
- `last_outcome` (string, optional, nullable) — The last try's outcome (no_answer, busy, completed…)
- `history` (list of QueuedCallHistoryItems, optional) — Every try: attempt, session_id, status, at
- `created_at` (datetime, optional, nullable)
- `updated_at` (datetime, optional, nullable)
- `finished_at` (datetime, optional, nullable)

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### QueuedCallMetadata

The metadata of the latest request for this number

### QueuedCallRetry

Retry settings, when it is called again if not answered

### QueuedCallHistoryItems

### ValidationErrorLocItems

- string
- integer

## Examples

**Response**

```json
{
  "data": [
    {
      "id": "string",
      "status": "string",
      "agent_id": "string",
      "phone_number": "string",
      "source_number": "string",
      "open": false,
      "metadata": {},
      "note": "string",
      "requests": 1,
      "scheduled_for": "2024-01-15T09:30:00Z",
      "expires_at": "2024-01-15T09:30:00Z",
      "placed_at": "2024-01-15T09:30:00Z",
      "session_id": "string",
      "call_status": "string",
      "retry": {},
      "attempts": 0,
      "tries": 1,
      "last_outcome": "string",
      "history": [
        {}
      ],
      "created_at": "2024-01-15T09:30:00Z",
      "updated_at": "2024-01-15T09:30:00Z",
      "finished_at": "2024-01-15T09:30:00Z"
    }
  ],
  "total": 1,
  "page": 1,
  "page_size": 1,
  "has_more": true,
  "request_id": "string",
  "timestamp": "2024-01-15T09:30:00Z",
  "success": true
}
```

**SDK Code**

```python
import requests

url = "https://api.levrage.ai/v1/calls/queued"

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

```javascript
const url = 'https://api.levrage.ai/v1/calls/queued';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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"
	"net/http"
	"io"
)

func main() {

	url := "https://api.levrage.ai/v1/calls/queued"

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

	req.Header.Add("Authorization", "Bearer <token>")

	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.levrage.ai/v1/calls/queued")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

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.levrage.ai/v1/calls/queued")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.levrage.ai/v1/calls/queued', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.levrage.ai/v1/calls/queued");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.levrage.ai/v1/calls/queued")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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()
```