Service Accounts
Create a service account.
Enterprise feature
Creates a new service account.
post/api/admin/service-account
Request body
Example request
{
"username": "service-account-1",
"name": "Service Account 1",
"rootRole": 1
}Response
The resource was successfully created.
Example response
{
"id": 54321,
"name": "My Service Account",
"email": "noemail@getunleash.io",
"username": "my-service-account",
"imageUrl": "https://example.com/my-service-account.png",
"inviteLink": "https://example.com/invite-link",
"rootRole": 1,
"createdAt": "2021-01-01T00:00:00.000Z",
"tokens": [
{
"id": 1,
"secret": "user:xyzrandomstring",
"createdAt": "2023-04-19T08:15:14.000Z",
"seenAt": "2023-04-19T08:15:14.000Z",
"userId": 1337,
"description": "user:xyzrandomstring",
"expiresAt": "2023-04-19T08:15:14.000Z"
}
]
}