v19

latestOpenAPI 3.1.02026-08-083142953.7 KB
service-accounts

Create service-account token

Create a new access token for a service account. Store the token securely - it cannot be retrieved later.

post/api/organizations/{name}/service-accounts/{serviceAccountId}/tokens

Path parameters

namestring required
serviceAccountIdstring required

Request body

displayNamestring

Display name for the token

permissionsstring[]

Org-wide permissions for this token

repoIdsstring[]

Repositories to grant repoPermissions on. Can be repositories owned by the organization or any public repository. These override the org-wide permissions.

repoPermissionsstring[]

Permissions granted on the selected repoIds.

endpointPatternsstring[]

Inference endpoint name patterns (wildcards allowed, e.g. gpt2-*) restricting the token's org-wide Inference Endpoint permissions to matching endpoints. Empty means all endpoints.

skipNetworkSecurityboolean

Exempt this token from the org's Network Security enforcement (IP allowlist and content access policy). Enterprise Plus only, and requires the org.networkSecurity.write permission.

Response

Created token

tokenstring required

The access token - store this securely, it cannot be retrieved later