Account

List Users

get
https://api.linode.com/v4/account/users

Returns a paginated list of Users on your Account. Users may access all or part of your Account based on their restricted status and grants. An unrestricted User may access everything on the account, whereas restricted User may only access entities or perform actions they've been given specific grants to.

Authorizations

Personal Access Token
OAuth: ( account:read_only)

Query Parameters

page
integer > = 1
Default: 1

The page of a collection to return.

page_size
integer [25 .. 100]
Default: 100

The number of items to return per page.

Request Samples

curl -H "Authorization: Bearer $TOKEN" \
    https://api.linode.com/v4/account/users

Response Samples

{
  "data": [
    {
      "username": "example_user",
      "email": "example_user@linode.com",
      "restricted": true,
      "ssh_keys": [
        "home-pc",
        "laptop"
      ]
    }
  ],
  "page": 1,
  "pages": 1,
  "results": 1
}

Responses

200: A paginated list of Users.

data
array of objects
username
Filterable
string^[a-zA-Z0-9]((?![_-]{2,})[a-zA-Z0-9-_])+[a-zA-Z0-9]$

This User's username. This is used for logging in, and may also be displayed alongside actions the User performs (for example, in Events or public StackScripts).

email
string

The email address for this User, for account management communications, and may be used for other communications as configured.

restricted
boolean

If true, this User must be granted access to perform actions or access entities on this Account. See /account/users/{username}/grants for details on how to configure grants for a restricted User.

ssh_keys
array

A list of SSH Key labels added by this User. These are the keys that will be deployed if this User is included in the authorized_users field of a create Linode, rebuild Linode, or create Disk request.

page
integer
pages
integer
results
integer

default: Error

errors
array of objects
reason
string

What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.

field
string

The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.

Create User

post
https://api.linode.com/v4/account/users

Creates a User on your Account. Once created, the User will be able to log in and access portions of your Account. Access is determined by whether or not they are restricted, and what grants they have been given.

Authorizations

Personal Access Token
OAuth: ( account:read_write)

Request Body Schema

email
Required
string <email>

The new User's email address.

username
Required
string [3 .. 32] characters ^[a-zA-Z0-9]((?![_-]{2,})[a-zA-Z0-9-_])+[a-zA-Z0-9]$

The new User's username. This is used for logging in, and may also be displayed alongside actions the User performs (for example, in Events or public StackScripts).

restricted
boolean

If true, the new User must be granted access to perform actions or access entities on this Account. See /account/users/{username}/grants for details on how to configure grants for a restricted User.

Request Samples

curl -H "Content-Type: application/json" \
    -H "Authorization: Bearer $TOKEN" \
    -X POST -d '{
        "username": "example_user",
        "email": "person@place.com",
        "restricted": true
    }' \
    https://api.linode.com/v4/account/users

Response Samples

{
  "username": "example_user",
  "email": "example_user@linode.com",
  "restricted": true,
  "ssh_keys": []
}

Responses

200: New User created successfully.

username
Filterable
string [3 .. 32] characters ^[a-zA-Z0-9]((?![_-]{2,})[a-zA-Z0-9-_])+[a-zA-Z0-9]$

This User's username. This is used for logging in, and may also be displayed alongside actions the User performs (for example, in Events or public StackScripts).

email
string <email>

The email address for this User, for account management communications, and may be used for other communications as configured.

restricted
boolean

If true, this User must be granted access to perform actions or access entities on this Account. See /account/users/{username}/grants for details on how to configure grants for a restricted User.

ssh_keys
array of objects

A list of SSH Key labels added by this User. These are the keys that will be deployed if this User is included in the authorized_users field of a create Linode, rebuild Linode, or create Disk request.

default: Error

errors
array of objects
reason
string

What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.

field
string

The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.