Votta API reference

« back to overview

Users [1.0]

create

Register a user.

URL

POST /user

Required Parameters

  • email String
  • password String

    8 characters minimal

Response Object

  • an empty object

Examples

Request
email=new_user@example.com
password=p1aint3xt-pa55w0rd
Response
{}

show

Show the information for the current logged in user.

URL

GET /user

Response Object

  • User

    the current user

Examples

Request (no parameters) Response
{
  "email": "current_user@example.com"
}

update

Update user information.

URL

PATCH /user

Optional Parameters

  • email String

Response Object

  • User

    the updated user

Examples

normal request Request
email=new_email@example.com
Response
{
  "email": "new_email@example.com",
  "password_updated": false
}
invalid request Request
email=duplicated@example.com
Response
{
  "error": {
    "email": [
      "has already been taken"
    ]
  }
}

destroy

Delete the user. Note that all related information will be lost permanently.

URL

DELETE /user