POST /auth/register

Allow a user to register himself to the service.

application/json

Body Required

  • email string(email) Required

    User email address

  • password string(password) Required

    User password

  • password_2 string(password) Required

    Password confirmation

  • first_name string Required

    User first name

  • last_name string Required

    User last name

Responses

  • 201

    Registration successful

  • 400

    Invalid password or email

POST /auth/register
curl -X POST "http://api.example.com/auth/register" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "email": "admin@example.com",
  "password": "",
  "password_2": "",
  "first_name": "",
  "last_name": ""
}'
import requests

url = "http://api.example.com/auth/register"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json"
}
params = {}
payload = {
    "email": "admin@example.com",
    "password": "",
    "password_2": "",
    "first_name": "",
    "last_name": ""
}

response = requests.post(
    url,
    headers=headers,
    params=params,
    json=payload
)

response.raise_for_status()

if response.content:
    print(response.json())
curl \
 --request POST 'http://api.example.com/auth/register' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"email":"admin@example.com","password":"string","password_2":"string","first_name":"string","last_name":"string"}'
Request examples
{
  "email": "admin@example.com",
  "password": "string",
  "password_2": "string",
  "first_name": "string",
  "last_name": "string"
}