curl --request PATCH \
--url https://api.goyappr.com/agents/{id}/integrations/{integration_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"actions": [
"GOOGLECALENDAR_FIND_FREE_SLOTS",
"GOOGLECALENDAR_EVENTS_LIST"
]
}
'{
"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>"
}
]
}Change an integration's actions
curl --request PATCH \
--url https://api.goyappr.com/agents/{id}/integrations/{integration_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"actions": [
"GOOGLECALENDAR_FIND_FREE_SLOTS",
"GOOGLECALENDAR_EVENTS_LIST"
]
}
'{
"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>"
}
]
}agents:update. Replaces which actions of the account the agent may use. Send the full list, or "default" for the app’s defaults. Actions you keep keep their binding; actions you drop leave every step. Saved and published by the same rule as adding one.
curl -X PATCH https://api.goyappr.com/agents/AGENT_ID/integrations/i_0b8f4c2e \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"actions": ["GOOGLECALENDAR_FIND_FREE_SLOTS", "GOOGLECALENDAR_EVENTS_LIST"], "expected_version": 13}'
200 with the same shape as adding one: integration, skipped_actions (with "default", the defaults the app cannot offer, each with why), draft_version, live, and settings_updated_at when live is true. With "default" while an app outside the curated list is still having its action list read the first time, the answer is 503 WORKFLOW_TOOL_CONTROL_UNAVAILABLE with Retry-After and nothing is saved.
Each item of actions may also be {"action": slug, "inputs": {...}}, as when adding one. An action you keep keeps the sources its inputs have, except the ones you send.
Change only how inputs are filled
Sendinputs instead of actions, keyed by action slug. null puts an input back to the catalogue’s default. Let the agent choose between two calendars by name:
curl -X PATCH https://api.goyappr.com/agents/AGENT_ID/integrations/i_0b8f4c2e \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"inputs": {"GOOGLECALENDAR_FIND_FREE_SLOTS": {"items": {"kind": "model", "path": "/items",
"options": [{"value": "primary", "label": "Front desk"}, {"value": "c_1a2b3c@group.calendar.google.com", "label": "Clinic"}]}}},
"expected_version": 13}'
tg_…), key inputs by its binding_id: {"inputs": {"t_5c1e9a20": {"note": {"kind": "literal", "value": "From the voice agent"}}}}.
When a calendar is fixed on an action whose tool was built before it could take one, the tool is rebuilt first (a new revision of the same tool); bindable on the list says which those are. You do not have to do anything about it.
Refusals: 404 INTEGRATION_NOT_FOUND, 409 WORKFLOW_CONFLICT, 422 INPUT_SOURCE_INVALID (each bad source named by path), 422 INTEGRATION_ACTION_UNKNOWN, 422 INTEGRATION_ACTION_UNAVAILABLE, 422 INTEGRATION_LIMIT, 422 TOOL_CONNECTION_NOT_READY.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
Send actions or inputs, not both.
Response
The integration (or webhook or transfer) as it is now.
- Option 1
- Option 2