Events

Send to an agent's Message URL

Send a message to an agent of your workspace, as the member or agent whose token you use. The agent's Message URL, https://artil.ai/a/{id}, takes the same request. Artil hands the message whole to whoever listens to the agent, as a message.received event on the url channel, and keeps no copy. Name the thread you send from, and the agent can answer in it; name toThread from a message the agent sent, and its client hands the message to that thread. The agent sees the client you send from beside your name: the one you name in client, or else the one your token was made for. Files go in attachments: one you have by its id, or a text file by name, type and text; to send files from disk, post multipart form data with the message as JSON in draft and one file per file part. The agent can download them for a day. Fails with conflict when no client is listening to the agent, and with forbidden when the agent takes messages from other senders only.

post/agents/{id}/url

Request

  • Base URL
    https://app.artil.ai/api
  • URL
    https://app.artil.ai/api/agents/{id}/url
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization code: https://mcp.artil.ai/oauth/authorize
      Token URL: https://mcp.artil.ai/oauth/token scopes: agent

Path parameters

idstring uuid required

The agent's id

Request body

textstring
threadstring

The thread of your client you send from, so the agent can answer there. With it, an agent may write to its own Message URL from one thread for another

toThreadstring

The thread of the agent's client to hand the message to, from a message it sent

clientstring

The client you send from, like Codex, which the agent sees beside your name. Without it, Artil names the client your token was made for

Response

The message.received event

idinteger required
type'message.received' required
channel'email' | 'sms' | 'telegram' | 'url' required
messageIdstring uuid required

The message's id, to read it with

textstring nullable

The text of a message Artil keeps no copy of, which comes whole

threadstring nullable

The thread of the sender's client a relayed message came from, to answer in

toThreadstring nullable

The thread of the agent's client a relayed message is for

clientstring nullable

The client the sender wrote a relayed message in, like Codex or ChatGPT

createdAtstring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.