Create the account's SAML SSO connection. The response carries the service-provider values (ACS URL, audience URI) the customer configures at their IdP; the connection stays `pending` until the IdP side is filled in via the update endpoint.
const url = 'https://api.siteqwality.com/account/sso/saml/connection';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"display_name":"example","email_domain":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --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" }'Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Body for POST /account/sso/saml/connection.
object
Label shown in the dashboard and at Stytch, e.g. “Okta”.
Email domain to claim for SSO discovery, e.g. corp.example.com.
Optional at create; the connection is not startable from the login
screen until it is set AND the connection is active.
Example generated
{ "display_name": "example", "email_domain": "example"}Responses
Section titled “ Responses ”Connection created
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 display name or email domain
Missing or invalid authentication
Caller is not a super admin, or the plan does not include SSO
A connection already exists for this account
Internal server error