Create system user

Create a new system user on your server.


POST/api/servers/{server}/system-users

Create a system user

This endpoint allows you to create a new system user on your server.

Required attributes

  • Name
    name
    Type
    string
    Description

    The name of the system user you want to create.

Optional attributes

  • Name
    sudo
    Type
    boolean
    Description

    Whether the user should have sudo access.

  • Name
    receive_password
    Type
    boolean
    Description

    Whether to receive the sudo password in the response. Default: false.

Request

POST
/api/servers/{server}/system-users
curl -X POST "https://ploi.io/api/servers/{server}/system-users" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "name": "customer",
    "sudo": false
  }'

Response

{
  "data": {
    "id": 1,
    "name": "customer",
    "root": "/home/customer",
    "created_at": "2020-01-01 12:00:00"
  }
}

Response with password

{
  "data": {
    "id": 1,
    "name": "customer",
    "root": "/home/customer",
    "created_at": "2020-01-01 12:00:00"
  },
  "password": "LYn8r1B9BPt0RXbfZv8rezUM"
}