Start connecting a portal
POST/link-sessions
Creates a link session and returns the URL of the hosted consent page. Send an admin of the organisation to that URL. They choose the portal (or confirm the one you preselected), sign in to it the way that portal requires, and approve the scopes. When they finish:
- they are redirected to
redirect_uriwithlink_session_idandstatusas query parameters, - a
connection.createdwebhook is sent, and GET /link-sessions/{link_session_id}returns the newconnection_id.
There is no token to exchange. The connection ID is not a secret: only a key belonging to the same organisation can use it.
To repair a connection in needs_reauth, create a link session with its connection_id. The admin signs in again and the same connection returns to active.
Headers
Airstride-Versionstring- The API version, as a date. Defaults to the version pinned on the key. The first version of Open Partnerships is
2026-12-01. Idempotency-KeystringRequired- A unique value per logical write, such as a UUID. Required on every write. Retry with the same key and the same body after a timeout or network error; you get the original response, never a second registration or a second claim.
Request body
portal_idstring- Preselect the portal. Leave it out to let the admin choose from the catalogue.
connection_idstring- Reauthorise this existing connection instead of creating a new one.
scopesarray of string- Scopes to ask the admin for. Defaults to every scope the portal supports, except
passthrough. redirect_uristring (uri)- Where to send the admin when they finish or cancel. Must use HTTPS.
end_organizationEndOrganization- For platforms, such as a CPQ or PSA tool, that act for many customer organisations with one key. Identifies which customer a connection belongs to. Leave it out when you act only for your own organisation.
end_organization.external_idstringRequired- Your ID for the customer.
end_organization.namestring
Responses
- 201
- The link session.
- 400
- Invalid parameters, or a version we do not recognise.
- 401
- Missing or invalid API key.
- 403
- The key is valid but cannot do this. Includes a key without the Open Partnerships permission (
FORBIDDEN) and a connection whose admin did not grant the scope this call needs (SCOPE_NOT_GRANTED). - 404
- The resource does not exist, or belongs to another organisation.
- 409
- The request conflicts with the current state. Codes include
IDEMPOTENCY_KEY_REUSED,CONNECTION_NEEDS_REAUTH,CONNECTION_DISCONNECTED,CONNECTION_EXISTSandJOB_ALREADY_RUNNING. - 422
- The request parsed but failed validation. Codes include
VALIDATION_FAILED,CAPABILITY_NOT_SUPPORTED,REGISTRATION_NOT_APPROVEDandCLAIM_WINDOW_CLOSED. - 429
- Rate limited. Wait until
X-RateLimit-Resetbefore retrying. - 500
- Something broke on our side.
curl -X POST "https://app.airstride.ai/api/open-partnerships/link-sessions" \
-H "X-API-Key: $AIRSTRIDE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"portal_id": "portal_cisco",
"scopes": [
"deal_registrations",
"program_rules",
"rebates"
],
"redirect_uri": "https://crm.example.com/settings/portals/done"
}'{
"id": "ls_3vR9xk",
"status": "pending",
"mode": "create",
"url": "https://connect.airstride.ai/link/ls_3vR9xk",
"portal_id": "portal_cisco",
"connection_id": null,
"scopes": [
"deal_registrations",
"program_rules",
"rebates"
],
"redirect_uri": "https://crm.example.com/settings/portals/done",
"end_organization": null,
"failure_reason": null,
"expires_at": "2026-11-25T10:00:00Z",
"created_at": "2026-11-24T10:00:00Z"
}