curl --request POST \
--url http://api.stuut.ai/v1/files/presign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"mime_type": "<string>",
"size": 26214400,
"purpose": "knowledge-base"
}
'{
"attachment": {
"file_type": "audio",
"mime_type": "<string>",
"name": "<string>",
"object": "<string>",
"organization_id": "<string>",
"id": "<string>",
"content_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"disposition": "<string>",
"is_verified": true,
"modified_at": "2023-11-07T05:31:56Z",
"presigned_url": "<string>",
"presigned_url_expires_at": "2023-11-07T05:31:56Z",
"purpose": "<string>",
"remote_id": "<string>",
"size": 123,
"src": "<unknown>",
"user_id": "<string>"
},
"presigned_url": {
"url": "<string>",
"fields": {}
}
}Returns a presigned url for the upload, along with an attachment which can be used across various endpoints.
curl --request POST \
--url http://api.stuut.ai/v1/files/presign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"mime_type": "<string>",
"size": 26214400,
"purpose": "knowledge-base"
}
'{
"attachment": {
"file_type": "audio",
"mime_type": "<string>",
"name": "<string>",
"object": "<string>",
"organization_id": "<string>",
"id": "<string>",
"content_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"disposition": "<string>",
"is_verified": true,
"modified_at": "2023-11-07T05:31:56Z",
"presigned_url": "<string>",
"presigned_url_expires_at": "2023-11-07T05:31:56Z",
"purpose": "<string>",
"remote_id": "<string>",
"size": 123,
"src": "<unknown>",
"user_id": "<string>"
},
"presigned_url": {
"url": "<string>",
"fields": {}
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Successful response
Show child attributes
audio, document, gif, image, video 83232The use case for this attachment
The address' third party API ID.
32