import requests
url = "https://api.datagrid.com/v1/conversations/{conversation_id}/messages/{message_id}"
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/{message_id}', 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/{message_id} \
--header 'Authorization: Bearer <token>'{
"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
}
]
}
]
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Retrieve message
Retrieves a message by id.
import requests
url = "https://api.datagrid.com/v1/conversations/{conversation_id}/messages/{message_id}"
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/{message_id}', 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/{message_id} \
--header 'Authorization: Bearer <token>'{
"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
}
]
}
]
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The id of the message to retrieve.
Response
Retrieved message
The conversation.message object represents a message in a conversation.
The object type, which is always conversation.message.
conversation.message The message identifier.
The ID of the agent that sent or responded to the message.
The role of the message sender - either 'user' or 'agent'.
user, agent Contents of the message.
Text content for a message.
- Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
The ISO string for when the message was created.
The ID of the conversation the message belongs to.
Credit consumption for this converse turn. null for user-role messages and when retrieving messages from conversation history.
Show child attributes
Show child attributes
Array of citations that provide sources for factual statements in the response. Each citation includes the referenced text and its sources.
Show child attributes
Show child attributes