Skip to main content
POST
/
api
/
custom-apis
Create Custom Api
curl --request POST \
  --url https://api.example.com/api/custom-apis \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "url": "<string>",
  "method": "GET",
  "headers": {},
  "env": {},
  "is_active": true
}
'
{
  "id": 123,
  "user_id": 123,
  "name": "<string>",
  "description": "<string>",
  "url": "<string>",
  "method": "<string>",
  "headers": {},
  "env": {},
  "is_active": true,
  "is_default": true,
  "created_at": "<string>",
  "updated_at": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.xagent.run/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request model for creating a Custom API.

name
string
required

API name

Required string length: 1 - 100
description
string | null

API description

url
string | null

API URL

Required string length: 1 - 500
method
string | null
default:GET

HTTP method

headers
Headers · object

HTTP headers

env
Env · object

Environment variables (secrets)

is_active
boolean
default:true

Whether the API is active

Response

Successful Response

Response model for Custom API.

id
integer
required
user_id
integer
required
name
string
required
description
string | null
required
url
string | null
required
method
string | null
required
headers
Headers · object
required
env
Env · object
required
is_active
boolean
required
is_default
boolean
required
created_at
string
required
updated_at
string
required