Skip to main content
Anyreach exposes a complete REST API for agent management. Use it to:
  • Provision agents from CI/CD as part of an environment promotion
  • Migrate prompts from a config repo to production
  • Run A/B tests on prompt variants
For the full endpoint reference see Agents API.

Authentication

All endpoints require a bearer credential. See Authentication.

Create an agent

The response includes the new agent_id. The agent starts as a stub — no version, no config — until you create a version.

Create a version

Versions hold the actual config (voice, model, prompt, tools, knowledge bases).
The agent config object is large and strongly typed. Fetch its authoritative JSON Schema from GET /core/agent-config-schema rather than hand-writing it, and use the dashboard’s agent builder to generate a valid config to start from.
The version is created in draft state.

Publish a version

To assign the published version to a phone number, include phone_numbers and a direction (inbound, outbound, or both) in the publish body. See Assigning agents to numbers.

Update an existing draft

To iterate on a draft without creating a new version:
You can only update draft versions. Published versions are immutable; create a new draft to iterate.

Auto-generate instructions

If you have a purpose description but want Anyreach to draft the conversation flow:
Generation runs asynchronously. Poll the version with GET /core/agents/$AGENT_ID/versions/$VERSION until generation completes.

Deploy as SIP

For BYOC setups, expose the agent as a SIP endpoint (requires at least one published version):
The agent’s GET response then includes a sip_endpoint object with the SIP URI to point your trunk at. See SIP trunking and BYOC.

Idempotent provisioning pattern

For CI/CD, the safe pattern is:
This reaches the same end state regardless of whether the agent already existed.