Skip to main content
POST
Take a disconnected account off the list
Requires tool-connections:manage. Use this on a record that is already disconnected and that nobody needs to look at again. To clear every attempt nobody finished in one request, use POST /tool-connections/cleanup - and those also leave the list by themselves a day after they start.
This is not a delete, and it is deliberately not the DELETE: The record itself is never deleted. It is the history of an authorization that was asked for, so it keeps its id, its label and its audit trail — and every binding that ever referenced it still resolves. What changes is that GET /tool-connections stops returning it, which is what makes a workspace holding a hundred abandoned connect attempts readable again. removed_at on the answer is when it left the list. To read those records back, ask for them by name:
A removed record never becomes connected again by itself. The one way back is deliberate: POST /tool-connections/{id}/reconnect still works on a removed id, and the moment that authorization completes the connection is working again, removed_at is null and it is back on the list. If that authorization is never finished, the record stays off the list. Connecting the app with POST /tool-connections instead gives you a new account with a new id. A connection that has not been disconnected answers 409 CONNECTION_STILL_CONNECTED, and the message names the DELETE for that connection. Send DELETE /tool-connections/{id} first, read disconnect_progress on that answer (see Disconnect an account — a bound account still needs its grant revoked at the provider), and then remove the record. That includes a connection whose sign-in was cancelled or ran out before it ever connected: it stays connecting with connected: false and open_attempt: null, and nothing is waiting on it. Its DELETE revokes nothing (disconnect_progress: "record_deleted"), and the remove after it takes it off the list. POST /tool-connections/cleanup does both for every such connection in the workspace at once. A connection somebody is connecting again right now answers 409 CONNECTION_ATTEMPT_OPEN. When both apply — still connected, and an authorization open — the answer is CONNECTION_STILL_CONNECTED: disconnect first, then wait for or cancel the attempt. CONNECTION_ATTEMPT_OPEN means taking it off the list would hide the account the moment that authorization completes. Wait for it to finish or expire — an authorization lives ten minutes — or cancel it with POST /tool-connections/attempts/{id}/cancel, and then remove the record.

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

Response

The record, no longer listed.

connection
object