Update the account's SAML SSO connection. The IdP side can be configured either from a metadata URL (Stytch fetches entity id, SSO URL, and certificate) or field by field; supplying both applies the metadata URL first and then the explicit fields.
const url = 'https://api.siteqwality.com/account/sso/saml/connection';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"display_name":"example","email_domain":"example","clear_email_domain":true,"metadata_url":"example","idp_entity_id":"example","idp_sso_url":"example","x509_certificate":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.siteqwality.com/account/sso/saml/connection \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "display_name": "example", "email_domain": "example", "clear_email_domain": true, "metadata_url": "example", "idp_entity_id": "example", "idp_sso_url": "example", "x509_certificate": "example" }'Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Body for PUT /account/sso/saml/connection. Every field is optional;
only supplied fields are forwarded to Stytch.
Two ways to configure the IdP side: paste a metadata_url (Stytch fetches
entity id, SSO URL, and certificate) or fill the three fields by hand.
object
Set true to release the claimed domain (disables SSO discovery).
PEM-encoded X.509 signing certificate from the IdP.
Example generated
{ "display_name": "example", "email_domain": "example", "clear_email_domain": true, "metadata_url": "example", "idp_entity_id": "example", "idp_sso_url": "example", "x509_certificate": "example"}Responses
Section titled “ Responses ”Connection updated
SAML connection as returned to the dashboard. Combines our row (account linkage, claimed domain) with the live Stytch object (SP-side values the customer pastes into the IdP, plus the configured IdP values).
object
pending until the IdP side is configured, then active.
Service-provider values for the IdP side of the setup.
Configured IdP values (echoed back so the UI can show current state).
Whether at least one verification certificate is on file.
Example generated
{ "connection_id": "example", "display_name": "example", "status": "example", "email_domain": "example", "acs_url": "example", "audience_uri": "example", "idp_entity_id": "example", "idp_sso_url": "example", "has_certificate": true, "created_at": "2026-04-15T12:00:00Z"}Invalid field values
Missing or invalid authentication
Caller is not a super admin, or the plan does not include SSO
No SSO connection configured
The email domain is claimed by another connection
Internal server error