Agent Actions
Add a custom External API.
Changed onCreates 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
- Base URLhttps://app.customgpt.ai
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
projectIdinteger required
Example:1
The unique agent identifier.
Request body
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.
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
- info
endpoint added
- info