Skip to main content
POST
/
signed-uploads
Request file upload
curl --request POST \
  --url https://api.engine.usesophic.com/signed-uploads \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filename": "<string>",
  "purpose": "<unknown>",
  "content_type": "<string>"
}
'
{
  "id": "<string>",
  "filename": "<string>",
  "expires_at": "2023-11-07T05:31:56Z",
  "purpose": "<unknown>",
  "signed_upload_url": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "modified_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

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

Body

application/json
filename
string
required

The name of the file to be uploaded.

purpose
any
required

The purpose of the uploaded file.

content_type
string

The content type of the file to be uploaded, e.g. application/pdf.

Response

Created

Signed upload resource, including the signed URL that you can use to upload directly to the bucket.

id
string
required

Unique resource identifier.

filename
string
required

The name of the file to be uploaded.

expires_at
string<date-time>
required

The timestamp when the signed upload expires.

purpose
any
required

The purpose of the uploaded file.

signed_upload_url
string
required

The signed URL that you can use to upload directly to the bucket.

created_at
string<date-time>
required

The timestamp (in ISO-8601 format) of when the resource was created.

modified_at
string<date-time>
required

The timestamp (in ISO-8601 format) of when the resource was last modified.