Create a service account.

View as Markdown

Enterprise feature

Creates a new service account.

Authentication

Authorizationstring
API key needed to access this API
OR
AuthorizationBearer
API key needed to access this API, in Bearer token format

Request

#/components/schemas/createServiceAccountSchema

usernamestringRequired
The username of the service account
namestringRequired
The name of the service account
rootRoleintegerRequired
The id of the root role for the service account

Response headers

locationstringOptional
The location of the newly created resource.

Response

The resource was successfully created.
iddouble
The service account id
namestringOptional
The name of the service account
usernamestringOptional
The service account username
imageUrlstringOptional
The service account image url
rootRoleintegerOptional
The root role id associated with the service account
createdAtstringOptionalformat: "date-time"
The service account creation date
tokenslist of objectsOptional
The list of tokens associated with the service account
isAPIbooleanOptionalDeprecated

Deprecated: for internal use only, should not be exposed through the API

emailstringOptionalDeprecated

Deprecated: service accounts don’t have emails associated with them

loginAttemptsdoubleOptionalDeprecated

Deprecated: service accounts cannot log in to Unleash

emailSentbooleanOptionalDeprecated

Deprecated: internal use only

seenAtstring or nullOptionalformat: "date-time"Deprecated

Deprecated. This property is always null. To find out when a service account was last seen, check its tokens list and refer to each token’s lastSeen property instead.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
409
Conflict Error
415
Unsupported Media Type Error