v14

latestOpenAPI 3.1.02026-08-043122950.3 KB
service-accounts

Update service-account token

Update the name and/or permissions of an existing service account token.

patch/api/organizations/{name}/service-accounts/{serviceAccountId}/tokens/{tokenId}

Path parameters

namestring required
serviceAccountIdstring required
tokenIdstring required

Request body

displayNamestring

New 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

Updated token info

_idstring required
displayNamestring required
permissionsstring[] required
repoIdsstring[] required
repoPermissionsstring[] required
endpointPatternsstring[] required