connection_id you assign (typically your internal user ID) plus the provider_config_key of its integration.
All API requests require a secret key passed as a Bearer token. You can find your secret key in the Settings section of the Nango dashboard.
List connections
GET /connections
Returns a paginated list of connections. You can filter by connection ID, end user, integration, and custom tags.
Query parameters
Exact match on the connection ID. Can return multiple connections across different integrations if the same ID is used.
Filter by integration unique key (e.g.
slack-production). Accepts a comma-separated list for multiple integrations.Filter connections belonging to a specific end user ID.
Filter connections belonging to end users in a specific organization.
Search in connection ID or end user profile (name, email).
Maximum number of connections to return per page.
Page number for pagination (zero-indexed).
Response
Example response
Get a connection
GET /connections/:connectionId
Returns a single connection including its live credentials. Nango automatically refreshes expired access tokens before returning the response.
The shape of the
credentials field depends on the provider’s auth type (OAuth 2, OAuth 1, API key, Basic auth, etc.). Use the Proxy if you want Nango to inject credentials into requests for you.Path parameters
The connection ID to retrieve.
Query parameters
The unique key of the integration this connection belongs to. Required because the same
connection_id can exist across multiple integrations.Force a new token fetch from the provider even if the current token is still valid.
Include the refresh token in the response (OAuth 2 only).
Refresh the JWT token for GitHub App or GitHub App OAuth connections.
Response
Internal numeric ID of the connection.
Your identifier for this connection.
The integration’s unique key.
The provider slug (e.g.
slack).Provider-specific connection configuration set during auth (e.g. subdomain, instance URL).
Custom metadata you have attached to this connection.
Key-value tags attached to this connection.
The live credentials for this connection. Shape depends on auth type.
Active errors on this connection.
ISO 8601 creation timestamp.
ISO 8601 last-updated timestamp.
Example response (OAuth 2)
Import a connection
POST /connections
Imports existing credentials into Nango without going through an OAuth flow. Use this for bulk migrations when onboarding to Nango.
This endpoint is intended for one-off bulk imports of existing tokens. For new connections, use the Connect UI or the frontend SDK to run the OAuth flow.
Request body
The unique key of the integration to create the connection under.
Your identifier for this connection. If omitted, Nango generates one.
The credentials to import. The required fields depend on the provider’s auth type.
Custom metadata to attach to the connection.
Provider-specific configuration (e.g.
subdomain, instance_url).End user to associate with this connection.
Key-value tags to attach to the connection (e.g.
{ "plan": "enterprise" }).Response
Returns the created connection object including its credentials. See Get a connection for the full response shape.Update a connection
PATCH /connections/:connectionId
Updates the end user profile or tags on a connection. Does not modify credentials.
Path parameters
The connection ID to update.
Query parameters
The unique key of the integration this connection belongs to.
Request body
Updated end user information to associate with this connection.
Key-value tags to set on the connection. This replaces the existing tag set.
Response
Example response
Delete a connection
DELETE /connections/:connectionId
Permanently deletes a connection and its stored credentials.
Path parameters
The connection ID to delete.
Query parameters
The unique key of the integration this connection belongs to.
Response
Example response
Set connection metadata
POST /connections/metadata
Replaces the metadata on one or more connections entirely. Existing metadata is overwritten.
Request body
The connection ID to update, or an array of connection IDs to update in bulk.
The unique key of the integration the connection(s) belong to.
The new metadata to set. Must be a JSON object. All existing metadata keys are replaced.
Response
Returns the body you sent as confirmation.Example response
Update connection metadata
PATCH /connections/metadata
Merges the provided metadata into the connection’s existing metadata. Only the keys you provide are updated; all other keys remain unchanged.
Request body
The connection ID to update, or an array of connection IDs to update in bulk.
The unique key of the integration the connection(s) belong to.
The metadata keys to update. Only these keys are changed; existing keys not included here are preserved.
Response
Returns the body you sent as confirmation.Example response
Reading metadata
To read a connection’s metadata, fetch the connection using Get a connection. Themetadata field is included in the response.
Node SDK