Create api key connection
PreviewManage organizations, members, end users, invitations and connected identities.
POST
/v1/virtual-users/{identity_id}/connections/{provider}See authentication for credentials and permissions.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”identity_id
required
string
provider
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Request body for API-key connection creation (plugin-based providers). Accepts api_key plus any additional form fields as extra_fields.
object
api_key
required
Provider API key, encrypted before storage.
string
Example
example-api-keykey
additional properties
Additional provider-specific form fields (e.g. org_slug for provider personal tokens).
Responses
201Success
Success
Media typeapplication/json
Connection info returned in API responses (never includes token)
object
connected_at
required
Time the grant was created.
string format: date-time
connection_type
required
Credential mechanism used by this connection.
string
provider
required
Stable provider identifier.
string
provider_username
Display name on the provider.
string | null
scopes
Provider scopes granted to this account.
string | null
Example
{ "connected_at": "2026-09-29T12:00:00Z", "connection_type": "oauth", "provider": "github", "provider_username": "octocat", "scopes": "read:user"}401Authentication required
Authentication required
403Permission denied
Permission denied
404Virtual user not found
Virtual user not found