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

# Return messages matching the parameters

GET https://example.ada.support/api/v2/export/messages

Returns a list of `message` objects along with a `next_page_uri` if applicable

Reference: https://docs.ada.cx/data-export-message-object/get-messages

## Authentication

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

## Request

### Query parameters

- `created_since` (string, required) — Return records that were created after this date. If `created_to` is not specified, only records within 7 days of this timestamp are returned. To retrieve data beyond that window, set `created_to` explicitly. Must be an ISO 8601 UTC timestamp ending with 'Z' (e.g., `2024-07-01T00:00:00Z`); required for valid API requests.
- `conversation_id` (string, optional, nullable) — Return records with a `conversation_id` that matches this id
- `page_size` (integer, optional, default: 10000) — Number of records to return in response. The maximum and default is 10000, the minimum is 100.
- `created_to` (string, optional, nullable) — Return records that were created earlier than this date. If not specified, this value defaults to 7 days after `created_since`. Must be an ISO 8601 UTC timestamp ending with 'Z' (e.g., `2024-07-01T00:00:00Z`); required for valid API requests.

## Response

### 200

Ada successfully processed the request

- `data` (list of Message, optional) — Records returned from the query
- `meta` (MessagesResponseMeta, optional)

## Errors

### 400 Bad Request Error

Invalid request

- `errors` (list of ErrorsErrorsItems, required) — A list of errors

### 401 Unauthorized Error

Unauthorized

- `errors` (list of ErrorsErrorsItems, required) — A list of errors

### 404 Not Found Error

Not Found

- `errors` (list of ErrorsErrorsItems, required) — A list of errors

### 429 Too Many Requests Error

Too Many Requests

- `errors` (list of ErrorsErrorsItems, required) — A list of errors

### 500 Internal Server Error

Internal Server Error

- `errors` (list of ErrorsErrorsItems, required) — A list of errors

## Types

### Message

- `_id` (string, optional) — Unique ID for the message record
- `answer_id` (string, optional, nullable) — Internal ID of the answer (response) that triggered this message. Null if the message was not sent by an Ada bot, and None if it was sent by a generative bot.
- `answer_title` (string, optional, nullable) — Title of the answer (response) that triggered this message. Null if the message was not sent by an Ada bot, or if it was sent by a generative bot.
- `chatter_id` (string, optional, nullable) — Internal ID of the chatter who sent this message. Corresponds to the `_id` field of Chatter objects.
- `conversation_id` (string, optional) — Internal ID of the conversation in which this message was sent. Corresponds to the `_id` field of Conversation objects.
- `date_created` (string, optional) — Time the record was created (UTC)
- `link_was_clicked` (boolean, optional, nullable) — Indicates if the link in the answer (response) was clicked
- `message_data` (MessageMessageData, optional) — Data associated with this message
- `recipient` (string, optional) — Recipient of this message
- `record_last_updated` (string, optional) — Date and time the record was uploaded to the API (UTC)
- `review` (integer, optional) — Rating given to this answer by the chatter
- `sender` (string, optional) — Sender of this message
- `in_response_to` (string, optional) — Internal ID of the message that this message is in response to. None if the message is not in response to another message.

### MessagesResponseMeta

- `next_page_uri` (string, optional, nullable) — Link to the next page of results matching the query

### ErrorsErrorsItems

- `type` (string, required) — The error type
- `message` (string, required) — The error message
- `details` (string, optional, nullable) — Extra information about the error

### MessageMessageData

Data associated with this message

## Examples

**Response**

```json
{
  "data": [
    {
      "_id": "5d8a7d080afd19b55945c8ab",
      "answer_id": "6392e0f865ba38041ddd5966",
      "answer_title": "Greeting",
      "chatter_id": "6009dd3c81dfae3a4e990acb",
      "conversation_id": "5dba43ebedb828146bc871b6",
      "date_created": "2019-10-31T14:28:02.865000+00:00",
      "link_was_clicked": false,
      "message_data": {
        "_type": "greeting",
        "external_chat_id": "<uuid_v4_id>",
        "reviewable_message": false
      },
      "recipient": "ada",
      "record_last_updated": "2019-10-31T14:28:02.865000+00:00",
      "review": 0,
      "sender": "b9e51eae-5449-4a46-b6ce-aef2dcb4e067",
      "in_response_to": "6392e0f865ba38041ddd5966"
    }
  ],
  "meta": {
    "next_page_uri": "https://example.ada.support/api/v2/export/messages?created_since=2023-07-01T14%3A01%3A16.257000%2B00%3A00&created_to=2023-07-22T00%3A00%3A00%2B00%3A00"
  }
}
```

**SDK Code**

```python
import requests

url = "https://example.ada.support/api/v2/export/messages"

querystring = {"created_since":"created_since"}

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

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

print(response.json())
```

```javascript
const url = 'https://example.ada.support/api/v2/export/messages?created_since=created_since';
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://example.ada.support/api/v2/export/messages?created_since=created_since"

	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://example.ada.support/api/v2/export/messages?created_since=created_since")

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://example.ada.support/api/v2/export/messages?created_since=created_since")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://example.ada.support/api/v2/export/messages?created_since=created_since', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://example.ada.support/api/v2/export/messages?created_since=created_since");
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://example.ada.support/api/v2/export/messages?created_since=created_since")! 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()
```