Get Attachments
Overview
In this guide we will show you how to get the list of attachments in an existing conversation.
Prerequisites
- apiKey: The API key you want to use. (Get Assistant API Key)
- assistantId: The ID of the assistant you want to refer to.
- conversationId: The ID of the conversation you want to get the attachments from. (Create a Conversation)
- conversationToken: The token of the conversation you want to get the attachments from. (Create a Conversation)
Request
Endpoint
Make a GET request to the following endpoint:
https://api.pupau.ai/chat-bots/:assistantId/conversations/:conversationId/attachments
Request Headers
Api-Key: <apiKey>
Conversation-Token: <conversationToken>
Response
You will receive a JSON with the list of attachments in the conversation. Here's an example:
[
{
"id": "atId1",
"link": "",
"fileName": "example.txt",
"extension": "txt",
"summary": false,
"tokenCount": 5,
"ragId": null,
"type": "TEXT",
"previousQueryId": null,
"conversationId": "conv1",
"companyId": "comp1",
"userId": "user1"
},
{
"id": "atId2",
"link": "",
"fileName": "example2.pdf",
"extension": "pdf",
"summary": false,
"tokenCount": 10,
"ragId": null,
"type": "TEXT",
"previousQueryId": null,
"conversationId": "conv1",
"companyId": "comp1",
"userId": "user1"
}
]