For the complete documentation index, see llms.txt. Any page on this site can be fetched as Markdown by appending .md to its URL.

Voice agentsAgent templates

Create an agent from a template

POST
/v1/agent-media/agent-templates/{templateId}/instantiate

Create a voice agent from a template. Every requirement the template declares must be bound to one of your own resources, unless it is marked optional — an unbound optional requirement drops the tools that needed it. Settings your organization cannot use (a model whose vendor integration is not connected, an ElevenLabs voice without the ElevenLabs integration) are substituted for ones it can, and every substitution is reported in the response. Deciding that needs your organization's integration status, so if that cannot be read the agent is not created at all — retry the call rather than accepting a configuration chosen without it.

The agent is created as a draft, exactly as POST /v1/agent-media/agents creates one: the bound configuration is written to version 0.1, no publishedVersion is set, and the agent answers no calls until you publish with POST /v1/agent-media/agents/{agentId}/versions/{version}/publish. Edit it first if you want to — a draft is editable in place with PUT /v1/agent-media/agents/{agentId}/versions/0.1, which a published version is not. PUT /v1/agent-media/agents/{agentId} will not accept a configuration for it in either state.

Authorization

bearerAuth
AuthorizationBearer <token>

A Tandem bearer token. Requests are scoped to the organization the token belongs to; no organization header is required.

In: header

Path Parameters

templateId*string

The template's unique ID.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/agent-media/agent-templates/string/instantiate" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "bindings": {      "property1": {        "workflowId": "string"      },      "property2": {        "workflowId": "string"      }    }  }'
{  "id": "string",  "substitutions": [    {      "field": "string",      "from": "string",      "to": "string",      "reason": "string"    }  ],  "droppedTools": [    "string"  ]}
{  "error": "string",  "errors": [    {      "field": "string",      "message": "string"    }  ]}
{  "error": "string",  "message": "string",  "limit": 0,  "length": 0,  "reason": "string"}
{  "error": "string",  "message": "string",  "limit": 0,  "length": 0,  "reason": "string"}
{  "error": "string",  "message": "string",  "limit": 0,  "length": 0,  "reason": "string"}
Empty