Skip to main content
POST
/
api
/
v1
/
endpoints
Create Endpoint
curl --request POST \
  --url https://api.example.com/api/v1/endpoints \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "path": "<string>",
  "method": "GET",
  "description": "<string>",
  "auth_required": true,
  "condition": "<string>",
  "actions": [
    {}
  ],
  "response_template": {},
  "enabled": true
}
'
{
  "id": "<string>",
  "account_id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "path": "<string>",
  "method": "<string>",
  "auth_required": true,
  "condition": "<string>",
  "actions": [
    {}
  ],
  "response_template": {},
  "enabled": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "created_by": "<string>"
}

Body

application/json

Request body for creating a custom endpoint.

name
string
required

Human-readable name

Required string length: 1 - 200
path
string
required

URL path starting with /. Supports :param segments (e.g. /users/:user_id/orders). Must not shadow built-in routes.

method
enum<string>
required

HTTP method

Available options:
GET,
POST,
PUT,
PATCH,
DELETE
description
string | null

Optional description

auth_required
boolean
default:true

Whether a valid auth token is required (default: true)

condition
string | null

Optional rule expression; request denied (403) if it evaluates False

actions
Actions · object[]

Ordered list of action configs to execute sequentially

response_template
Response Template · object

HTTP response template: {"status": 200, "body": {...}, "headers": {...}}. Supports {{template}} variables from request context and action results.

enabled
boolean
default:true

Whether the endpoint is active on creation

Response

Successful Response

Response schema for a single custom endpoint.

id
string
required
account_id
string
required
name
string
required
description
string | null
required
path
string
required
method
string
required
auth_required
boolean
required
condition
string | null
required
actions
Actions · object[]
required
response_template
Response Template · object
required
enabled
boolean
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
created_by
string | null
required