Table of Contents (left)

  1. Users [1.0]
    1. create
      1. URL
      2. Required Parameters
      3. Response Object
      4. Examples
    2. show
      1. URL
      2. Response Object
      3. Examples
    3. update
      1. URL
      2. Optional Parameters
      3. Response Object
      4. Examples
    4. destroy
      1. URL

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