Skip to main content

Delete an access key

Reviewed on

Permanently deletes an AK/SK credential attached to a service account.

Permissions​

info

This action requires the following IAM (Identity and Access Management) permission:

  • iam.accessKey.delete

API​

Permanently delete an AK/SK credential and revoke the sessions opened with it.

info

Prerequisites: the credential must exist — its identifier is available in the list of access keys.

This operation requires an access token and the permissions listed at the top of the page.

DELETE https://api.eu-west-2.numspot.com/iam/organisations/{organisationId}/serviceAccounts/{serviceAccountId}/aksk/{akskId}

Full documentation for this endpoint ↗

Parameters​

ParameterLocationRequiredTypeExampleDescription
organisationIdpathyesUUID123e4567-e89b-12d3-a456-426614174000Organisation owning the service account
serviceAccountIdpathyesUUID123e4567-e89b-12d3-a456-426614174000Service account the credential is attached to
akskIdpathyesUUID123e4567-e89b-12d3-a456-426614174000Credential to delete, from the list of access keys

Example​

export TOKEN="{TOKEN}"

curl 'https://api.eu-west-2.numspot.com/iam/organisations/{ORGANISATION-ID}/serviceAccounts/{SERVICE-ACCOUNT-ID}/aksk/{AKSK-ID}' \
--request DELETE \
--header "Authorization: Bearer $TOKEN"
VariableRepresentsWhere to find its value
{TOKEN}OAuth 2.0 access token of the requestGenerated by the API authentication flow (see Access token)
{ORGANISATION-ID}Organisation owning the service accountNumspot console (active organisation)
{SERVICE-ACCOUNT-ID}Service account the credential is attached toResponse of the List service accounts ↗ API
{AKSK-ID}Credential to deleteid field of the list of access keys

Response​

204 No Content — the credential is deleted; the response body is empty.

warning

This action is irreversible. It also revokes all the sessions opened with the deleted credential: any client still using it loses access to the API immediately. If access is needed again, a new credential must be created.

To replace a key without service interruption, create the replacement key first (create an access key), then delete the old one.

Main errors​

CodeCase
401Access token missing, expired or invalid
403Missing iam.accessKey.delete permission
404Unknown organisationId, serviceAccountId or akskId
500Internal service error — retry later