> This page is for version Generative (default).
> For other versions, use one of these documentation indexes:
> - Generative (default): https://developers.ada.cx/generative/llms.txt
> - Scripted: https://developers.ada.cx/scripted/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.ada.cx/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.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://developers.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
- `conversation_id` (string, optional) — 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) — Return records that were created earlier than this date. If not specified, this value defaults to 7 days after `created_since`.

## Response

### 200

Ada successfully processed the request

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

## Types

### Message

- `_id` (string, optional) — Unique ID for the message record
- `answer_id` (string, optional) — 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) — 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) — 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) — 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) — Link to the next page of results matching the query

### MessageMessageData

Data associated with this message

## Examples

**Response**

```json
{
  "items": [
    {
      "_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": {},
      "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":"2023-07-03T00:00:00z","conversation_id":"60bd36dc8f17071b5c5bec12","page_size":"10000","created_to":"2023-07-03T00:00:00z"}

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=2023-07-03T00%3A00%3A00z&conversation_id=60bd36dc8f17071b5c5bec12&page_size=10000&created_to=2023-07-03T00%3A00%3A00z';
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=2023-07-03T00%3A00%3A00z&conversation_id=60bd36dc8f17071b5c5bec12&page_size=10000&created_to=2023-07-03T00%3A00%3A00z"

	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=2023-07-03T00%3A00%3A00z&conversation_id=60bd36dc8f17071b5c5bec12&page_size=10000&created_to=2023-07-03T00%3A00%3A00z")

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=2023-07-03T00%3A00%3A00z&conversation_id=60bd36dc8f17071b5c5bec12&page_size=10000&created_to=2023-07-03T00%3A00%3A00z")
  .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=2023-07-03T00%3A00%3A00z&conversation_id=60bd36dc8f17071b5c5bec12&page_size=10000&created_to=2023-07-03T00%3A00%3A00z', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp 
using RestSharp;

var client = new RestClient("https://example.ada.support/api/v2/export/messages?created_since=2023-07-03T00%3A00%3A00z&conversation_id=60bd36dc8f17071b5c5bec12&page_size=10000&created_to=2023-07-03T00%3A00%3A00z");
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=2023-07-03T00%3A00%3A00z&conversation_id=60bd36dc8f17071b5c5bec12&page_size=10000&created_to=2023-07-03T00%3A00%3A00z")! 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()
```