Skip to main content
POST
Write a message

Authorizations

Authorization
string
header
required

An API key from your Devic console, sent as Authorization: Bearer <key>. An embedded front end sends a tenant-session token instead, so no API key reaches the browser, and an OAuth integration sends its access token. Missing, invalid or expired credentials get a 401. See Authentication.

Headers

X-Devic-User
string

Only with an API key: the userUID or email of a person of the key's account to act as, with that person's permissions. Without it, an API key acts as the account integration ("API"), which sees shared workspaces only. A person's token cannot name someone else.

devic-api-source
enum<string>

The client sending it; recorded as the message origin.channel (api otherwise).

Available options:
cli,
sdk

Path Parameters

wid
string
required

Workspace id

tid
string
required

Thread id

Body

application/json
text
string
required
Maximum string length: 32000
directedAssistantId
string

Ask this assistant of the workspace.

mentions
object[]

Typed mentions; each @label must appear in text. { kind: "everyone", id: "everyone", label: "everybody" } is @everybody: it notifies everyone who can read the thread and never asks an assistant. Not for guests from another account (403 EVERYONE_MENTION_NOT_ALLOWED); once every 10 minutes per author and thread (429 EVERYONE_MENTION_COOLDOWN, the message is not posted).

replyToMessageId
string
attachmentIds
string[]
Maximum array length: 20
clientMessageId
string

Idempotency key: the same id and body return the same message; a different body is 409 CLIENT_MESSAGE_ID_REUSED. Generated when omitted.

Response

Success — wrapped as { success: true, data }

success
boolean
Example:

true

data
object