Users
Auth

Set a password via magic-link token

Consumes a single-use set_password token (from the magic-link email issued at signup) and sets the account password. On success the session cookie is set, so the browser that opened the link is logged in. The token is single-use and expiring; a used / expired / unknown token 400s. Because the token was delivered by email, a successful consume also marks the email verified (stamps juju.email.date_verified).

post/api/v1/users/auth/set-password

Request

  • Base URL: https://api.juju.com
  • URL: https://api.juju.com/api/v1/users/auth/set-password
  • Auth: none declared

Request body

tokenstring required

The set_password token from the magic link.

passwordstring required

Example request

{
  "password": "correct-horse-battery-staple"
}

Response

Password set; session cookie issued.

metaobject required

Pagination and context metadata. Always present, empty object ({}) when no metadata applies to the response.

errorsstring[] required

Empty array on success. On failure, human-readable error strings suitable for surfacing to end users.

Example response

{
  "data": {
    "logged_in": true
  },
  "errors": []
}

Changes

No recorded changes to this operation across all 1 revision of this API.