Skip to main content
POST
Start a workspace connection
Requires tool-connections:manage. Discover the apps that accept a connection with GET /tool-apps/connection-options, then give the account an explicit label. (GET /tool-apps is the wider action catalog and is not the connection-ready list.)
The 201 response contains connection, attempt, and handoff_url.

The handoff is not self-contained

handoff_url is a link for a person, not a step your integration can complete. It opens on the Yappr dashboard, https://app.goyappr.com, in the language the request’s locale names (en when it is left out). Opening it without a Yappr session lands on Yappr’s own “Authorize a workspace connection” screen, which will not go on to the provider until someone signs in — there is no way to reach the provider’s consent screen from an API key alone, and none is planned. Treat handoff_url as something you hand over, not something you follow. Who it has to be: a signed-in member of the workspace the connection belongs to — a member of the company whose id this API key is scoped to. A member of a different workspace, or a signed-out browser, gets no further, whatever the link says. So send the link to the person whose Google (or other provider) account is being connected, and make sure they are already a member of that workspace: an invitation that has not been accepted yet is not one. One more constraint, because it decides who you can send it to: a handoff started by an API key may be claimed by any member of the workspace, while one started from the dashboard stays bound to the person who started it. Each handoff can be claimed by one person, in one browser, once. If nobody is going to open it, close it with POST /tool-connections/attempts/{id}/cancel rather than leaving the slot held for ten minutes. The connection belongs to the workspace and can be used by its authorized tools. Multiple labeled accounts are supported. Never provide provider account IDs or tokens in this request. Hosted OAuth is currently supported; manual credential imports are not accepted by this endpoint. Treat the handoff URL fragment as a temporary secret. Do not log it, put it in workflow inputs, or expose it in call history. Poll only the returned attempt.id, stop at its expiry, and inspect connection readiness separately.

The body, and the two ways it is refused

toolkit and label are both required, and no other field is accepted besides the optional locale (en or he).

Apps that take credentials

For an app whose connect.kind is credentials, credentials carries exactly the fields connection options lists for it. They are sent to the provider once, in this request, and are never stored, logged or returned. The connection comes back finished, with no handoff_url. For the apps Yappr has checked against a live call (Mapbox today), the app itself is asked whether it accepts the key before the connection is recorded; one it refuses is answered 422 CONNECTION_CREDENTIALS_REJECTED and nothing is saved. To replace the key of a connection that already exists, see Connect a replacement account: the same connection keeps its id, label and bindings. Ten authorizations started by this API key and still open returns 429 CONNECTION_RATE_LIMIT. Attempts that expired, were cancelled or were completed are not counted, and neither are attempts started by anyone else in the workspace — finish, cancel (POST /tool-connections/attempts/{id}/cancel) or let one expire. The workspace also has a ceiling of 120 starts in ten minutes, counted whatever became of them, so a loop that connects and cancels is refused the same way.

A connected account is not yet a tool

Connecting the account is half the journey: nothing an agent can call exists until one of that app’s actions is saved as a tool. Three reads and one write, all with the same x-company-id:
  1. GET /tool-apps/{slug}/actions?version=… — the app’s actions for one dated version, cursor-paged. Page with next_cursor only; there is no limit, and sending one is refused 422. A calendar’s booking journey needs GOOGLECALENDAR_FIND_FREE_SLOTS before it needs GOOGLECALENDAR_CREATE_EVENT.
  2. GET /tool-apps/{slug}/actions/{action}?version=… — the action’s id, its eligible flag and its input schema. An action whose eligible is false cannot be saved, whatever the connection’s state.
  3. GET /tool-connections — the account to bind it to. Only a state: "ready" row can be used.
  4. POST /tools with workflow: {"kind":"app","metadata_id":"<id from step 2>","connection_id":"<id from step 3>","fixed_inputs":{},"timeout_ms":30000}.
The tool then behaves like any other: it appears in GET /tools/workflow-catalog once its revision is promoted, and an agent step binds it the same way it binds an HTTP tool. In the dashboard the same journey is two clicks: Tools & Integrations → Integrations → Add action as a tool on the account’s card, or Add an action from a connected app in a step’s Add-tool dialog. Both open the tool form with the app and the account already chosen, leaving only the action to search for.

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).

Body

application/json
toolkit
string
required
Pattern: ^[a-z0-9_]{1,100}$
label
string
required
Required string length: 1 - 200
locale
enum<string>
default:en
Available options:
en,
he
credentials
object

Only for an app whose connect.kind is credentials: exactly the fields GET /tool-apps/connection-options?toolkit={slug} lists, each text of 1 to 2048 characters. A field the app does not take, a missing required one or an oversize value is 400 CONNECTION_INVALID. The app refusing them is 422 CONNECTION_CREDENTIALS_REJECTED.

Response

Pending connection and one-time human handoff. For an app connected with credentials there is no handoff_url - the connection is returned as the sign-in finished.

connection
object
required
attempt
object
required
handoff_url
string<uri>
required

Expiring one-time Yappr handoff for an authorized human, on the Yappr dashboard (https://app.goyappr.com//tool-connection/#). Treat its fragment as a secret capability; never log it.