Skip to main content
POST
Edit a message or change its state
Edits a message or draft you wrote (body, recipients, subject, attachments) and changes its pinned, read, saved, done or sendAt state. Fields apply in that order. 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
id
string
required

A message id from messages_list, messages_get or conversations_get.

text
string

Plain text. Use this or content.

Minimum string length: 1
content
object

Rich text blocks. Use this or text.

recipients
object

Email addresses, as Name <a@b.com> or a@b.com.

subject
string
attachments
object[]
pinned
boolean
read
boolean

true reads up to this message, false marks unread from it.

saved
object | null

Save for later with an optional state and reminder; null removes it.

done
boolean

Clear (true) or restore an activity item.

sendAt
string

Reschedule a scheduled email.

stale
enum<boolean>

false keeps a stale email reply draft as it is.

Available options:
false

Response

A chat message or an email, sent, drafted or scheduled. Its id is the one every messages operation takes.

A chat message or an email, sent, drafted or scheduled. Its id is the one every messages operation takes.

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
conversation
string | null
required

The conversation it belongs to, null for a new-email draft.

thread
string | null
required

The thread root's message id when it is a thread reply.

state
enum<string>
required
Available options:
sent,
draft,
scheduled
from
string | null
required
at
string | null
required

When it was sent, will be sent (scheduled), or was last edited (draft).

markdown
string
required

The content as markdown, with chat mentions as @name. Email text for email.

saved
object
activity
object
provider
object