PATCH/enterprise_connections/{enterprise_connection_id}

Update an enterprise connection

Updates the enterprise connection whose ID matches the provided enterprise_connection_id in the path. When enabling the connection (setting active to true), any existing verified organization domains that match the connection's domains (e.g. used for enrollment modes like automatic invitation) may be deleted so the connection can be enabled.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 10 body fields
enterprise_connection_idstringrequired
The ID of the enterprise connection to update
namestringoptional
The display name of the enterprise connection
domainsarray<string>optional
Domains associated with the enterprise connection. Values are normalized to lowercase. Empty array means ignored (no change); non-empty array means set domains to the given list (replaces existing).
activebooleanoptional
Whether the enterprise connection is active. When set to true (enabling), any existing verified organization domains for the same domain(s) will be removed so the connection can be enabled.
sync_user_attributesbooleanoptional
Whether to sync user attributes on sign-in
disable_additional_identificationsbooleanoptional
Whether to disable additional identifications
allow_organization_account_linkingbooleanoptional
Whether this connection supports account linking via organization membership
organization_idstringoptional
Organization ID to link to this enterprise connection. Only linking is supported; sending this field sets or changes the linked organization. There is no way to unlink an organization once linked.
samlobjectoptional
SAML connection-specific properties. Only applied when the enterprise connection uses SAML. Use this to update IdP configuration, attribute mapping, and other SAML-specific settings.
oidcobjectoptional
OIDC connection-specific properties. Only applied when the enterprise connection uses OIDC (e.g. oidc_custom, oidc_github_enterprise, or oidc_gitlab).
custom_attributesarray<object>optional
Custom attributes to map from the IdP to the user's profile via SSO or SCIM provisioning. Requires the custom attributes feature to be enabled for the instance.

6 status codes
200An enterprise connection
objectstringrequired
Allowed:enterprise_connection
idstringrequired
The enterprise connection ID
namestringrequired
The display name of the connection
providerstringrequired
logo_public_urlstringoptional
activebooleanrequired
Whether the enterprise connection is active
domainsarray<string>required
Domains associated with the enterprise connection
organization_idstringoptional
Organization ID when the connection is linked to an organization
sync_user_attributesbooleanoptional
Controls whether to update the user's attributes on each sign-in
disable_additional_identificationsbooleanoptional
When true, users cannot add additional identifications when using this connection
allow_organization_account_linkingbooleanoptional
Whether this connection supports account linking via organization membership
custom_attributesarray<object>optional
Custom attributes to map from the IdP to the user's profile via SSO or SCIM provisioning
saml_connectionobjectoptional
Present when the enterprise connection uses SAML
oauth_configobjectoptional
Present when the enterprise connection uses OIDC or EASIE
created_atintegerrequired
Unix timestamp in milliseconds when the connection was created
updated_atintegerrequired
Unix timestamp in milliseconds when the connection was last updated
400Request was not successful
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
402Payment required
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
403Authorization invalid
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
404Resource not found
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
422Invalid request parameters
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional

Error handling

A 400 is returned: Request was not successful. A 402 is returned: Payment required. A 403 is returned: Authorization invalid. A 404 is returned: Resource not found. A 422 is returned: Invalid request parameters.