Chat
Create an idempotent direct-upload batch for chat attachments.
Create an idempotent direct-upload batch for chat attachments. The request enforces thread membership and content visibility for the authenticated caller.
POST
/
api
/
v1
/
chat
/
threads
/
{threadId}
/
upload-batches
Create an idempotent direct-upload batch for chat attachments.
curl --request POST \
--url https://api.revoengine.com/api/v1/chat/threads/{threadId}/upload-batches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clientDraftId": "draft-01hx3k4z7pq9",
"files": [
{
"localId": "attachment-local-1",
"name": "migration.csv",
"contentTypeHint": "text/csv",
"size": 1048576
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clientDraftId: 'draft-01hx3k4z7pq9',
files: [
{
localId: 'attachment-local-1',
name: 'migration.csv',
contentTypeHint: 'text/csv',
size: 1048576
}
]
})
};
fetch('https://api.revoengine.com/api/v1/chat/threads/{threadId}/upload-batches', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revoengine.com/api/v1/chat/threads/{threadId}/upload-batches"
payload = {
"clientDraftId": "draft-01hx3k4z7pq9",
"files": [
{
"localId": "attachment-local-1",
"name": "migration.csv",
"contentTypeHint": "text/csv",
"size": 1048576
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Authorizations
Bearer JWT token or API Key (sk-*).
Path Parameters
Body
application/json
Response
200
OK.
⌘I
Create an idempotent direct-upload batch for chat attachments.
curl --request POST \
--url https://api.revoengine.com/api/v1/chat/threads/{threadId}/upload-batches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clientDraftId": "draft-01hx3k4z7pq9",
"files": [
{
"localId": "attachment-local-1",
"name": "migration.csv",
"contentTypeHint": "text/csv",
"size": 1048576
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clientDraftId: 'draft-01hx3k4z7pq9',
files: [
{
localId: 'attachment-local-1',
name: 'migration.csv',
contentTypeHint: 'text/csv',
size: 1048576
}
]
})
};
fetch('https://api.revoengine.com/api/v1/chat/threads/{threadId}/upload-batches', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revoengine.com/api/v1/chat/threads/{threadId}/upload-batches"
payload = {
"clientDraftId": "draft-01hx3k4z7pq9",
"files": [
{
"localId": "attachment-local-1",
"name": "migration.csv",
"contentTypeHint": "text/csv",
"size": 1048576
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
