v1

latestOpenAPI 3.1.02026-07-24170121.2 MB

Add User

post/v1/users

Headers

Acceptstring required

Indicates which content types, expressed as MIME types, the client is able to understand.

Content-Typestring required

Indicates the media type of the resource sent in the HTTP message body. <br /><br /><b>Possible Values:</b><br /> application/json<br />application/x-www-form-urlencoded

Request body

emailstring required

The email address of the user.

namestring required

The names of the user ex: "John Smith"

passwordstring required

A password must be between 8 to 300 characters and must contain one uppercase, one lowercase and one numeric character.

usernamestring required

The username of the user ex: "john.smith2"

roles_idsstring[] required

The roles ids that should be assigned to the User, taken from the Get Roles API

Response

200

Example response

{
  "data": {
    "object": "User",
    "id": "JvpV1VAv224Rn685",
    "real_id": 41156,
    "name": "Tsvetan Delchev",
    "email": "tsvetan.delchev@payarc.com",
    "created_at": 1729514238,
    "updated_at": 1729514238,
    "readable_created_at": "1 second ago",
    "readable_updated_at": "1 second ago",
    "response_content": true,
    "username": "tsvetan.delchev",
    "role": {
      "id": 3720,
      "name": "finance",
      "guard_name": "api",
      "display_name": "FINANCE (api)",
      "description": "FINANCE",
      "created_at": "2024-07-16T15:16:17.000000Z",
      "updated_at": "2024-07-16T15:16:17.000000Z",
      "account_id": 24,
      "name_export": "finance",
      "display_name_export": "FINANCE (api)",
      "created_at_export": "2024-07-16 15:16:17",
      "role_id_export": "bjMKQazjbMQaEmLR",
      "description_export": "FINANCE",
      "pivot": {
        "model_id": 41156,
        "role_id": 3720,
        "model_type": "App\\Containers\\AppSection\\User\\Models\\User"
      }
    }
  },
  "meta": {
    "include": [
      "roles"
    ]
  }
}