Skip to main content
This guide gives one of your users access to an instance, mints an MCP link for their agent, sends them to connect Slack, and reads back what they connected. You need a project key (ck_cloud_…). In the dashboard, open your project, then Project, then Keys. Set the key and your base URL once. The slug is the part of the key between ck_cloud_ and the first dot:
The TypeScript examples use one client:

Before you start

Minting a link needs an instance that has been applied, which means its configuration has been pushed to the runtime at least once. Applying needs at least one integration. If your prod instance is already applied, skip to the next section.
With no auth_type, Corsair uses its own OAuth app for a plugin when it has one. managed_available in GET /integrations/catalog tells you which plugins that covers.

Grant a user access

An access line is one tenant on one instance at one permission. Naming a tenant that doesn’t exist yet creates it, so this one call registers Dave and gives him write access on prod:
The first call returns 201, later ones 200. PUT is an upsert, so you can call it on every sign-in without creating duplicates. connected stays empty until Dave authorizes an integration. synced: false would mean the line is saved but the runtime hasn’t picked it up yet; applying the instance again fixes that. A link is an MCP URL for an agent. It writes on one access line, admin, and can read others you list in context. The response holds the URL, so send an Idempotency-Key: a retry then returns the same link instead of minting a second one.
Paste url into any MCP client as a custom connector. The id in the URL is the credential, so treat the whole URL as a secret. mode defaults to cautious; the other modes are open, strict and readonly. api_key appears only in this response, and when the link is rotated or its key regenerated: Corsair keeps a hash. Your project’s short URL for the link, when it has one, takes the key as a bearer token.
Every line a link names needs an access line already. Naming a tenant the project doesn’t have returns 400 no tenant 'usr_8841' in this project, and a tenant without access on that instance returns 400 No access for prod:usr_8841. An instance that hasn’t been applied returns 409 resource_conflict.
If a link leaks, POST /mcp/links/{id}/rotate mints a replacement with the same lines and a new id, and revokes the old one in the same transaction, so the two are never live together. DELETE /mcp/links/{id} revokes it outright.

Connect the user

POST /connect/sessions returns a hosted URL for one tenant. Send the tenant there: they authorize the integration, and the credential never passes through your code.
Leave out integrations to include every integration on the instance. Naming the ones you need keeps an integration that isn’t set up yet from getting in the way of the rest. delivery_url sets where the tenant lands when they finish. A retry with the same Idempotency-Key returns the same URL until it expires, then mints a fresh session.

Check what landed

Connections are keyed by instance, integration and tenant. Filter on any of the three:
status is expired when the credential is past its expiry with no refresh token, or when the provider refused the refresh token. Either way the tenant needs a new connect session. A credential past its expiry that still has a refresh token reports connected and renews on the next call. The access line from the first step lists the tenant’s connected integrations in connected too, but its expired list is always empty on Corsair Cloud, so read status from /connections. Every route and field is in the OpenAPI document. When a call fails, the error’s doc_url links to its entry in Errors.