Chat
Create a direct upload session for a thread attachment.
Create a direct upload session for a thread attachment. The request enforces thread membership and content visibility for the authenticated caller.
POST
/
api
/
v1
/
chat
/
threads
/
{threadId}
/
uploads
Create a direct upload session for a thread attachment.
curl --request POST \
--url https://api.revoengine.com/api/v1/chat/threads/{threadId}/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"retention": {
"ttlSeconds": 2,
"expiresAt": "2026-08-01T12:00:00.000Z"
},
"name": "contract.pdf",
"contentTypeHint": "application/pdf",
"sizeHint": 1048576,
"chatMessageId": "<string>",
"clientDraftId": "<string>",
"metadata": {
"source": "chat-composer"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
retention: {ttlSeconds: 2, expiresAt: '2026-08-01T12:00:00.000Z'},
name: 'contract.pdf',
contentTypeHint: 'application/pdf',
sizeHint: 1048576,
chatMessageId: '<string>',
clientDraftId: '<string>',
metadata: {source: 'chat-composer'}
})
};
fetch('https://api.revoengine.com/api/v1/chat/threads/{threadId}/uploads', 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}/uploads"
payload = {
"retention": {
"ttlSeconds": 2,
"expiresAt": "2026-08-01T12:00:00.000Z"
},
"name": "contract.pdf",
"contentTypeHint": "application/pdf",
"sizeHint": 1048576,
"chatMessageId": "<string>",
"clientDraftId": "<string>",
"metadata": { "source": "chat-composer" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Body
application/json
Response
200
OK.
⌘I
Create a direct upload session for a thread attachment.
curl --request POST \
--url https://api.revoengine.com/api/v1/chat/threads/{threadId}/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"retention": {
"ttlSeconds": 2,
"expiresAt": "2026-08-01T12:00:00.000Z"
},
"name": "contract.pdf",
"contentTypeHint": "application/pdf",
"sizeHint": 1048576,
"chatMessageId": "<string>",
"clientDraftId": "<string>",
"metadata": {
"source": "chat-composer"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
retention: {ttlSeconds: 2, expiresAt: '2026-08-01T12:00:00.000Z'},
name: 'contract.pdf',
contentTypeHint: 'application/pdf',
sizeHint: 1048576,
chatMessageId: '<string>',
clientDraftId: '<string>',
metadata: {source: 'chat-composer'}
})
};
fetch('https://api.revoengine.com/api/v1/chat/threads/{threadId}/uploads', 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}/uploads"
payload = {
"retention": {
"ttlSeconds": 2,
"expiresAt": "2026-08-01T12:00:00.000Z"
},
"name": "contract.pdf",
"contentTypeHint": "application/pdf",
"sizeHint": 1048576,
"chatMessageId": "<string>",
"clientDraftId": "<string>",
"metadata": { "source": "chat-composer" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
