Update a user

Updating a user is done via one primary API method & through action-specific use cases e.g. password reset.

1. Updating a user's profile information
2. Triggering a user password reset email
3. Setting a new password on a user's account

Endpoints

Update a single user's full profile information

  • PUT /user
    • Permissions: user:profile:update

Parameters

  • name - string - required

Response

  • id - string
  • email - string
  • name - string

Example

$ echo '{"name": "Leo Messi"}' | http PUT 'http://localhost:5000/user' 'Authorization: Bearer ACCESS_TOKEN'

HTTP/1.1 200 OK
{
    "email": "[email protected]",
    "id": "user_423a7fb0-9a5d-4abb-b3b7-1a3d92ada5cc",
    "name": "Leo Messi"
}

Update a user's password

  • PUT /user/password
    • Permissions: user:profile:password:update

Parameters

  • password - string - required: Same password requirements as required by Create User

Response

  • id - string
  • email - string
  • name - string
  • just_created - boolean

Example

$ echo '{"password": "T3$TingPassword__2"}' | http PUT 'http://localhost:5000/user/password' 'Authorization: Bearer ACCESS_TOKEN'

HTTP/1.1 200 OK
{
    "email": "[email protected]",
    "id": "user_423a7fb0-9a5d-4abb-b3b7-1a3d92ada5cc",
    "name": "Mariano Iglesias",
    "just_created": false
}

Trigger password reset email

  • DELETE /user/password
    • Permissions: none

Parameters

  • email - string - required: Email of user

Response

  • email - string

Example

$ echo '{"email": "[email protected]"}' | http DELETE 'http://localhost:5000/user/password'

HTTP/1.1 200 OK
{
    "email": "[email protected]"
}
Was this page helpful?