Skip to main content
POST
Post a Message

Authorizations

Authorization
string
header
required

A Turtle API key (sk_...) as a bearer token.

Path Parameters

organizationId
string<uuid>
required
Example:

"248df4b7-aa70-47b8-a036-33ac447e668d"

Body

application/json
about
object[] | null

What the message is about, 0-8 of [{type, id}]: any CRM entity, an event (type event) or a change (type mutation). Each must be this silo's.

Maximum array length: 8
action
enum<string>

edit (a text's words) or delete (a text, a question, a reaction), of the message refId names, by whoever said it. Omit for a message of its own.

Available options:
edit,
delete
agent
string

The agent's bearer only: the name of the agent saying it, when it is not the shared one (sonar).

audience
string<uuid>

The agent's bearer only: the member whose private room this is written to, by user id. Omit for the team room.

Example:

"248df4b7-aa70-47b8-a036-33ac447e668d"

kind
enum<string>

text (anyone), question (the agent), answer (a person, to a question), reaction (anyone, on a message), tool and status (the agent, while it works). With action, optional: the kind of the message it changes.

Available options:
text,
question,
answer,
reaction,
tool,
status
payload
object

What the message says, by kind; an edit holds a text's, a deletion nothing. text: {text, mentions?: members' emails}. question: {text, expects: open | yes_no | select_one | select_many, options (2-8, the selects only)}. answer: {text} to open; to yes_no {yes?, text?} and to a select {choices?, text?}, at least one of the two. reaction: {emoji}. tool: {tool, call?, ok, error?}. status: {state: thinking | compacting | alarm | error | stopped, text?}. The agent's own may carry turnId; a person's written by the agent's bearer carries via: {service}.

refId
string<uuid>

The message this replies to, reacts to, edits or deletes; an answer's question.

Example:

"248df4b7-aa70-47b8-a036-33ac447e668d"

room
enum<string>

A person only: you writes to their own private room with their agent, which only they read. Omit for the team room. Replies, reactions, edits and deletions name the room of the message they are on.

Available options:
you
userEmail
string<email>

The Sonar agent only: the member who said it on another surface, by their account's email, with payload.via saying where.

Response

OK

message
object