Skip to main content
POST
/
v1
/
files
/
presign
Create A File
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": {}
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required
mime_type
string
required
size
integer
required

File size in bytes. Max:

Required range: 0 <= x <= 52428800
purpose
enum<string>
required
Available options:
knowledge-base,
email,
chat

Response

Successful response

attachment
object
required
presigned_url
object
required