Create user

POST /users

Creates a new user from a username and password. Immediately returns a valid access token for that user.

application/json

Body

  • user_name string Required

    The regex means: lowercase letters and numbers, separated by dashes, with no leading, trailing, or double dashes.

    Maximum length is 64. Format should match the following pattern: ^[a-z0-9](-?[a-z0-9])*$.

  • password string Required

    Minimum length is 8, maximum length is 256.

Responses

  • Created

    Hide response attributes Show response attributes object
    • Format should match the following pattern: ^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$.

    • Format should match the following pattern: ^[0-9a-f]{64}$.

  • Bad Request

  • Conflict

POST /users
curl \
 -X POST https://example.com/users \
 -H "Content-Type: application/json" \
 -d '{"user_name":"happy-un1c0rn","password":"12345678"}'
Request example
{
  "user_name": "happy-un1c0rn",
  "password": "12345678"
}
Request examples
{
  "user_name": "happy-un1c0rn",
  "password": "12345678"
}
Response examples (201)
{
  "user_identifier": "575a7328-4e2e-4b88-afcc-e0b5ed3920cc",
  "access_token": "c59805ae394cceea937163877ca31375183650586137170a69652b6d8543e869"
}
Response examples (201)
{
  "user_identifier": "575a7328-4e2e-4b88-afcc-e0b5ed3920cc",
  "access_token": "c59805ae394cceea937163877ca31375183650586137170a69652b6d8543e869"
}