Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/org-quicko/skillset/llms.txt

Use this file to discover all available pages before exploring further.

The Connections API manages a writer’s personal grants of repository access to the Registry. A Connection is the result of a writer authorizing a GitHub App (or equivalent OAuth app) to act on their behalf — the Registry then uses the stored token to fetch repository content during imports. Before a writer can create a Connection, an Admin must first configure an Integration for the provider. One Connection can exist per Git Provider; connecting again replaces the existing grant.
Revoking a Connection from the Registry does not revoke the authorization at the Git Provider. The writer must separately visit the provider’s settings to remove the app’s access if they want to fully withdraw it.
All endpoints require Writer role.

Endpoints at a glance

MethodPathAuthDescription
GET/api/connectionsWriter+List own Connections and connectable providers
GET/api/connections/:provider/startWriter+Start the OAuth connect flow
GET/api/connections/:provider/callbackWriter+OAuth callback (provider redirects here)
DELETE/api/connections/:providerWriter+Revoke a Connection

List Connections

GET /api/connections
Returns the caller’s own Connections alongside the list of providers they could connect to. Both are returned in one response because the interface needs both at the same time — a “connected as ada-work” card and a “connect GitHub” card are the same card in two states.

Response fields

items
array
The writer’s existing Connections. Each entry has:
connectable
array
Integrations the writer could connect through but has not yet. Each entry has:
curl https://registry.example.com/api/connections \
  -H "Authorization: Bearer <token>"

Start the connect flow

GET /api/connections/:provider/start
Initiates the OAuth authorization flow for the given provider. Redirects the browser to the provider’s authorization page. The Registry sets a short-lived, signed nonce cookie (skillset_connection_state) to protect the callback against CSRF.

Path parameters

provider
string
required
Git Provider to connect. Currently github.

Query parameters

integration_id
string
UUID of the specific Integration to use. Required when more than one Integration is configured for the same provider — the server returns 400 integration_choice_required if this is omitted and multiple choices exist.

Error codes

CodeStatusWhen
provider_not_connectable400The provider has no credentialed OAuth flow (e.g. GitLab is public-read only).
integration_choice_required400Multiple Integrations exist for the provider and integration_id was not specified.
integration_not_configured409No Integration is configured for this provider. Ask an Admin to set one up.
This endpoint is designed to be opened in a browser — it responds with a 302 redirect, not JSON. Calling it with curl -L will follow the redirect to the provider’s authorization page.

OAuth callback

GET /api/connections/:provider/callback
This endpoint is the OAuth redirect target that the Git Provider calls after the user authorizes (or declines) the app. It is not called directly by writers — the provider redirects the browser here after the authorization step. The Registry validates the state parameter against the nonce cookie, exchanges the authorization code for a token, stores the Connection, and redirects the browser to Settings → Connected Accounts.

Callback outcomes

Query params on callbackOutcomeRedirect destination
code + stateConnection created or updated/settings/connected-accounts?connected=<provider>
error=access_deniedWriter declined/settings/connected-accounts?declined=<provider>
setup_action onlyRepository access changed/settings/connected-accounts?repositories=<provider>
Other errorConnection failed/settings/connected-accounts?connection_error=<message>

Error codes

CodeStatusWhen
invalid_state400The state parameter was missing, tampered with, expired, or already used.
exchange_failed502The provider refused to exchange the authorization code for a token.
connection_expired409The app’s permission is insufficient; reconnecting or fixing the app config is needed.

Revoke a Connection

DELETE /api/connections/:provider
Removes the writer’s Connection for the given provider from the Registry. Returns 204 No Content.
This only removes the Connection from the Registry — the OAuth app’s authorization at the Git Provider remains active. To fully revoke access, the writer must also remove the app from their provider account settings.

Path parameters

provider
string
required
Git Provider whose Connection to revoke (e.g. github).

Error codes

CodeStatusWhen
not_found404No Connection exists for this provider under your account.
curl -X DELETE https://registry.example.com/api/connections/github \
  -H "Authorization: Bearer <token>"

Build docs developers (and LLMs) love