Create an account and its organisation.
const url = 'https://api.opdns.io/v1/auth/signup';const options = { method: 'POST', headers: {'Content-Type': 'application/json'},};
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.opdns.io/v1/auth/signup \ --header 'Content-Type: application/json' \In closed mode, returns 403 signup_closed. In invite mode, requires a
valid invite_code or an email/exact-domain allowlist match; every missing,
invalid, expired, revoked or exhausted code returns the same 403
invite_required. Open mode requires neither. There is no account cap.
Eligible requests answer 202 with the same body whether or not the email
is already registered. A new account gets a verification email with a link to
<dashboard>/verify-email?token=ver_... (24 h, single use); an existing address
gets an “account exists” email instead (at most one a minute). Mail goes through
the mailer role’s queue.
Request Bodyrequired
Section titled “Request Bodyrequired”object
12 to 128 characters (Unicode code points), no composition rules.
Optional opaque invitation code, required in invite mode unless allowlisted.
Examplegenerated
{ "password": "example", "invite_code": "example"}Responses
Section titled “Responses”Accepted; verification sent.
object
Example
{ "status": "verification_sent"}Malformed request.
object
Stable machine code.
object
Seconds, repeating the Retry-After header (rate limits, offline nodes).
Example
{ "type": "https://opdns.io/problems/bad_request", "title": "Bad Request", "status": 400, "code": "bad_request", "detail": "invalid JSON body", "request_id": "5f2c9a0e7b1d4c38"}Signup is closed, or the request lacks a valid invitation.
object
Stable machine code.
object
Seconds, repeating the Retry-After header (rate limits, offline nodes).
Examples
{ "type": "https://opdns.io/problems/signup_closed", "title": "Forbidden", "status": 403, "code": "signup_closed", "detail": "signup is closed"}{ "type": "https://opdns.io/problems/invite_required", "title": "Forbidden", "status": 403, "code": "invite_required", "detail": "a valid invitation is required"}The request failed validation (validation_failed), or the new password was
refused: password_too_short (under 12 characters), password_too_long (over
128). Length is counted in Unicode code points and the password is used as
sent (no normalisation). A password problem alongside other invalid fields is
validation_failed listing them all. errors names the password field.
object
Stable machine code.
object
Seconds, repeating the Retry-After header (rate limits, offline nodes).
Example
{ "type": "https://opdns.io/problems/password_too_short", "title": "Unprocessable Content", "status": 422, "code": "password_too_short", "detail": "the password must be at least 12 characters", "errors": [ { "field": "password", "message": "at least 12 characters" } ], "request_id": "5f2c9a0e7b1d4c38"}Rate limited (rate_limited).
object
Stable machine code.
object
Seconds, repeating the Retry-After header (rate limits, offline nodes).
Example
{ "type": "https://opdns.io/problems/rate_limited", "title": "Too Many Requests", "status": 429, "code": "rate_limited", "detail": "too many requests", "request_id": "5f2c9a0e7b1d4c38", "retry_after": 6}