Confirm an email address with the emailed token.
POST
/v1/auth/verify
const url = 'https://api.opdns.io/v1/auth/verify';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"token":"example"}'};
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/verify \ --header 'Content-Type: application/json' \ --data '{ "token": "example" }'Failures are 400 with a distinct code: invalid_token (unknown),
token_expired (request a new one with POST /v1/auth/resend-verification),
token_used (already consumed; the address may already be verified).
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
token
required
string
Examplegenerated
{ "token": "example"}Responses
Section titled “Responses”Verified.
Media typeapplication/json
object
account
required
object
id
required
string format: uuid
org_id
required
string format: uuid
role
required
string
email
required
string format: email
email_verified_at
string | null format: date-time
plan
required
string
mfa
required
boolean
created_at
required
string format: date-time
is_admin
Operator account; may hold the admin scope.
boolean
deletion_requested_at
string | null format: date-time
deletion_due_at
Set while a deletion is pending; the account is erased at this time unless cancelled.
string | null format: date-time
Example
{ "account": { "role": "owner" }}Malformed request.
Media typeapplication/problem+json
object
type
required
string format: uri
title
required
string
status
required
integer
code
required
Stable machine code.
string
detail
string
errors
Array<object>
object
field
required
string
message
required
string
request_id
string
retry_after
Seconds, repeating the Retry-After header (rate limits, offline nodes).
integer
Example
{ "type": "https://opdns.io/problems/bad_request", "title": "Bad Request", "status": 400, "code": "bad_request", "detail": "invalid JSON body", "request_id": "5f2c9a0e7b1d4c38"}Rate limited (rate_limited).
Media typeapplication/problem+json
object
type
required
string format: uri
title
required
string
status
required
integer
code
required
Stable machine code.
string
detail
string
errors
Array<object>
object
field
required
string
message
required
string
request_id
string
retry_after
Seconds, repeating the Retry-After header (rate limits, offline nodes).
integer
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}Headers
Section titled “Headers”Retry-After
integer