Skip to main content

Delete User API Key

DELETE 

/company/apikey/:tempCode

Permanently delete an API Key created by the authenticated user.

Operation Flow:

  1. Validate that the user exists and belongs to a company
  2. Verify that the provided temp_code exists
  3. Confirm that the key belongs to the user
  4. Delete the key from the database

Important Considerations:

  • Only the user's own keys can be deleted
  • Use the temp_code (not the actual key) to identify the API Key
  • Deletion is permanent and irreversible
  • Requires valid JWT authentication

Usage Example:

DELETE /company/apikey/temp_123456
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Possible Errors:

  • 401: Not authenticated or invalid token
  • 403: Attempt to delete another user's key
  • 404: Key not found or invalid temp_code

Request

Responses

API Key successfully deleted