Skip to main content
SONZAI
Api

Composio

List Composio action audit entries for an agent

GET
/agents/{agentId}/composio/audit
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

agentId*string

Agent UUID or URL-encoded agent name

Query Parameters

from?string

RFC3339 start timestamp (inclusive). Defaults to 24h before 'to'.

to?string

RFC3339 end timestamp (inclusive). Defaults to now.

status?string

Optional status filter: ok | error | rate_limited

limit?integer

Maximum entries to return (default 100, max 500)

Formatint64

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/agents/string/composio/audit"
{
  "$schema": "/api/v1/schemas/ListComposioAuditOutputBody.json",
  "entries": [
    {
      "action_name": "string",
      "agent_id": "string",
      "composio_app": "string",
      "composio_request_id": "string",
      "duration_ms": 0,
      "error_code": "string",
      "recorded_at": "2019-08-24T14:15:22Z",
      "request_params_redacted": "string",
      "response_summary": "string",
      "status": "string",
      "turn_id": "string",
      "user_id": "string"
    }
  ]
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

List Composio actions available to an agent

GET
/agents/{agentId}/composio/available_actions
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

agentId*string

Agent UUID or URL-encoded agent name

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/agents/string/composio/available_actions"
{
  "$schema": "/api/v1/schemas/ListComposioAvailableActionsOutputBody.json",
  "apps": [
    {
      "actions": [
        {
          "description": "string",
          "name": "string",
          "parameters": {
            "property1": null,
            "property2": null
          }
        }
      ],
      "app": "string",
      "connected_account_label": "string"
    }
  ]
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

List Composio connections for an agent

GET
/agents/{agentId}/composio/connections
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

agentId*string

Agent UUID or URL-encoded agent name

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/agents/string/composio/connections"
{
  "$schema": "/api/v1/schemas/ListComposioConnectionsOutputBody.json",
  "connections": [
    {
      "account_label": "string",
      "agent_id": "string",
      "app": "string",
      "connected_account_id": "string",
      "connected_at": "2019-08-24T14:15:22Z",
      "connected_by_user_id": "string",
      "last_verified_at": "2019-08-24T14:15:22Z",
      "scope": "string"
    }
  ]
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Initiate a Composio OAuth flow for an agent

POST
/agents/{agentId}/composio/connections
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

agentId*string

Agent UUID or URL-encoded agent name

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

app*string

Composio app slug (e.g. gmail, slack, github)

Response Body

application/json

application/problem+json

curl -X POST "https://loading/api/v1/agents/string/composio/connections" \  -H "Content-Type: application/json" \  -d '{    "app": "string"  }'
{
  "$schema": "/api/v1/schemas/InitiateComposioConnectOutputBody.json",
  "connected_account_id": "string",
  "redirect_url": "string"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Finalize a Composio OAuth flow

POST
/agents/{agentId}/composio/connections/callback
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

agentId*string

Agent UUID or URL-encoded agent name

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://loading/api/v1/agents/string/composio/connections/callback" \  -H "Content-Type: application/json" \  -d '{    "app": "string",    "connected_account_id": "string"  }'
{
  "$schema": "/api/v1/schemas/ComposioConnectCallbackOutputBody.json",
  "connection": {
    "account_label": "string",
    "agent_id": "string",
    "app": "string",
    "connected_account_id": "string",
    "connected_at": "2019-08-24T14:15:22Z",
    "connected_by_user_id": "string",
    "last_verified_at": "2019-08-24T14:15:22Z",
    "scope": "string"
  },
  "ok": true
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Disconnect a Composio app for an agent

DELETE
/agents/{agentId}/composio/connections/{app}
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

agentId*string

Agent UUID or URL-encoded agent name

app*string

Composio app slug

Response Body

application/problem+json

curl -X DELETE "https://loading/api/v1/agents/string/composio/connections/string"
Empty
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}