Create user

POST /api/users

Allows you to create a new user in your account.

Body

The parameters to create a user

  • account_id string Required

    id of the account to associate the user to. Only valid for Garmat admins

  • email string Required

    email of the user to create

  • name string Required

    name of the user to create

  • role string Required

    role of the user to create.

  • status string

    status of the user to create.

Responses

  • OK

    Hide response attributes Show response attributes object
    • Id of the account the user belongs to

    • email string Required

      email of the user to create

    • id string

      ID of the user in the system

    • name string

      Name of the user

    • role string Required

      role of the user to create.

    • status string

      status of the user to create.

  • Bad request

    Hide response attribute Show response attribute object
    • error string

      Human readable version of the error status code

  • Unauthorized

    Hide response attribute Show response attribute object
    • error string

      Human readable version of the error status code

POST /api/users
curl \
 -X POST http://localhost:4000/api/users \
 -d '{"name":"Test User","role":"customer_read_only","email":"user@test.com","status":"active","account_id":"f260f115-f2e6-4dde-bcab-98b10fdb8cf6"}'
Request examples
{
  "name": "Test User",
  "role": "customer_read_only",
  "email": "user@test.com",
  "status": "active",
  "account_id": "f260f115-f2e6-4dde-bcab-98b10fdb8cf6"
}
Response examples (200)
{
  "id": "f260f115-f2e6-4dde-bcab-98b10fdb8cf6",
  "name": "Test User",
  "role": "customer_read_only",
  "email": "user@test.com",
  "status": "active",
  "account_id": "293f191b-f2e6-4dde-bcab-00b10fdb8cf4"
}
Response examples (200)
{
  "id": "f260f115-f2e6-4dde-bcab-98b10fdb8cf6",
  "name": "Test User",
  "role": "customer_read_only",
  "email": "user@test.com",
  "status": "active",
  "account_id": "293f191b-f2e6-4dde-bcab-00b10fdb8cf4"
}
Response examples (400)
{
  "error": "Error Reason"
}
Response examples (400)
{
  "error": "Error Reason"
}
Response examples (401)
{
  "error": "Error Reason"
}
Response examples (401)
{
  "error": "Error Reason"
}