Sessions

Manage conversation sessions and archives. Requires agent:manage scope.

List agent sessions

get

Returns active chat sessions for an agent. Requires agent:manage scope.

Authorizations
AuthorizationstringRequired

API key sent as Bearer token. Two types:

  • Master key (g_master_...): full access to all agents and endpoints.
  • Agent key (g_agent_...): scoped to a single agent with specific permissions.
Path parameters
idstring · uuidRequired
Responses
200

List of sessions

application/json
keystringOptional
sessionIdstring · uuidOptional
sessionFilestringOptional
labelstring · nullableOptional
updatedAtintegerOptional

Unix timestamp in milliseconds

chatTypestringOptional
lastChannelstringOptional
originobjectOptional
get
/agents/{id}/sessions

Get session history

post

Returns message history for a specific session. Requires agent:manage scope.

Authorizations
AuthorizationstringRequired

API key sent as Bearer token. Two types:

  • Master key (g_master_...): full access to all agents and endpoints.
  • Agent key (g_agent_...): scoped to a single agent with specific permissions.
Path parameters
idstring · uuidRequired
Body
sessionKeystringRequired
limitinteger · min: 1 · max: 1000Optional
Responses
200

Session message history

application/json
idstringOptional
rolestring · enumOptionalPossible values:
contentone ofOptional

String or array of content blocks

stringOptional
or
timestampintegerOptional
post
/agents/{id}/sessions/history

Rename a session

post

Renames a chat session. Requires agent:manage scope.

Authorizations
AuthorizationstringRequired

API key sent as Bearer token. Two types:

  • Master key (g_master_...): full access to all agents and endpoints.
  • Agent key (g_agent_...): scoped to a single agent with specific permissions.
Path parameters
idstring · uuidRequired
Body
keystringRequired
labelstring · max: 255 · nullableOptional
Responses
200

Session renamed

No content

post
/agents/{id}/sessions/rename

No content

Archive a session

post

Archives a chat session. Requires agent:manage scope.

Authorizations
AuthorizationstringRequired

API key sent as Bearer token. Two types:

  • Master key (g_master_...): full access to all agents and endpoints.
  • Agent key (g_agent_...): scoped to a single agent with specific permissions.
Path parameters
idstring · uuidRequired
Body
keystringRequired
Responses
200

Session archived

No content

post
/agents/{id}/sessions/archive

No content

Delete a session

post

Permanently deletes a chat session. Requires agent:manage scope.

Authorizations
AuthorizationstringRequired

API key sent as Bearer token. Two types:

  • Master key (g_master_...): full access to all agents and endpoints.
  • Agent key (g_agent_...): scoped to a single agent with specific permissions.
Path parameters
idstring · uuidRequired
Body
keystringRequired
Responses
200

Session deleted

No content

post
/agents/{id}/sessions/delete

No content

List archived sessions

get

Returns archived chat sessions for an agent. Requires agent:manage scope.

Authorizations
AuthorizationstringRequired

API key sent as Bearer token. Two types:

  • Master key (g_master_...): full access to all agents and endpoints.
  • Agent key (g_agent_...): scoped to a single agent with specific permissions.
Path parameters
idstring · uuidRequired
Responses
200

List of archived sessions

application/json
filenamestringOptional
labelstring · nullableOptional
archivedAtstringOptional
sessionIdstringOptional
get
/agents/{id}/archives

Restore an archived session

post

Restores an archived session back to active. Requires agent:manage scope.

Authorizations
AuthorizationstringRequired

API key sent as Bearer token. Two types:

  • Master key (g_master_...): full access to all agents and endpoints.
  • Agent key (g_agent_...): scoped to a single agent with specific permissions.
Path parameters
idstring · uuidRequired
Body
filenamestringRequired
labelstring · max: 255Optional
Responses
200

Session restored

No content

post
/agents/{id}/archives/restore

No content

Delete an archived session

post

Permanently deletes an archived session. Requires agent:manage scope.

Authorizations
AuthorizationstringRequired

API key sent as Bearer token. Two types:

  • Master key (g_master_...): full access to all agents and endpoints.
  • Agent key (g_agent_...): scoped to a single agent with specific permissions.
Path parameters
idstring · uuidRequired
Body
filenamestringRequired
Responses
200

Archive deleted

No content

post
/agents/{id}/archives/delete

No content

Last updated