Open an email domain to joining
const url = 'http://localhost:3000/api/v1/email-domains/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"join":true,"projectId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url http://localhost:3000/api/v1/email-domains/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "join": true, "projectId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'With join, anyone who signs up or signs in with an address at exactly this domain is offered to join the organization, able to read one project, once the server’s own email has confirmed the address (me.joinable, POST /api/v1/join). They land in projectId, or the organization’s oldest project when it is null, never the whole organization. Refused for a domain not proved yet, one that gives addresses to the public (gmail.com, orange.fr), one single sign-on covers, and on a server that sends no email of its own.
Scope: admin.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”E.g. acme.com
Request Bodyrequired
Section titled “Request Bodyrequired”object
Examplegenerated
{ "join": true, "projectId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “Responses”The email domain
object
object
Proved by its TXT record: single sign-on and joining by domain may use it
Anyone whose address is at exactly this domain may join the organization, able to read its landing project
The project whoever joins lands in, able to read; null for the organization’s oldest
The organization’s single sign-on uses it
What proves the domain: add this record at your DNS host
object
Example
{ "data": { "record": { "type": "TXT" } }}default
Section titled “default”An error
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": "example" }}