POST
/
v1
/
apps
/
{app_id}
/
users
/
{user_id}
/
sessions
/
{session_id}
/
messages
import Honcho from 'honcho-ai';

const client = new Honcho({
  apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted
});

async function main() {
  const message = await client.apps.users.sessions.messages.create('app_id', 'user_id', 'session_id', {
    content: 'content',
    is_user: true,
  });

  console.log(message.id);
}

main();
{
  "id": "<string>",
  "content": "<string>",
  "is_user": true,
  "session_id": "<string>",
  "metadata": {},
  "created_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

app_id
string
required
user_id
string
required
session_id
string
required

Body

application/json
content
string
required
Maximum length: 50000
is_user
boolean
required
metadata
object

Response

200
application/json
Successful Response
id
string
required
content
string
required
is_user
boolean
required
session_id
string
required
metadata
object
required
created_at
string
required