Sessions
Manage conversation sessions and archives. Requires agent:manage scope.
Returns active chat sessions for an agent. Requires agent:manage scope.
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.
List of sessions
Unix timestamp in milliseconds
Unauthorized — Invalid or missing API key
Forbidden — Key lacks the required scope
GET /api/v1/agents/{id}/sessions HTTP/1.1
Host: api.guayaba.run
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
{
"key": "text",
"sessionId": "123e4567-e89b-12d3-a456-426614174000",
"sessionFile": "text",
"label": "text",
"updatedAt": 1,
"chatType": "text",
"lastChannel": "text",
"origin": {}
}
]Returns message history for a specific session. Requires agent:manage scope.
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.
Session message history
String or array of content blocks
Unauthorized — Invalid or missing API key
Forbidden — Key lacks the required scope
POST /api/v1/agents/{id}/sessions/history HTTP/1.1
Host: api.guayaba.run
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 31
{
"sessionKey": "text",
"limit": 1
}[
{
"id": "text",
"role": "user",
"content": "text",
"timestamp": 1
}
]Renames a chat session. Requires agent:manage scope.
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.
Session renamed
No content
Unauthorized — Invalid or missing API key
Forbidden — Key lacks the required scope
POST /api/v1/agents/{id}/sessions/rename HTTP/1.1
Host: api.guayaba.run
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 29
{
"key": "text",
"label": "text"
}No content
Archives a chat session. Requires agent:manage scope.
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.
Session archived
No content
Unauthorized — Invalid or missing API key
Forbidden — Key lacks the required scope
POST /api/v1/agents/{id}/sessions/archive HTTP/1.1
Host: api.guayaba.run
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 14
{
"key": "text"
}No content
Permanently deletes a chat session. Requires agent:manage scope.
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.
Session deleted
No content
Unauthorized — Invalid or missing API key
Forbidden — Key lacks the required scope
POST /api/v1/agents/{id}/sessions/delete HTTP/1.1
Host: api.guayaba.run
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 14
{
"key": "text"
}No content
Returns archived chat sessions for an agent. Requires agent:manage scope.
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.
List of archived sessions
Unauthorized — Invalid or missing API key
Forbidden — Key lacks the required scope
GET /api/v1/agents/{id}/archives HTTP/1.1
Host: api.guayaba.run
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
{
"filename": "text",
"label": "text",
"archivedAt": "text",
"sessionId": "text"
}
]Restores an archived session back to active. Requires agent:manage scope.
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.
Session restored
No content
Unauthorized — Invalid or missing API key
Forbidden — Key lacks the required scope
POST /api/v1/agents/{id}/archives/restore HTTP/1.1
Host: api.guayaba.run
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 34
{
"filename": "text",
"label": "text"
}No content
Permanently deletes an archived session. Requires agent:manage scope.
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.
Archive deleted
No content
Unauthorized — Invalid or missing API key
Forbidden — Key lacks the required scope
POST /api/v1/agents/{id}/archives/delete HTTP/1.1
Host: api.guayaba.run
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 19
{
"filename": "text"
}No content
Last updated