Skip to main content
POST
Requires agents:update. Gives the agent a connected account, by its id from GET /tool-connections. The agent can use the app’s default actions on every step of its calls, at once — no tool to build, no step to wire.
The answer is 201:
When live is true, settings_updated_at is the agent’s new settings token (publishing moves it, as publish does): send it as expected_updated_at on your next PATCH /agents/{id}. When live is false, not_live_reason says why and the change is saved in the draft: The first time an app is used, its actions are prepared, which can take a few seconds. If they are still being prepared after about twelve seconds (a large app’s catalogue can be slow the first time), the answer is 503 WORKFLOW_TOOL_CONTROL_UNAVAILABLE with Retry-After, and nothing is saved: send the same request again. The same happens, the first time, for an app outside the curated list while its action list is still being read: its default actions are chosen over the whole list (GET /tool-connections/{id}/actions says defaults_final: false until then). A default action is never left out because it was slow to read. POST /tool-connections/{id}/actions/prepare prepares them ahead of time. Which actions are default: a curated set for the most used apps (Google Calendar: find free time, list events, book, change and cancel an event; Gmail: send an email and draft an email — never reading the mailbox), and for every other app the provider’s important actions without destructive or administrative ones, reads first, at most 12. A default the app cannot offer to a voice agent is left out and named in skipped_actions, each with action, reason (not_eligible, needs_setup, action_version_deprecated, changed_meanwhile: send the request again, account_unavailable: reconnect the account, action_unknown, build_failed: try again in a minute, or a failed build’s own lowercase code) and a plain-language message; an action you name that it cannot offer is refused with 422 INTEGRATION_ACTION_UNAVAILABLE, each named in issues at /actions/<n>. Limits: 8 integrations and 64 integration actions per agent, 24 actions per integration. An API key preparing an app’s actions for the first time also needs tools:create (tools:update to rebuild them after a reconnect); otherwise 403 WORKFLOW_ACTOR_DENIED. Other refusals: 404 TOOL_CONNECTION_NOT_FOUND, 409 INTEGRATION_ALREADY_ASSIGNED (change its actions with PATCH), 422 TOOL_CONNECTION_NOT_READY (reconnect the account), 422 AGENT_ENGINE_UNSUPPORTED, 422 INTEGRATION_LIMIT, 403 WORKFLOW_ENVIRONMENT_MISMATCH (the account belongs to another plane).

Set how each input is filled

Every input of an action has a source: Fixed ({"kind": "literal", "value": …}, never shown to the agent), from the call (request, stored or step), AI ({"kind": "model", "path": "/<input>"}, the agent fills it from the conversation) or Choose from a list (a model source with options, the agent picks one by its label). Inputs you leave out take the catalogue’s default from GET /tool-connections/{id}/actions (inputs[].default_source): a calendar is Fixed to the account’s main calendar, and what the conversation fills is AI. Book on the clinic’s calendar and let the agent pick the times:
Pick the calendar ids from GET /tool-connections/{id}/options/calendars. Each action in the answer carries binding_id, inputs (its sources now), input_specs and bindable. A bad source is 422 INPUT_SOURCE_INVALID, each one named in issues by path (/actions/0/inputs/items). Change sources later with PATCH and inputs.

A webhook or call transfer on every step

Send tool_id (a saved HTTP or transfer tool from GET /tools) instead of connection_id to give it to every conversation step, like an app:
A call transfer belongs here by default: the dashboard gives one to every conversation step too (the agent’s Tools & integrations, and on the canvas the section “Available to every conversation step”), the way it does an app. Send just its id:
Bind a transfer to chosen steps in the workflow (a step’s available_binding_ids, or an action step of its own when its success and its failure each need a path) only when those steps need it alone, for example a different destination on each. A transfer runs on phone calls only. On a browser call (the dashboard’s test, a shared link, the Web SDK) nothing is dialled: the agent’s call to it is answered error_code: "unsupported_transfer_channel", and the agent is told to say in one sentence that transfers work on phone calls. GET /calls/{id} shows that answer in the call’s tool calls, as agent_was_told. Test a transfer with a phone call. The answer’s integration is {"id": "tg_5c1e9a20", "kind": "webhook", "tool_id": …, "name": …, "binding_id": "t_5c1e9a20", "inputs": {…}, "overrides": [], "status": "live"}. Inputs you leave out are filled by the agent. Refusals: 404 TOOL_NOT_FOUND, 409 INTEGRATION_ALREADY_ASSIGNED, 422 TOOL_GRANT_KIND (not a webhook or transfer), 422 TOOL_GRANT_CHANNEL (a transfer on an agent without phone calls), 422 INTEGRATION_LIMIT (8 per agent).
Tell the agent in its instructions which sheet, board or channel to use for Google Sheets, monday.com and Slack.

