Skip to content

Rotate API key

Request

Generate a new API key for the customer account. The old key will be immediately invalidated. Important: Update all applications with the new key immediately.

Security
ApiKeyAuth
curl -i -X POST \
  https://api.mailerlogic.net/api/v1/customer/rotate-key \
  -H 'X-API-Key: YOUR_API_KEY_HERE'

Responses

API key rotated successfully

Bodyapplication/json
messagestring
Example:"API key rotated successfully. Update your applications with the new key immediately."
api_keystring

New API key (v2 format with prefix)

Example:"ml_live_8jKp3nXw7rQ9sL2mY4hT6vB1nC5xZ0aE8wD7gF3jH9kM2pN4q"
key_prefixstring

First 8 characters of the key for identification

Example:"ml_live_"
customerobject
Response
{ "message": "API key rotated successfully. Update your applications with the new key immediately.", "api_key": "ml_live_8jKp3nXw7rQ9sL2mY4hT6vB1nC5xZ0aE8wD7gF3jH9kM2pN4q", "key_prefix": "ml_live_", "customer": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "email": "user@example.com" } }