v19

latestOpenAPI 3.1.02026-08-083142953.7 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.

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

Updated token info

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