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

# Get chat sessions

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

Reference: https://docs.youratlas.com/api-reference/atlas-api/campaign-chat/get-chat-sessions

## 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)

## Response

### 200

Successful response

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

## Errors

### 500 Internal Server Error

Internal server error

- `error` (ErrorError, optional)

## Types

### ChatSession

A chat session. Uses Azure Table Storage (PascalCase) conventions.

- `PartitionKey` (string, optional) — Composite key `"<accountId> <campaignId>"` — the account id and campaign id separated by a single space. The account id may itself contain characters such as `|` (e.g. `google-oauth2|1115390...`); split on the last space, not the first.
- `RowKey` (string, optional) — Session id.
- `Timestamp` (datetime, optional)
- `Tittle` (string, optional) — Session title. Note: the field is spelled `Tittle` (a known misspelling of `Title`) in the live response.
- `ContactIdentification` (string, optional) — The contact. May be a phone number (E.164), an email address (Apple ID for iMessage contacts), or an internal contact id (UUID).
- `AIProviderSessionId` (string, optional) — Underlying provider session id (often equal to RowKey).
- `Status` (enum, optional)
  - Allowed values: `active`, `queued`, `failed`, `completed`, `pending_human_response`
- `EnableHumanHandoff` (boolean, optional) — Whether human handoff is currently enabled for this session's contact.
- `CreatedAt` (datetime, optional) — ISO 8601 creation time. Immutable — unlike `Timestamp`, which updates on every write, this records when the session was first created. Present on sessions created after July 2026.
- `ScheduledDate` (datetime, optional) — Present for scheduled sessions.

### ErrorError

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

## Examples

**Response**

```json
{
  "odata.metadata": "string",
  "value": [
    {
      "PartitionKey": "string",
      "RowKey": "string",
      "Timestamp": "2024-01-15T09:30:00Z",
      "Tittle": "string",
      "ContactIdentification": "string",
      "AIProviderSessionId": "string",
      "Status": "active",
      "EnableHumanHandoff": true,
      "CreatedAt": "2024-01-15T09:30:00Z",
      "ScheduledDate": "2024-01-15T09:30:00Z"
    }
  ]
}
```

**SDK Code**

```python
import requests

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

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

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

print(response.json())
```

```javascript
const url = 'https://api.youratlas.com/v1/api/campaign-chat/campaignId';
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
package main

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

func main() {

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

	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
require 'uri'
require 'net/http'

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

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
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

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

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

$client = new \GuzzleHttp\Client();

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

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

```csharp
using RestSharp;

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

```swift
import Foundation

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

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