Agent Actions

Add a custom External API.

Changed on

Creates the connection from an OpenAPI schema, given as an uploaded file or an HTTPS URL. The agent calls it only while Plan & Act and Smart Tasks are enabled with external connections allowed (see available in the list response). At most 5 External APIs can be active at once; a new one beyond that is created disabled.

post/api/v1/projects/{projectId}/actions/external-apis

Request

Path parameters

projectIdinteger required
Example:1

The unique agent identifier.

Request body

namestring required

Display name, up to 120 characters.

api_keystring required

Credential the agent sends to this API, as described by the schema security scheme.

openapi_urlstring required

Public HTTPS URL of the OpenAPI (JSON or YAML) schema.

Example request

{
  "name": "Orders API",
  "api_key": "sk_live_123",
  "openapi_url": "https://api.example.com/openapi.json"
}

Response

External API created. It is created disabled when 5 are already enabled.

status'error' | 'success'

The status of the response

Example response

{
  "status": "success",
  "data": {
    "external_api": {
      "id": 1,
      "name": "Orders API",
      "is_enabled": true,
      "host": "api.example.com",
      "base_url": "https://api.example.com/v1",
      "auth_type": "bearer",
      "auth_key_name": "Authorization",
      "has_openapi": true,
      "openapi_metadata": {
        "title": "Orders API",
        "version": "1.0.0",
        "endpoint_count": 12
      }
    }
  }
}

Changes