Delete User API Key
DELETE/company/apikey/:tempCode
Permanently delete an API Key created by the authenticated user.
Operation Flow:
- Validate that the user exists and belongs to a company
- Verify that the provided temp_code exists
- Confirm that the key belongs to the user
- 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
- 200
- 401
- 403
- 404
API Key successfully deleted
Unauthorized
Forbidden
Not found