Disconnect
Stop reading one of an app user's connected apps, and, if you ask, erase what it delivered to their memory.
- Auth
- read and write key (project)
- Cost
- free; never refused for your plan
Disconnects one app of the app user named in X-Alexein-User. Nothing more is read from it, and the sign-in it
held is deleted. See Connect your users' apps.
Without forget, memory keeps what the app already delivered. To erase that too, send "forget": true. The
answer's forgotten: true means the erasure of what that connection delivered has been asked for and is queued:
it is not done when the answer comes, and it completes once erasure by connection is available. Items you added
yourself are not touched. To erase the whole app user, use users/delete, which disconnects
every app they connected first.
Headers
AuthorizationstringrequiredBearer ax_…, an API key. The key must read and write.
X-Alexein-UserstringrequiredThe app user whose app to disconnect. See App users.
X-Request-IdstringYour id for this request, echoed on the response.
Body
idstringrequiredThe connection's id, from connections or the connection_id the person came back
with.
forgetbooleantrue to erase what this connection delivered from the app user's memory. Default false: memory keeps it.
Response
idstringThe connection disconnected.
statusstringrevoked.
forgottenbooleantrue when you asked for forget: the erasure of what it delivered is queued, and completes once erasure by
connection is available. false when memory keeps it.
Errors
400bad requestX-Alexein-User is missing or not a usable id.
401unauthorizedThe bearer is not a key this service issued.
403forbiddenThis API key only reads: ...; a personal key, whose own apps
are under My memory › Connectors; or the organisation has been closed in the console.
404not foundno such connection: no connection of this app user has that id. A connection of another app user, project
or organisation answers the same.
422invalidNo id, or an unknown field.
429too many requestsPast your organisation's rate limits. Retry after Retry-After seconds. See
Limits.
503unavailableConnecting apps cannot be reached just now. Retry after Retry-After seconds.
curl https://api.alexein.ai/v2/connections/disconnect \
-H "Authorization: Bearer $ALEXEIN_API_KEY" \
-H "X-Alexein-User: user_42" \
-H "Content-Type: application/json" \
-d '{"id": "6f1c2d9e-4b7a-4e3f-9a51-0c8d2e7b4f13", "forget": true}'{
"id": "6f1c2d9e-4b7a-4e3f-9a51-0c8d2e7b4f13",
"status": "revoked",
"forgotten": true
}Didn’t find what you needed? Ask the team