List messages
import requests
url = "https://api.datagrid.com/v1/conversations/{conversation_id}/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.datagrid.com/v1/conversations/{conversation_id}/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.datagrid.com/v1/conversations/{conversation_id}/messages \
--header 'Authorization: Bearer <token>'{
"object": "list",
"data": [
{
"object": "conversation.message",
"id": "<string>",
"agent_id": "<string>",
"role": "user",
"content": [
{
"type": "text",
"text": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"conversation_id": "<string>",
"credits": {
"consumed": 123
},
"citations": [
{
"citation": "<string>",
"sources": [
{
"type": "image",
"source_name": "<string>",
"confirmations": [
"<string>"
],
"source_id": "<string>",
"source_uri": "<string>",
"external_url": "<string>",
"status": "<string>",
"status_color": "<string>",
"status_category": "open",
"fields": [
{
"label": "<string>",
"value": "<string>"
}
],
"item_type": "<string>",
"thumbnail_url": "<string>",
"page_number": 2
}
]
}
]
}
],
"has_more": true
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Messages
List messages
Returns the list of messages in a conversation.
GET
/
conversations
/
{conversation_id}
/
messages
List messages
import requests
url = "https://api.datagrid.com/v1/conversations/{conversation_id}/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.datagrid.com/v1/conversations/{conversation_id}/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.datagrid.com/v1/conversations/{conversation_id}/messages \
--header 'Authorization: Bearer <token>'{
"object": "list",
"data": [
{
"object": "conversation.message",
"id": "<string>",
"agent_id": "<string>",
"role": "user",
"content": [
{
"type": "text",
"text": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"conversation_id": "<string>",
"credits": {
"consumed": 123
},
"citations": [
{
"citation": "<string>",
"sources": [
{
"type": "image",
"source_name": "<string>",
"confirmations": [
"<string>"
],
"source_id": "<string>",
"source_uri": "<string>",
"external_url": "<string>",
"status": "<string>",
"status_color": "<string>",
"status_category": "open",
"fields": [
{
"label": "<string>",
"value": "<string>"
}
],
"item_type": "<string>",
"thumbnail_url": "<string>",
"page_number": 2
}
]
}
]
}
],
"has_more": true
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Authorizations
Query Parameters
Response
List of messages