Skip to main content
POST
Get a presigned URL for a direct file upload

Authorizations

x-token
string
header
required

Body

application/json
name
string
required

Original file name.

Example:

"invoice.pdf"

extension
string
required

File extension (lowercase, no dot). Must be an accepted extension.

Example:

"pdf"

size
integer
required

File size in bytes. Must be 1–52428800 (50 MB).

Example:

20480

contentType
string
required

MIME type. Must be an accepted content type.

Example:

"application/pdf"

attachEntityType
enum<string>
required

The kind of entity the file is attached to.

Available options:
channel,
aptlet,
knowledge
Example:

"channel"

attachEntityId
string
required

The channel id (channel), aptlet uuid (aptlet), or knowledge doc id (knowledge) the file belongs to. Must exist within your company.

Example:

"7f3c2a1b9d4e5f6a7b8c9d0e"

Response

Presigned upload policy.

fileId
string

ID to pass to /api/files/upload-complete.

url
string

S3 endpoint to POST the multipart form to.

fields
object

Form fields that must be included in the multipart POST (the file part goes last).