Delete API key

When a customer leaves your CMS or website builder, or one of your websites is decommissioned, delete its API key with this Admin API request (available on Studio and higher plans) so it no longer counts against your license and cannot be used to load the editor anymore.

The deletion is reversible: the configuration is kept on N1ED servers, and the key can be restored later with the Undelete API key request. Deleted API keys remain reserved — they will never be reassigned when new keys are generated. You can review them at any moment using List API keys with the deleted=true parameter.

Note that some API keys cannot be deleted: the default (first) API key of the account, keys with a license or a Flmngr access key attached, and keys used as a parent by other active keys (detach or delete the children first).

Request format

URL: https://cloud.n1ed.com/a/admin/api-key-delete
Request type: POST
Content type: application/x-www-form-urlencoded
Parameters:

  • adminToken

    Your secret Admin API token

  • apiKey

    API key on the current account to be deleted. Please specify the full (24-character) API key.

Response format

The server will return an "OK" confirmation in the data section if the request succeeds, or an error code otherwise.

HTTP code: 200
Content type: application/json
Body:

{
    error: null,
    data: "OK"
}

Possible error codes:

  • NO-SUCH-API-KEY - there is no active API key with this value on your account. Are you trying to delete an already deleted API key?
  • UNABLE-TO-CHANGE-NOT-OWN-API-KEY - the specified API key does not belong to your account.
  • CANT-DELETE-DEFAULT-API-KEY - the default (first) API key of the account cannot be deleted.
  • CANT-DELETE-API-KEY-WITH-LICENSE - a license is attached to this API key, so it cannot be deleted.
  • CANT-DELETE-API-KEY-WITH-ACCESS-KEY - a Flmngr access key is attached to this API key, so it cannot be deleted.
  • CANT-DELETE-PARENT-API-KEY - other active API keys use this key as their parent. Detach or delete the child keys first.
  • INCORRECT-TOKEN - the adminToken parameter has been incorrectly specified.

Sample request

Here is a sample of how to make this request from the Linux console (sh, bash, or any other shell).

curl \
    -X POST https://cloud.n1ed.com/a/admin/api-key-delete \
    -d "adminToken=your-secret-admin-token&apiKey=your-api-key"

Please refer to Admin API to see samples for PHP, JS, and learn how to write code for other languages.