Skip to main content
POST
Create an action for a custom provider

Authorizations

Authorization
string
header
required

Locus Pro dashboard session (Cognito).

Path Parameters

providerId
string<uuid>
required

Workspace-owned custom provider ID. This is distinct from its public custom-{slug} catalog name.

Body

application/json
slug
string
required

Stable 3–64 character action name.

Pattern: ^[a-z0-9][a-z0-9-]{1,62}[a-z0-9]$
name
string
required
Required string length: 1 - 80
description
string
required
Required string length: 1 - 500
method
enum<string>
required
Available options:
GET,
POST,
PUT,
PATCH,
DELETE
path
string
required

Upstream path. Placeholders must reference required scalar properties from inputSchema.

Required string length: 1 - 1024
inputSchema
object
required

Compilable JSON Schema, at most 64 KiB and 32 levels deep, whose root type is object. Top-level transport-control names are reserved.

inputExample
object
required

Executable example that must satisfy inputSchema.

providerCostUsdc
required

Upstream provider cost in USD, rounded up to six decimal places.

Pattern: ^\d+(?:\.\d{1,6})?$
markupBps
integer
required

Percentage markup, also limited by the workspace's effective cap.

Required range: 0 <= x <= 100000
flatMarkupUsdc
required

Flat USD markup, also limited by the workspace's effective cap.

Pattern: ^\d+(?:\.\d{1,6})?$
outputSchema
object | null

Optional JSON Schema, at most 64 KiB and 32 levels deep.

outputExample
any

Optional example that must satisfy outputSchema when both are provided.

enabled
boolean
default:false

Enabled actions must have a positive end-user price.

Response

Action created

success
any
required
endpoint
object
required