cURL
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.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
File size in bytes. Max:
0 <= x <= 52428800
knowledge-base
email
chat
Successful response
Show child attributes