Create a service account
Creates an organization-owned identity with a role, for API keys not tied to a person. It cannot hold the Owner role; an org may have at most 200. Requires a signed-in session. Its role must be within the creator's own access.
Required permission
Requires the serviceaccount.manage permission. See Permissions for the roles and API key permissions that include it.
Command line
The orl CLI wraps this endpoint:
orl service-accounts create --name <name> --role-id <role-id>apiKeyAuthorizationBearer <token>OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).
application/json- body
name*stringlength <= 64description?stringlength <= 256roleId*stringCreated
application/json- response
id*stringname*stringdescription?stringroleId*stringroleName?stringdisabled*booleanA disabled account's keys are denied every request.
keyCount*integerLive keys the account holds.
createdBy*stringcreatedAt*stringcurl -X POST 'https://api.openrelay.inc/v1/service-accounts' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "roleId": "string"}'{ "id": "string", "name": "string", "description": "string", "roleId": "string", "roleName": "string", "disabled": true, "keyCount": 0, "createdBy": "string", "createdAt": "string"}List service accounts GET
Returns the organization's service accounts, each with its role, whether it is disabled, how many unrevoked API keys it holds, and who created it.
Get a service account GET
Returns one service account by id: its name, description, role, whether it is disabled, how many unrevoked API keys it holds, and who created it and when.