Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Field

Description

name

The user name

email

The user email address

password

The user password

Response code

The expected response code is 201

Response data

The response data is a JSON object with the following structure:

{

Field

Description

“status”: “success,

Request successful

“data”: {

Response data

“user_id”: <user Id>“<user Id>”

User ID (int)

“user_secret”:<user secret>”<user secret>”

A base64 encoded 32 byte secret

}

}

Update a user password

This API allows to update an existing user password:

Verb

PATCH

Resource

/api/user/v1/changepassword

Content type

application/x-www-form-urlencoded

Body

email=<email>&

oldpassword=<old password>&

newpassword=<new password>

Where:

Field

Description

email

The user email address

oldpassword

The user current password

newpassword

The desired new user password

Response code

The expected response codes are:

  • 200: OK

  • 422: wrong old password

Response data

The response data is a JSON object with the following structure:

{

Field

Description

“status”: “success”,

Request successful

}

Reset a user password

This API allows resetting a user password (backend generated)

Verb

POST

Resource

/api/user/v1/resetpassword

Content type

application/x-www-form-urlencoded

Body

email=<email>

Where:

Field

Description

email

The user email address

Response code

The expected response code is 200

Response data

The response data is a JSON object with the following structure:

{

Field

Description

“status”: “success,

Request successful

“data”: {

Response data

"email": "<email>",

The user email

"password": "<new password>”

The new generated password

}

}