Authorizations

Authorization
string
header
required

Your Yappr API key (e.g. ypr_live_...). Generate one in the dashboard under Settings → API Keys. No key is 401 MISSING_KEY; a key that is not one of ours, or is revoked, is 401 INVALID_KEY; an expired one is 401 EXPIRED_KEY. A valid key without the scope an operation needs is 403 INSUFFICIENT_SCOPE on every operation, and the message names the scope. Every response, a 401 included, carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset: the budget is 60 requests a minute per API key. Every 429, whatever its code, carries Retry-After (whole seconds, never zero): the per-key budget's RATE_LIMIT asks for what is left of the minute, a route's daily cap (RATE_LIMITED) for the time until that cap resets. All four headers are listed in Access-Control-Expose-Headers, so a browser can read them. A path the API does not serve (an unknown sub-path, an id left empty) is 404 ROUTE_NOT_FOUND, and a method a served path does not take is 405 METHOD_NOT_ALLOWED with an Allow header; both are answered before any scope check, and nothing is read or changed. A trailing slash is ignored where it cannot be an id left empty (POST /calls/ is POST /calls) and refused where it can (GET /calls/). A doubled slash inside a path is merged into one before the request reaches the API (GET //calls is GET /calls).

Path Parameters

id
string<uuid>
required

Body

application/json
connection_id
string<uuid>

The connected account, as GET /tool-connections lists it. It must be ready. Send this or tool_id.

tool_id
string<uuid>

A saved webhook or call transfer (GET /tools) to give every step. Send this or connection_id; with it, only inputs, publish and expected_version are read.

inputs
object

With tool_id only: the tool's inputs, by name. Inputs left out are filled by the agent (AI).

actions

"default" (or left out) for the app's default actions, or 1-24 distinct actions from GET /tool-connections/{id}/actions, each a slug or {"action": slug, "inputs": {"": source or null}}.

Allowed value: "default"
publish
boolean
default:true

Publish the agent when its draft had no other unpublished change.

expected_version
integer

The draft version you read; a different one is 409 WORKFLOW_CONFLICT.

Required range: x >= 1
replace_action_tools
boolean
default:false

Replace the agent's separate tools for this account (see separate_action_tools) with the whole integration. Their actions join the default set.

Response

The integration (or the webhook or call transfer) was added to the draft, and live says whether it is on calls now.

integration
object
required

A connected account given to the whole agent.

draft_version
integer
required
live
boolean
required

The change is on the agent's calls now.

not_live_reason
enum<string>
Available options:
draft_has_other_changes,
agent_not_published,
publish_not_requested,
publish_refused,
publish_unavailable,
inputs_missing
issues
object[]

With publish_refused: what the compiler refused, as POST /agents/{id}/workflow/publish names it. With inputs_missing: each required input still without a source (missing_input_source, path /actions//inputs/), with the PATCH that sets it.

skipped_actions
object[]

Default actions the app cannot offer to a voice agent, left out of the integration, each with why. Empty when every default was given. An action named in actions is never skipped: it is refused (422 INTEGRATION_ACTION_UNAVAILABLE).

settings_updated_at
string<date-time>

Present when live is true: publishing moved the agent's settings token, as POST /agents/{id}/workflow/publish answers it. Send it as expected_updated_at on your next PATCH /agents/{id}.