Create or replace the SSO connection (owner). OIDC: discovers the issuer endpoints; SAML: IdP certificate
const url = 'https://api.replifier.com/v1/orgs/org_01hx0000000000000000000000/sso';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"protocol":"oidc","name":"example","defaultRole":"admin","issuer":"https://example.com","clientId":"example","clientSecret":"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.replifier.com/v1/orgs/org_01hx0000000000000000000000/sso \ --header 'Content-Type: application/json' \ --data '{ "protocol": "oidc", "name": "example", "defaultRole": "admin", "issuer": "https://example.com", "clientId": "example", "clientSecret": "example" }'Replacing turns off enforced and clears lastLoginAt (sign-in must be tested again). Domains do not change. With OIDC, clientSecret is required when creating or switching protocol; without it the previous one is kept.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
org_01hx0000000000000000000000Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Connection
object
Role given to someone provisioned on first sign-in (never owner). member sees all brands as a viewer.
Members on the verified domains can only sign in through SSO.
Public part of the configuration (never the client secret).
object
object
DNS record that proves the domain belongs to the organization.
object
What to register in the IdP: redirectUri (OIDC) or entityId and acsUrl (SAML).
object
Example
{ "protocol": "oidc", "status": "active", "defaultRole": "admin", "domains": [ { "verification": { "recordType": "TXT" } } ]}Connection created
object
Role given to someone provisioned on first sign-in (never owner). member sees all brands as a viewer.
Members on the verified domains can only sign in through SSO.
Public part of the configuration (never the client secret).
object
object
DNS record that proves the domain belongs to the organization.
object
What to register in the IdP: redirectUri (OIDC) or entityId and acsUrl (SAML).
object
Example
{ "protocol": "oidc", "status": "active", "defaultRole": "admin", "domains": [ { "verification": { "recordType": "TXT" } } ]}Invalid data
object
object
Example
{ "error": { "code": "not_found" }}No session, expired session, or invalid, expired or revoked API key
object
object
Example
{ "error": { "code": "not_found" }}Not allowed, API key missing the scope, IP not allowed, or request rejected (csrf_rejected)
object
object
Example
{ "error": { "code": "not_found" }}Does not exist or is not visible to you
object
object
Example
{ "error": { "code": "not_found" }}Internal error
object
object
Example
{ "error": { "code": "not_found" }}