Delete an access key
Reviewed on
Permanently deletes an AK/SK credential attached to a service account.
Permissions
This action requires the following IAM (Identity and Access Management) permission:
- iam.accessKey.delete
- API
API
Permanently delete an AK/SK credential and revoke the sessions opened with it.
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
| Parameter | Location | Required | Type | Example | Description |
|---|---|---|---|---|---|
organisationId | path | yes | UUID | 123e4567-e89b-12d3-a456-426614174000 | Organisation owning the service account |
serviceAccountId | path | yes | UUID | 123e4567-e89b-12d3-a456-426614174000 | Service account the credential is attached to |
akskId | path | yes | UUID | 123e4567-e89b-12d3-a456-426614174000 | Credential 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"
| Variable | Represents | Where to find its value |
|---|---|---|
{TOKEN} | OAuth 2.0 access token of the request | Generated by the API authentication flow (see Access token) |
{ORGANISATION-ID} | Organisation owning the service account | Numspot console (active organisation) |
{SERVICE-ACCOUNT-ID} | Service account the credential is attached to | Response of the List service accounts ↗ API |
{AKSK-ID} | Credential to delete | id field of the list of access keys |
Response
204 No Content — the credential is deleted; the response body is empty.
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
| Code | Case |
|---|---|
| 401 | Access token missing, expired or invalid |
| 403 | Missing iam.accessKey.delete permission |
| 404 | Unknown organisationId, serviceAccountId or akskId |
| 500 | Internal service error — retry later |