Skip to main content
POST
/
organisations
/
{organisation_id}
/
service-accounts
Create Service Account
curl --request POST \
  --url https://platform.versori.com/api/organisations/v1/organisations/{organisation_id}/service-accounts \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "roles": [
    "<string>"
  ],
  "groupIDs": [
    "<string>"
  ]
}'
{
  "id": "<string>",
  "name": "<string>",
  "email": "<any>",
  "clientId": "<string>",
  "clientSecret": "<string>",
  "roleBindings": [
    {
      "role": {
        "id": "<string>",
        "name": "<string>",
        "permissions": [
          {
            "id": "organisation.read",
            "description": "<string>"
          }
        ],
        "scopes": [
          "organisation"
        ]
      },
      "resource": {
        "resourceType": "organisation",
        "resourceId": "<string>",
        "name": "<string>"
      }
    }
  ]
}

Path Parameters

organisation_id
string
required

Body

application/json
name
string

Name is an immutable, lower-cased, human-readable identifier for this service account. It may only contain alphanumeric characters and hyphens, and must start with a letter. It must be unique within the scope of an Organisation.

roles
string[]

Roles are the list of role names to be granted to this ServiceAccount at the organisation scope.

groupIDs
string[]

GroupIDs are the list of group IDs to be added to this ServiceAccount.

Response

Created

ServiceAccount is a non-user account which can be used to issue access tokens to use against Versori APIs.

id
string<ulid>
name
string

Name is an immutable, lower-cased, human-readable identifier for this service account. It may only contain alphanumeric characters and hyphens, and must start with a letter. It must be unique within the scope of an Organisation.

email
any

Email is the email address of the ServiceAccount. This is used to easily identify the ServiceAccount when viewing in the UI or observing logs. The email address is generated from the name, suffixed with @sa.ORG_SLUG.versori.com.

clientId
string
clientSecret
string
roleBindings
object[]

RoleBindings are the list of roles bindings granted to this ServiceAccount.

I