POST /sessions/{session_id}/messages
Send a message to a session.
409 for react/cron, non-interactive, and closed sessions. Returns the created message so the caller can track it by id; a retried send with the same idempotency_key returns the original message.
curl -X POST "https://api.ellipsis.dev/v1/sessions/{session_id}/messages" \
-H "Authorization: Bearer $ELLIPSIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"message":"..."}'{
"message": {
"author": "string",
"body": "string",
"created_at": "2026-01-01T00:00:00Z",
"delivered_at": "2026-01-01T00:00:00Z",
"delivered_turn_id": "string",
"feed_seq": 0,
"id": "string",
"sender_attribution_id": "string",
"sender_attribution_type": "github_user",
"session_id": "string",
"status": "pending"
}
}import os
from ellipsis import Ellipsis
client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])
result = client.sessions.send_message("...", "...")
print(result){
"message": {
"author": "string",
"body": "string",
"created_at": "2026-01-01T00:00:00Z",
"delivered_at": "2026-01-01T00:00:00Z",
"delivered_turn_id": "string",
"feed_seq": 0,
"id": "string",
"sender_attribution_id": "string",
"sender_attribution_type": "github_user",
"session_id": "string",
"status": "pending"
}
}import { Ellipsis } from '@ellipsis-dev/sdk';
const client = new Ellipsis({
apiKey: process.env.ELLIPSIS_API_TOKEN!,
});
const result = await client.sessions.sendMessage('...', { message: '...' });
console.log(result);{
"message": {
"author": "string",
"body": "string",
"created_at": "2026-01-01T00:00:00Z",
"delivered_at": "2026-01-01T00:00:00Z",
"delivered_turn_id": "string",
"feed_seq": 0,
"id": "string",
"sender_attribution_id": "string",
"sender_attribution_type": "github_user",
"session_id": "string",
"status": "pending"
}
}{
"properties": {
"idempotency_key": {
"anyOf": [
{
"maxLength": 128,
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"type": "string"
}
},
"required": [
"message"
],
"type": "object"
}{
"properties": {
"message": {
"properties": {
"author": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"body": {
"type": "string"
},
"created_at": {
"format": "date-time",
"type": "string"
},
"delivered_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
]
},
"delivered_turn_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"feed_seq": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"sender_attribution_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sender_attribution_type": {
"anyOf": [
{
"enum": [
"github_user",
"linear_user",
"slack_user",
"api_key"
],
"type": "string"
},
{
"type": "null"
}
]
},
"session_id": {
"type": "string"
},
"status": {
"enum": [
"pending",
"delivered"
],
"type": "string"
}
},
"required": [
"id",
"session_id",
"status",
"body",
"created_at"
],
"type": "object"
}
},
"required": [
"message"
],
"type": "object"
}Request
session_idstringrequired
idempotency_keystring
Optional retry-safety key, unique per (session, key): a retry with the same key returns the original message — no duplicate message, no double turn, no double spend. The SDK auto-generates one per send.
messagestringrequired
The message text.