Skip to content
POST /sso-connection/{id}/domains

Path Parameters

idstring · uuid
required·

The ID of the SSO connection to add the domain to.

Example: 1ba1f401-7183-47c5-9e39-e8e257e3c795

Request Body

domainstring

The email domain to associate with the connection.

Example: example.com
verifiedboolean

Pre-mark the domain verified. Honoured only for Truto staff; ignored for regular team admins (who must use the DNS TXT challenge).

Example: false

Response Body

created_atstring · date-time

The date and time when the domain was added.

Example: 2021-08-10T10:00:00.000Z
domainstring

The email domain associated with the SSO connection.

Example: example.com
sso_connection_idstring · uuid

The ID of the SSO connection this domain belongs to.

Example: 1ba1f401-7183-47c5-9e39-e8e257e3c795
team_idstring · uuid

The ID of the team that owns this domain.

Example: 05daecaf-4365-42e8-8370-8127de5dd717
updated_atstring · date-time

The date and time when the domain was last updated.

Example: 2021-08-10T10:30:00.000Z
verification_recordstring

The exact DNS TXT value to publish on the domain to prove ownership.

Example: truto-domain-verification=3b1f9c2a-7e44-4d0b-9a1e-2c5f8d6b0a11
verification_tokenstring

The DNS TXT challenge token. Publish a TXT record truto-domain-verification=<verification_token> on the domain, then call the verify endpoint.

Example: 3b1f9c2a-7e44-4d0b-9a1e-2c5f8d6b0a11
verifiedboolean

Whether this domain has been verified via the DNS TXT challenge.

Example: false
curl -X POST 'https://api.truto.one/sso-connection/{id}/domains' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "domain": "example.com",
  "verified": false
}'
const body = {
  "domain": "example.com",
  "verified": false
};

const response = await fetch('https://api.truto.one/sso-connection/{id}/domains', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
import requests

url = "https://api.truto.one/sso-connection/{id}/domains"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}
payload = {
    "domain": "example.com",
    "verified": False
}

response = requests.post(url, headers=headers, params=params, json=payload)
print(response.json())