Skip to content

Open an email domain to joining

PATCH
/api/v1/email-domains/{domain}
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.

domain
required
string

E.g. acme.com

Media typeapplication/json
object
join

Let anyone whose address is at exactly this domain join, able to read its landing project. Needs it proved, not free mail, no single sign-on over it, and the server’s own email

boolean
projectId
Any of:
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
Examplegenerated
{
"join": true,
"projectId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

The email domain

Media typeapplication/json
object
data
required
object
domain
required
string
verified
required

Proved by its TXT record: single sign-on and joining by domain may use it

boolean
join
required

Anyone whose address is at exactly this domain may join the organization, able to read its landing project

boolean
projectId
required

The project whoever joins lands in, able to read; null for the organization’s oldest

string | null
sso
required

The organization’s single sign-on uses it

boolean
record
required

What proves the domain: add this record at your DNS host

object
type
required
string
Allowed value: TXT
name
required
string
value
required
string
Example
{
"data": {
"record": {
"type": "TXT"
}
}
}

An error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
detail
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": "example"
}
}