Send an inbound message to a session task.
POST
/v1/sessions/{session_id}/tasks/{task_id}/messages
const url = 'https://app.everruns.com/api/v1/sessions/example/tasks/example/messages';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"content":[{"text":"example","type":"text"}],"in_reply_to":"example","text":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.everruns.com/api/v1/sessions/example/tasks/example/messages \ --header 'Content-Type: application/json' \ --data '{ "content": [ { "text": "example", "type": "text" } ], "in_reply_to": "example", "text": "example" }'Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” session_id
required
string
Session ID
task_id
required
string
Task ID
Request Body required
Section titled “Request Body required ” Media type application/json
Request body for posting an inbound task message.
object
content
in_reply_to
Input request ID this message answers, when applicable.
string | null
text
Plain-text message (alternative to content).
string | null
Responses
Section titled “ Responses ”Recorded task message
Media type application/json
A message exchanged between a session and one of its tasks.
object
content
required
created_at
required
string format: date-time
direction
required
Direction of a task message. Inbound = session → task.
string
id
required
tmsg_* public ID.
string
in_reply_to
Set when this message answers a TaskInputRequest.
string | null
task_id
required
string
Example
{ "content": [ { "type": "text" } ], "direction": "inbound"}Empty message
Session or task not found