Starts the sign-in for one of the connections the agent's template names, for the user of your app the agent serves. That person needs no Rush account: send them to authorize_url, where they sign in to the app or the MCP server with Rush's OAuth client; the link works once and expires in 10 minutes. Then read the connection by its id until status is connected.
type is app for a built-in app (outlook, gmail, …) or mcp for an MCP server that signs in with OAuth; name is the name the template's connection has (GET /o/{org}/agents/{agent} lists them under connections). An MCP server is signed in to at the same address as the template's. A Gmail or Outlook connection the template names with an access level asks the user for that level alone. Connecting the same name again replaces the agent's earlier connection of it.
Authenticate with a signed-in session token (an API key cannot call this route).
Path parameters
The org's slug or id. A caller with no role in the org gets 404.
The id or name of an agent made from a template (POST /o/{org}/agents {template, name}).
Request body
appmcpOne of the connections the template names, e.g. outlook or notion.
Responses
202The sign-in, pending until the agent's user finishes it.
appmcpThe name a session's connections and the template use.
The agent the connection belongs to.
The MCP server's address.
1 fields
oauthbearernonependingconnectedfailedWhere the agent's user signs in. Single use; expires in 10 minutes.
2 fields
connection_expiredcancelled_by_callerconnection_failed4 item fields
400The body is not {type, name} (INVALID_BODY, UNKNOWN_FIELD).
A sentence for a person.
Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, TOKEN_LIMIT_REACHED.
The machine code on routes that name it this way.
401No bearer, an unknown, revoked or expired one, or an API key on a route keys cannot call.
A sentence for a person.
Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, TOKEN_LIMIT_REACHED.
The machine code on routes that name it this way.
404No such agent made from a template of yours (NOT_FOUND).
A sentence for a person.
Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, TOKEN_LIMIT_REACHED.
The machine code on routes that name it this way.
422The template does not name that connection, the MCP server takes a token rather than a sign-in, or the agent is not made from a template (INVALID_BODY); or the server cannot register Rush (registration_unsupported, registration_failed, …).
A sentence for a person.
Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, TOKEN_LIMIT_REACHED.
The machine code on routes that name it this way.
429The account is over its request budget, 1,800 a minute shared by the person's API keys and console on every API host (RATE_LIMITED).
The account is over its request budget, 1,800 a minute shared by the person's API keys and console on every API host (RATE_LIMITED). The error names the limit. Wait Retry-After seconds.
A sentence for a person.
Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, TOKEN_LIMIT_REACHED.
The machine code on routes that name it this way.