Claim an email domain
const url = 'https://api.asklucy.eu/v1/org/sso/domains';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"domain":"acme.lu"}'};
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.asklucy.eu/v1/org/sso/domains \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "domain": "acme.lu" }'The organization’s people have addresses on it. It counts once verified: the answer’s dns for the domain
is the TXT record to add at the domain’s DNS (_asklucy-challenge.<domain>, value
asklucy-domain-verification=<token>), then verifyOrgDomain. Claiming again gives the same record. A
verified domain sends anyone typing an address on it to the provider, and lets the provider make their
account. Audited as org.sso.domain_added.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
An email domain (no wildcard); case doesn’t matter.
Example
acme.luResponses
Section titled “Responses”Claimed; see domains for the record to add.
object
What to register at the provider as the redirect (reply) URI.
object
Microsoft Entra ID, Google Workspace, or any OpenID Connect provider (Okta, Keycloak, Authentik…).
Shown on the sign-in page and in Lucy.
Entra; null means any work or school account.
The OpenID Connect issuer (oidc only).
Members sign in only through the provider.
A provider, a verified domain and a passed test sign-in.
Example
{ "redirect_uri": "https://id.asklucy.eu/idps/callback", "provider": { "kind": "entra", "test": { "status": "passed" }, "updated_by": { "kind": "person" } }, "domains": [ { "domain": "acme.lu", "dns": { "type": "TXT", "name": "_asklucy-challenge.acme.lu", "value": "asklucy-domain-verification=4f1c0e9b2a7d4c6e8b1f3a5d7c9e0b2d" } } ]}The request is invalid; errors lists what’s wrong.
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.
Missing, expired or invalid token.
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.
The token is valid but lacks the role this needs.
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.
The object isn’t in a state that allows this (e.g. Lucy is already answering).
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.
Another service Lucy needed didn’t answer as it should (the problem’s type says which).
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.
Storage for this isn’t configured on the server (e.g. …/errors/desktop-unavailable).
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.