Skip to main content
POST
Add a message to a session
Use this endpoint to store your chat transcript in EDN, one message at a time. It’s separate from memory: storing a message doesn’t save it as a memory.

What EDN does

  1. Stores the message in the session’s transcript.
  2. Creates the session if it’s new.

Required headers

Request

Path parameters

Body

Response

200 OK

Important behavior

  • Storing the transcript improves memory. EDN uses the assistant’s previous reply to recognise corrections in Save a conversation turn, and recent user messages to help Build a SIP with short follow-up questions.
  • To save memory, use Save a conversation turn. This endpoint only stores the transcript.

Errors

See Error handling.

Authorizations

Authorization
string
header
required

Your EDN API key, sent as Bearer YOUR_API_KEY. Create keys in the Console.

Path Parameters

session_id
string
required

The session to append to.

Required string length: 1 - 128

Body

application/json
content
string
required

The message text, up to 100,000 characters.

Example:

"Thanks, I will remember that."

role
enum<string>
required

Who wrote the message.

Available options:
user,
assistant
Example:

"assistant"

Response

Successful Response

content
string
required

The message text.

created_at
string
required

When the message was saved (ISO 8601, UTC).

id
string
required

The message ID.

role
enum<string>
required

Who wrote the message.

Available options:
user,
assistant