Delete API key

DELETE /users/auth/keys/{api_key_id}

Delete or invalidate the API key.

Path parameters

Responses

  • The API key is deleted.

  • The {api_key_id} can't be found. (code: api_keys.key_not_found)

    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Value is api_keys.key_not_found.

    Hide response attribute Show response attribute object
    • errors array[object] Required

      A list of errors that occurred in the failing request

      Hide errors attributes Show errors attributes object
      • code string Required

        A structured code representing the error type that occurred

      • message string Required

        A human readable message describing the error that occurred

      • fields array[string]

        If the error can be tied to a specific field or fields in the user request, this lists those fields

DELETE /users/auth/keys/{api_key_id}
curl \
 -X DELETE https://api.elastic-cloud.com/api/v1/users/auth/keys/{api_key_id}
Response examples (200)
{}
Response examples (404)
# Headers
x-cloud-error-codes: api_keys.key_not_found

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}