Skip to main content
POST
Create a service account, with or without a first token whose secret is shown once
No plan can call this operation today. It needs a personal access token, and Nitsor does not issue personal access tokens.

Authorizations

Authorization
string
header
required

An Agent credential (nits_…), or a person token (nitp_…) on a deployment that enables them. GET /api/v1/session names the principal a credential proves.

Body

application/json
accountPermissions
enum<string>[]
required
Available options:
account:read,
account:update,
members:read,
members:write,
billing:read,
billing:write,
storage:read,
storage:write,
sources:register,
sources:browse,
notifications:read,
notifications:write,
projects:read,
projects:write,
work:contribute,
clearance:write,
service-accounts:manage
idempotencyKey
string
required
Required string length: 1 - 200
name
string
required
Required string length: 1 - 100
description
string
Maximum string length: 500
firstToken
object

A token minted with the service account. It can name no project: the service account is granted none until a project admin grants it, so projects is refused with token_restriction_ungranted. A caller whose own personal token is restricted to projects is refused the same way, since its first token would default to those projects. To give such a token, omit firstToken, create the service account, have a project admin grant it each project with POST /api/v1/projects/{id}/service-accounts, then add a token with POST /api/v1/service-accounts/{id}/tokens.

ownerEmail
string

The address the owner signs in with, matched without regard to case against the account's active members. A request names its owner by this or by ownerMembershipId, never both.

Required string length: 3 - 320
ownerMembershipId
string

The owner's membership on the account. A request names its owner by this or by ownerEmail, never both.

Required string length: 1 - 200

Response

Create a service account, with or without a first token whose secret is shown once

outcome
enum<string>
required
Available options:
created,
replayed
serviceAccount
object
required
token
object