List connections
List the connections of a project to resources of one type. Every connection has the same fields for each resource type. config holds the settings of the connection, in one member named after the type of the resource.
Connections of deleted environments are left out. resourceId, app and environment are optional filters. Set resourceId to list the connections of one resource, and app, or app and environment, to list the connections of one app or one environment. Results are ordered by connection id. Use cursor to page through them.
The workspace must have the databases, connections and app_v2 flags. Without them you get a 403.
Required Permissions
Your root key must have one of the following permissions:
unkey:v1:<workspace_id>:projects/*/databases/*#read(to read the databases of any project)unkey:v1:<workspace_id>:projects/<project_id>/databases/*#read(to read the databases of one project)unkey:v1:<workspace_id>:projects/<project_id>/databases/<database_id>#read(to read one database)
The list holds only the connections the key can read:
unkey:v1:<workspace_id>:projects/*/apps/*/environments/*/connections/*#read(to read every connection)unkey:v1:<workspace_id>:projects/<project_id>/apps/<app_id>/environments/<environment_id>/connections/*#read(to read the connections of one environment)
Replace <workspace_id> with the authenticated workspace ID.
Authorizations
Unkey uses bearer tokens for authentication. Public integrations use root keys, while the dashboard proxy uses short-lived JWTs. To authenticate, include the token in the Authorization header of each request:
Root keys have specific permissions attached to them, controlling what operations they can perform. Resource permissions use Unkey Resource Names plus actions, like unkey:v1:ws_123:projects/*/keyspaces/*/keys/*#write.
Security best practices:
- Keep root keys secure and never expose them in client-side code
- Use different root keys for different environments
- Rotate keys periodically, especially after team member departures
- Create keys with minimal necessary permissions following least privilege principle
- Monitor key usage with audit logs.
Body
Response
The connections that the key can read.