Create API key for service account

Mint a new API key bound to a service account. The full identifier is only returned on this response. Team admin only.

post/service-accounts/{idOrName}/api-keys

Request

Path parameters

idOrNamestring required

The ID or name of the service account this key authenticates as.

Request body

$schemastring uri

A URL to the JSON Schema for this object.

expires_atstring date-time

When the API key expires.

namestring required

Human-readable name for the API key.

scopesstring

Space-separated scopes for the key. Defaults to the SA's role scopes when omitted.

Example request

{
  "$schema": "https://api.tower.dev/v1/schemas/CreateServiceAccountAPIKeyParams.json"
}

Response

Created

$schemastring uri

A URL to the JSON Schema for this object.

Example response

{
  "$schema": "https://api.tower.dev/v1/schemas/CreateServiceAccountAPIKeyResponse.json"
}

Changes

No recorded changes to this operation across all 12 revisions of this API.