Custom APIs

Create an action for a custom provider

Creates one disabled-by-default or explicitly enabled action. Its input schema must describe an object, its example must validate, path placeholders must resolve to scalar schema properties, and the top-level names externalUserId, attribution, and _locus are reserved for Locus transport controls. Publishing an enabled action requires a positive end-user price.

post/credits/custom-endpoints/{providerId}/endpoints

Request

  • Base URL
    https://api.paywithlocus.com/api
  • URL
    https://api.paywithlocus.com/api/credits/custom-endpoints/{providerId}/endpoints
  • Auth
    HTTP bearer

Path parameters

providerIdstring uuid required

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

Request body

slugstring required

Stable 3–64 character action name.

namestring required
descriptionstring required
method'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' required
pathstring required

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

inputSchemaobject required

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

inputExampleobject required

Executable example that must satisfy inputSchema.

outputSchemaobject nullable

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

outputExampleunknown
markupBpsinteger required

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

enabledboolean

Enabled actions must have a positive end-user price.

Response

Action created

successunknown required

Changes

No recorded changes to this operation across all 1 revision of this API.