> This page is for version v2.
> For other versions, use one of these documentation indexes:
> - v1 (default): https://doc.youratlas.com/v1/llms.txt
> - v2: https://doc.youratlas.com/v2/llms.txt

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

# Get all bookings

GET https://api.youratlas.com/v1/api/campaign/{campaignId}/bookings

Lists the appointments booked by a campaign's agents.

Reference: https://doc.youratlas.com/api-reference/atlas-api/bookings/get-bookings

## Authentication

- `api-key` header (required) — Your Atlas API key. Get it from the Atlas Portal under Settings > API Keys.

## Request

### Path parameters

- `campaignId` (string, required) — ID of the campaign.

## Response

### 200

Successful response

- `odata.metadata` (string, optional)
- `value` (list of Booking, optional)

## Errors

### 401 Unauthorized Error

Invalid or missing API key

- `error` (ErrorError, optional)

### 500 Internal Server Error

Internal server error

- `error` (ErrorError, optional)

## Types

### Booking

- `odata.etag` (string, optional)
- `PartitionKey` (string, optional)
- `RowKey` (string, optional)
- `Timestamp` (datetime, optional)
- `BookingDate` (datetime, optional)
- `CallId` (string, optional)
- `CustomerEmail` (string, optional)
- `CustomerName` (string, optional)
- `CalendarId` (string, optional)
- `Reason` (string, optional) — Description when booking failed
- `Status` (enum, optional)
  - Allowed values: `booking`, `success`, `fail`

### ErrorError

- `message` (string, optional)
- `code` (string, optional)
- `requestId` (string, optional)

## Examples

**Response**

```json
{
  "odata.metadata": "https://api.youratlas.com/v1/api/$metadata#items",
  "value": [
    {
      "odata.etag": "W/\"datetime'2026-03-04T15%3A30%3A00.000Z'\"",
      "PartitionKey": "auth0|example-customer-001",
      "RowKey": "3f2a9c1e-5b7d-4e8a-9c21-0a1b2c3d4e5f",
      "Timestamp": "2026-03-04T15:30:00Z",
      "BookingDate": "2026-03-04T15:30:00Z",
      "CallId": "3f2a9c1e-5b7d-4e8a-9c21-0a1b2c3d4e5f",
      "CustomerEmail": "jane.doe@example.com",
      "CustomerName": "Jane",
      "CalendarId": "3f2a9c1e-5b7d-4e8a-9c21-0a1b2c3d4e5f",
      "Reason": "example",
      "Status": "booking"
    }
  ]
}
```

**SDK Code**

```python Bookings_getBookings_example
import requests

url = "https://api.youratlas.com/v1/api/campaign/campaignId/bookings"

headers = {"api-key": "<apiKey>"}

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

print(response.json())
```

```javascript Bookings_getBookings_example
const url = 'https://api.youratlas.com/v1/api/campaign/campaignId/bookings';
const options = {method: 'GET', headers: {'api-key': '<apiKey>'}};

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

```go Bookings_getBookings_example
package main

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

func main() {

	url := "https://api.youratlas.com/v1/api/campaign/campaignId/bookings"

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

	req.Header.Add("api-key", "<apiKey>")

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

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

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

}
```

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

url = URI("https://api.youratlas.com/v1/api/campaign/campaignId/bookings")

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

request = Net::HTTP::Get.new(url)
request["api-key"] = '<apiKey>'

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

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

HttpResponse<String> response = Unirest.get("https://api.youratlas.com/v1/api/campaign/campaignId/bookings")
  .header("api-key", "<apiKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.youratlas.com/v1/api/campaign/campaignId/bookings', [
  'headers' => [
    'api-key' => '<apiKey>',
  ],
]);

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

```csharp Bookings_getBookings_example
using RestSharp;

var client = new RestClient("https://api.youratlas.com/v1/api/campaign/campaignId/bookings");
var request = new RestRequest(Method.GET);
request.AddHeader("api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Bookings_getBookings_example
import Foundation

let headers = ["api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.youratlas.com/v1/api/campaign/campaignId/bookings")! 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()
```