service-accounts

Create a service account.

Creates a service account in the organization with the given role (developer when omitted). Service accounts may hold any of their roles on every plan. A new account has no keys or trust rules; issue it a key with POST .../keys, or let a CI workflow sign in as it with POST .../trust-rules.

Requires the serviceAccounts.create permission, which only the admin and owner roles hold. Personal access tokens and federated (OIDC-exchanged) tokens are refused whatever their role (personal_access_token_forbidden or api_key_insufficient_permissions): sign in to the console instead.

post/organizations/{organizationId}/service-accounts

Request

  • Base URL
    https://api.shorebird.dev/api/v1
  • Auth
    • HTTP bearer
    • or HTTP bearer

Request body

namestring required

The service account's name. Surrounding whitespace is trimmed; what remains must be 1 to 64 characters.

role'viewer' | 'developer' | 'appManager' | 'auditor'

A role a service account can hold in its organization: a subset of Role. Never admin or owner, so a leaked key cannot manage the organization's members or its other service accounts.

Response

The newly-created service account.

idinteger required

The service account's ID, which is also its user ID.

organization_idinteger required

The organization that owns the service account.

namestring required

The service account's name.

labelstring required

The name the service account is shown by, name[bot].

role'viewer' | 'developer' | 'appManager' | 'auditor' required

A role a service account can hold in its organization: a subset of Role. Never admin or owner, so a leaked key cannot manage the organization's members or its other service accounts.

created_atstring date-time required

When the service account was created.

created_by_user_idinteger nullable required

The user who created the service account, or null once that user has been deleted.

created_by_emailstring nullable required

The email of the user who created the service account, or null once that user has been deleted.

last_auth_atstring date-time nullable required

When the service account last authenticated, or null if it never has. Refreshed at most once a day.

Changes

No recorded changes to this operation across all 1 revision of this API.