Connections

Reconnect connection

Mints a fresh connect_url for an existing connection; this is the fix for needs_reauth. The connection id and every toolbox entry pinned to it survive, so nothing has to be rebuilt. The new account replaces the old binding and the old stored credential is dropped. The body is optional: an empty POST returns the person to the app root. On an org-owned connector it needs the same use level as POST /connection (403 connector_not_shared once the share was withdrawn). 409 reconnect_not_needed when the connector is a remote MCP server with no sign-in (auth mode none) and the connection is active: there is nothing to reconnect, and the row's can_reconnect is false for the same reason. A pending no-sign-in connection (tab closed before the callback) still reconnects; it is the only way to a fresh session.

post/connection/{id}/reconnect

Request

  • Base URL: https://api.elaichi.ai
  • URL: https://api.elaichi.ai/connection/{id}/reconnect
  • Auth: HTTP bearer

Path parameters

idstring required

Connection id (conn_…).

Headers

X-Organization-Idstring

Target organization (org_…). Required for cookie/session auth on org-scoped routes; optional for API tokens, which carry their organization, and rejected when it names a different one.

Request body

redirect_uristring

App-relative return path.

Response

OK

connect_urlstring uri required

Where the person authenticates with the provider. Hand it to them as a link; Elaichi never accepts a password or API key for a third-party system through this API. Single-use and short-lived; mint another with reconnect. When they finish, the provider returns them to Elaichi and the status becomes active.

direct_connect_urlstring uri nullable required

The same one-time session as connect_url, but it goes straight to the provider's sign-in instead of the hosted connect page, so the person skips the page. Non-null only when the connector has exactly one auth method, that method is a redirect (OAuth), and it has no form fields or permissions_text; those are the cases where the hosted page would show nothing but a Connect button. Open it top-level in a popup or a new tab, never in an iframe. null means use connect_url; so does a lookup that failed or took longer than 1.5 seconds.

Changes

No recorded changes to this operation across all 1 revision of this API.