users

Create a new user

Create a new Portainer user. Only administrators can create users. Access policy: restricted

post/users

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/users
  • Auth
    • API key in header X-API-KEY
    • or API key in header Authorization

Request body

Passwordstring required
Role1 | 2 required

User role (1 for administrator account and 2 for regular account)

Usernamestring required

Example request

{
  "Password": "cg9Wgky3",
  "Role": 2,
  "Username": "bob"
}

Response

Success

Idinteger required

User Identifier

Role0 | 1 | 2 required
TokenIssueAtinteger
UseCacheboolean
Usernamestring required

Example response

{
  "Id": 1,
  "ThemeSettings": {
    "color": "dark"
  },
  "TokenIssueAt": 1,
  "UseCache": true,
  "Username": "bob"
}

Changes

No recorded changes to this operation across all 21 revisions of this API.