v13

OpenAPI 3.1.02026-08-033122950.3 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.

Response

Created token

tokenstring required

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