Account

View User

get
https://api.linode.com/v4/account/users/{username}

Returns information about a single User on your Account.

Authorizations

Personal Access Token
OAuth: ( account:read_only)

Path Parameters

username
Required
string

The username to look up.

Request Samples

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

Response Samples

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

Responses

200: The requested User object

email
string <email>

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

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).

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.

tfa_enabled
boolean

A boolean value indicating if the User has Two Factor Authentication (TFA) enabled. See the Create Two Factor Secret (/profile/tfa-enable) endpoint to enable TFA.

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.

Update User

put
https://api.linode.com/v4/account/users/{username}

Update information about a User on your Account. This can be used to change the restricted status of a User. When making a User restricted, no grants will be configured by default and you must then set up grants in order for the User to access anything on the Account.

Authorizations

Personal Access Token
OAuth: ( account:read_write)

Path Parameters

username
Required
string

The username to look up.

Request Body Schema

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.

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).

Request Samples

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

Response Samples

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

Responses

200: User updated successfully.

email
string <email>

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

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).

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.

tfa_enabled
boolean

A boolean value indicating if the User has Two Factor Authentication (TFA) enabled. See the Create Two Factor Secret (/profile/tfa-enable) endpoint to enable TFA.

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.

Delete User

delete
https://api.linode.com/v4/account/users/{username}

Deletes a User. The deleted User will be immediately logged out and may no longer log in or perform any actions. All of the User's Grants will be removed.

Authorizations

Personal Access Token
OAuth: ( account:read_write)

Path Parameters

username
Required
string

The username to look up.

Request Samples

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

Response Samples

{}

Responses

200: User deleted successfully.

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.