update membership

Description

Updates user profile or password. Users registered via OAuth provider can’t be updated in this way.

URL

/VERSION/users/USR.FORMAT

Available Format

JSON

HTTP Method

PUT

Accepted Version

1

Require

Authorization or Administrator authorization

Headers

Not applicable.

Parameters

  • access_token: (Required) User access token or administrator token. Administrator token can update other user profiles. user profile can update its own profile only.
  • USR: (Required) User identifier to update profile. Default value is ‘me’ for the current authorized user.
  • pwd: (Optional) new desired password for the user account. Must be between 6 and 40 characters length and it will be stored encrypted and never returned.
  • oldpwd: (Required if pwd param is provided) current user account password for the user.
  • gender: (Optional) user gender. Allowed values are ‘male’ or ‘female’. Default value is ‘undefined’.
  • birthday: (Optional) birthday date for the user. according to the ISO 8601 standard.
    • datetime (AAAA-MM-DDThh:mm:sszzzzzz) UTC
    • example: 1997-07-16T10:30:15.342+03:00

Example

https://api.topoos.com/1/users/me.json

curl -X PUT -F "access_token=8FA1D9B0-6876-4D27-9D55-3E97FD84EC92" -F "birthdate=1997-07-16T10:30:15.342+03:00" -F "gender=male"

Reply

JSON example response

{
    "code": 200,
    "description": "OK"
}