Skip to main content
POST
/
v1
/
endpoints
Create a query endpoint
curl --request POST \
  --url https://api.withsplendor.com/v1/endpoints \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-splendor-tenant-id: <x-splendor-tenant-id>' \
  --data '
{
  "name": "<string>",
  "sql": "<string>",
  "description": "<string>",
  "parameters": [
    {
      "name": "<string>",
      "default": "<string>",
      "required": true
    }
  ]
}
'
{
  "created_at": "2026-01-15T09:30:00Z",
  "description": "Orders in a region, newest first.",
  "endpoint_id": "qe_01H8Z3",
  "latest_version": 2,
  "name": "orders_by_region",
  "updated_at": "2026-01-15T09:30:00Z"
}

Authorizations

Authorization
string
header
required

API token issued from the Splendor console.

Headers

x-splendor-tenant-id
string
required

Selects the tenant (workspace) the request acts within.

Body

application/json

Create a Query Endpoint (#684): a named SQL template + typed parameters.

name
string
required
Required string length: 1 - 255
sql
string
required
Minimum string length: 1
description
string | null
Maximum string length: 2000
parameters
QueryParameter · object[]

Response

Successful Response

created_at
string<date-time>
required
endpoint_id
string
required
latest_version
integer
required
name
string
required
updated_at
string<date-time>
required
description
string | null