Skip to main content
POST
Upload a file to attach
Stores a file for an email, at most 25 MB across one message, and returns its att_… id to pass in the attachments of messages_create or messages_update. Nothing is sent. Requires the messages:write scope.

Authorizations

x-api-key
string
header
required

An Avazal API key (avz_…) created in Settings → API keys.

Body

application/json
filename
string
required
contentType
string
required

a string matching the pattern ^[\w.+-]+/[\w.+-]+$

Pattern: ^[\w.+-]+\/[\w.+-]+$
data
string
required

The file's bytes, base64 encoded.

Response

A file shared in chat (chcv_…/), a received email attachment (mmsg_…#) or an upload to attach (att_…).

A file shared in chat (chcv_…/), a received email attachment (mmsg_…#) or an upload to attach (att_…).

id
string
required

The object's id. Every operation that takes it accepts it.

url
string | null
required

A link that opens the object where it lives.

source
enum<string>
required

Where the object lives. Avazal is the source of its own objects.

Available options:
avazal,
slack,
gmail,
google-calendar,
google-drive,
linear,
github,
contacts
name
string | null
required
contentType
string | null
required
size
integer | null
required
conversation
string | null
required
message
string | null
required
sharedBy
string | null
required
sharedAt
string | null
required