Skip to the content

DoRoutes API · version 1

Staff sign-in

POST/v1/admin/login

Check a staff password

Request body · object

  • emailstring (email), required
  • passwordstring, required
  • recaptcha_tokenstring

    A reCAPTCHA token, when the tenant checks reCAPTCHA (GET /v1/config says whether).

Example request
{
  "email": "email",
  "password": "string",
  "recaptcha_token": "string"
}

Response 200 · object

Done.

  • challengestring, required

    Send back with the authenticator code; lasts five minutes.

Example response 200
{
  "challenge": "string"
}

Response 400 · Error

The request is not valid.

  • errorobject, required
    • codestring, required

      A short machine-readable name, such as not_found.

    • messagestring, required

      What went wrong, for people.

  • request_idstring, required

    Matches the X-Request-ID response header.

Example response 400
{
  "error": {
    "code": "string",
    "message": "string"
  },
  "request_id": "string"
}

Response 401 · Error

No tenant key, or no valid session.

Fields as in Check a staff password

Response 404 · Error

Not found, or not yours.

Fields as in Check a staff password

Response 409 · Error

It clashes with what is stored.

Fields as in Check a staff password

Response 429 · Error

Too many attempts; see Retry-After.

Fields as in Check a staff password

Response 500 · Error

Something failed on our side.

Fields as in Check a staff password

POST/v1/admin/login/verify

Finish signing in with an authenticator or recovery code

Request body · object

  • challengestring, required
  • codestring

    Six digits from the authenticator app.

  • recovery_codestring

    Instead of code.

Example request
{
  "challenge": "string",
  "code": "string",
  "recovery_code": "string"
}

Response 200 · object

Done.

  • messagestring, required
  • tokenstring, required

    The session; send as a bearer token. It lasts up to 12 hours.

Example response 200
{
  "message": "string",
  "token": "string"
}

Response 400 · Error

The request is not valid.

Fields as in Check a staff password

Response 401 · Error

No tenant key, or no valid session.

Fields as in Check a staff password

Response 404 · Error

Not found, or not yours.

Fields as in Check a staff password

Response 409 · Error

It clashes with what is stored.

Fields as in Check a staff password

Response 429 · Error

Too many attempts; see Retry-After.

Fields as in Check a staff password

Response 500 · Error

Something failed on our side.

Fields as in Check a staff password

POST/v1/admin/invitations/accept

Set a password from an invitation link

Request body · object

  • tokenstring, required
  • passwordstring, required
Example request
{
  "token": "string",
  "password": "string"
}

Response 200 · object

Done.

  • enrolmentobject, required
    • challengestring, required
    • secretstring, required

      The authenticator key.

    • otpauth_urlstring, required

      For a QR code.

Example response 200
{
  "enrolment": {
    "challenge": "string",
    "secret": "string",
    "otpauth_url": "string"
  }
}

Response 400 · Error

The request is not valid.

Fields as in Check a staff password

Response 401 · Error

No tenant key, or no valid session.

Fields as in Check a staff password

Response 404 · Error

Not found, or not yours.

Fields as in Check a staff password

Response 409 · Error

It clashes with what is stored.

Fields as in Check a staff password

Response 429 · Error

Too many attempts; see Retry-After.

Fields as in Check a staff password

Response 500 · Error

Something failed on our side.

Fields as in Check a staff password

POST/v1/admin/enrolment

Confirm the authenticator and get recovery codes

Request body · object

  • challengestring, required
  • codestring, required
Example request
{
  "challenge": "string",
  "code": "string"
}

Response 200 · object

Done.

  • tokenstring, required
  • recovery_codesarray of string, required

    Ten single-use codes, shown once.

Example response 200
{
  "token": "string",
  "recovery_codes": [
    "string"
  ]
}

Response 400 · Error

The request is not valid.

Fields as in Check a staff password

Response 401 · Error

No tenant key, or no valid session.

Fields as in Check a staff password

Response 404 · Error

Not found, or not yours.

Fields as in Check a staff password

Response 409 · Error

It clashes with what is stored.

Fields as in Check a staff password

Response 429 · Error

Too many attempts; see Retry-After.

Fields as in Check a staff password

Response 500 · Error

Something failed on our side.

Fields as in Check a staff password

POST/v1/admin/password-reset

Email a password reset link

Request body · object

  • emailstring (email), required
  • recaptcha_tokenstring

    A reCAPTCHA token, when the tenant checks reCAPTCHA (GET /v1/config says whether).

Example request
{
  "email": "email",
  "recaptcha_token": "string"
}

Response 200 · Message

Done.

  • messagestring, required
Example response 200
{
  "message": "string"
}

Response 400 · Error

The request is not valid.

Fields as in Check a staff password

Response 401 · Error

No tenant key, or no valid session.

Fields as in Check a staff password

Response 404 · Error

Not found, or not yours.

Fields as in Check a staff password

Response 409 · Error

It clashes with what is stored.

Fields as in Check a staff password

Response 429 · Error

Too many attempts; see Retry-After.

Fields as in Check a staff password

Response 500 · Error

Something failed on our side.

Fields as in Check a staff password

POST/v1/admin/password-reset/confirm

Set a new password from a reset link

Request body · object

  • tokenstring, required
  • passwordstring, required
Example request
{
  "token": "string",
  "password": "string"
}

Response 200 · Message

Done.

Fields as in Email a password reset link

Response 400 · Error

The request is not valid.

Fields as in Check a staff password

Response 401 · Error

No tenant key, or no valid session.

Fields as in Check a staff password

Response 404 · Error

Not found, or not yours.

Fields as in Check a staff password

Response 409 · Error

It clashes with what is stored.

Fields as in Check a staff password

Response 429 · Error

Too many attempts; see Retry-After.

Fields as in Check a staff password

Response 500 · Error

Something failed on our side.

Fields as in Check a staff password

POST/v1/admin/logout/everywhere

End all of the staff member's sessions

Any signed-in staff member.

Response 200 · Message

Done.

Fields as in Email a password reset link

Response 401 · Error

No tenant key, or no valid session.

Fields as in Check a staff password

Response 403 · Error

The session may not do this.

Fields as in Check a staff password

Response 429 · Error

Too many attempts; see Retry-After.

Fields as in Check a staff password

Response 500 · Error

Something failed on our side.

Fields as in Check a staff password