v63

latestOpenAPI 3.0.0Proprietaryraw.githubusercontent.com2026-08-0110571.8 MB
Tool Router

Create a link session for a toolkit in a tool router session

Initiates an authentication link session for a specific toolkit within a tool router session. Returns a link token and redirect URL that users can use to complete the OAuth flow.

post/api/v3.1/tool_router/session/{session_id}/link

Path parameters

session_idstring toolRouterSessionId required

The session ID returned when creating the session

Example:trs_LX9uJKBinWWr

The unique identifier of the tool router session

Request body

toolkitstring required

The unique slug identifier of the toolkit to connect

aliasstring

A human-readable alias for this connected account. Must be unique per entity and toolkit within the project.

callback_urlstring uri

URL where users will be redirected after completing auth

Example request

{
  "toolkit": "github",
  "callback_url": "https://myapp.com/callback"
}

Response

Successfully created link session. Returns link token, redirect URL, and connected account ID.

link_tokenstring required

Token used to complete the authentication flow

redirect_urlstring uri required

The URL where users should be redirected to complete OAuth

connected_account_idstring connectedAccountId required

The unique identifier for the connected account

Example response

{
  "link_token": "lt_abc123xyz",
  "redirect_url": "https://app.composio.dev/link/lt_abc123xyz",
  "connected_account_id": "ca_abc123xyz"
}