Skip to content

service-API for App

Everything you can do on app.v2.nairon.xyz by hand — build flows, assign numbers, configure agent profiles — is also available as a plain REST API on service.v2.nairon.xyz, authenticated with a secret API key (nrn_sk_...) minted on platform.v2.nairon.xyz, as Authorization: Bearer nrn_sk_... or x-api-key. Only secret keys are accepted; publishable keys (used for browser-facing surfaces like the web widget) are rejected.

Terminal window
# List flows in a project
curl https://service.v2.nairon.xyz/v1/projects/PROJECT_ID/flows \
-H "Authorization: Bearer NAIRON_API_KEY"
# Create a flow version
curl -X POST https://service.v2.nairon.xyz/v1/flows/FLOW_ID/versions \
-H "Authorization: Bearer NAIRON_API_KEY" -H "Content-Type: application/json" \
-d '{"flowSchema": { /* ... */ }}'
# Activate a version — this is what runs on the next call
curl -X POST https://service.v2.nairon.xyz/v1/flow-versions/VERSION_ID/activate \
-H "Authorization: Bearer NAIRON_API_KEY"

Creating/saving a flow version through service-api runs the exact same save/publish transaction the dashboard editor uses, so an activated version goes live the same way regardless of which path created it.

GET/POST /v1/projects/{projectId}/phone-numbers, PATCH /v1/phone-numbers/{id}/flow (reassign a number to a different flow), GET /v1/projects/{projectId}/agent-profiles, GET/PUT /v1/agent-profiles/{id}.

Knowledge bases are managed through platform-api, not service-api — see platform-API guide → Knowledge base stores for /v1/stores CRUD and querying.

An MCP server at service.v2.nairon.xyz/mcp exposes flow, phone-number, and usage operations as tools — see MCP for connecting a client.

See the full service-api reference for every endpoint and schema.