curl --request POST \
--url https://api.goyappr.com/agents/{id}/integrations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connection_id": "0b8f4c2e-5a1d-4e6b-9c3f-7d2a1e9b4c60"
}
'{
"integration": {
"id": "i_0b8f4c2e",
"app": "googlecalendar",
"app_name": "Google Calendar",
"connection": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "Clinic calendar",
"state": "ready",
"ready": true
},
"actions": [
"<unknown>"
],
"status": "live"
},
"draft_version": 123,
"live": true,
"not_live_reason": "draft_has_other_changes",
"issues": [
{}
],
"skipped_actions": [
{
"action": "GOOGLECALENDAR_DELETE_EVENT",
"reason": "action_version_deprecated",
"message": "Google Calendar cannot offer GOOGLECALENDAR_DELETE_EVENT to an agent: this version of it is deprecated."
}
],
"settings_updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}Give an agent a connected app
curl --request POST \
--url https://api.goyappr.com/agents/{id}/integrations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connection_id": "0b8f4c2e-5a1d-4e6b-9c3f-7d2a1e9b4c60"
}
'{
"integration": {
"id": "i_0b8f4c2e",
"app": "googlecalendar",
"app_name": "Google Calendar",
"connection": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "Clinic calendar",
"state": "ready",
"ready": true
},
"actions": [
"<unknown>"
],
"status": "live"
},
"draft_version": 123,
"live": true,
"not_live_reason": "draft_has_other_changes",
"issues": [
{}
],
"skipped_actions": [
{
"action": "GOOGLECALENDAR_DELETE_EVENT",
"reason": "action_version_deprecated",
"message": "Google Calendar cannot offer GOOGLECALENDAR_DELETE_EVENT to an agent: this version of it is deprecated."
}
],
"settings_updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}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.
curl -X POST https://api.goyappr.com/agents/AGENT_ID/integrations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"connection_id": "0b8f4c2e-5a1d-4e6b-9c3f-7d2a1e9b4c60"}'
| Field | Type | |
|---|---|---|
connection_id | uuid | A ready connected account. Send this or tool_id. |
actions | "default" or list | Optional. The app’s defaults when left out, or 1-24 actions from GET /tool-connections/{id}/actions, each a slug or {"action": slug, "inputs": {...}} (see below). |
tool_id | uuid | A saved webhook or call transfer to give every step, instead of connection_id (see below). |
inputs | object | With tool_id only: that tool’s inputs, by name. |
publish | boolean | Optional, default true. Publish the agent when its draft had no other unpublished change. |
expected_version | integer | Optional. The draft version you read; another one is 409 WORKFLOW_CONFLICT. |
replace_action_tools | boolean | Optional. Replace this agent’s separate tools for the account with the whole integration (see separate_action_tools on the list). |
201:
{
"integration": { "id": "i_0b8f4c2e", "app": "googlecalendar", "app_name": "Google Calendar", "status": "live", "...": "..." },
"skipped_actions": [],
"draft_version": 13,
"live": true,
"settings_updated_at": "2026-10-22T07:14:03.120451+00:00"
}
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:
not_live_reason | What to do |
|---|---|
draft_has_other_changes | The draft held other unpublished changes, so nothing was published for you. Publish when ready. |
inputs_missing | An action needs a configuration ID that has no default (a spreadsheet, a channel, a board), so the agent would have to guess it. The integration is saved, its action lists the input in missing_inputs, and issues gives the PATCH that sets it. Nothing is published until it is set. |
agent_not_published | The agent has never been published. Publish it. |
publish_not_requested | You sent publish: false. |
publish_refused | The publish was refused; issues names each problem as publish does. |
publish_unavailable | Publishing was unavailable; publish again. |
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:
curl -X POST https://api.goyappr.com/agents/AGENT_ID/integrations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"connection_id": "0b8f4c2e-5a1d-4e6b-9c3f-7d2a1e9b4c60",
"actions": [
{"action": "GOOGLECALENDAR_FIND_FREE_SLOTS", "inputs": {"items": {"kind": "literal", "value": ["c_1a2b3c@group.calendar.google.com"]}}},
{"action": "GOOGLECALENDAR_CREATE_EVENT", "inputs": {"calendar_id": {"kind": "literal", "value": "c_1a2b3c@group.calendar.google.com"}}}
]}'
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
Sendtool_id (a saved HTTP or transfer tool from GET /tools) instead of connection_id to give it to every conversation step, like an app:
curl -X POST https://api.goyappr.com/agents/AGENT_ID/integrations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"tool_id": "5c1e9a20-3b4d-4e5f-8a6b-7c8d9e0f1a2b", "inputs": {"phone": {"kind": "literal", "value": "{{call.caller_number}}"}}}'
curl -X POST https://api.goyappr.com/agents/AGENT_ID/integrations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"tool_id": "7d2a1e9b-4c60-4b8f-9c3f-0b8f4c2e5a1d"}'
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).
Authorizations
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).
Body
Response
The integration (or the webhook or call transfer) was added to the draft, and live says whether it is on calls now.
- Option 1
- Option 2