All API requests require authentication using an API key. Include your API key in the x-api-key header of every request.
Getting Your API Key
- Log in to your DelightLoop account at https://web.delightloop.ai
- Navigate to Settings → API Keys
- Generate a new API key or use an existing one
- Copy the key securely
Keep your API keys secure and never commit them to version control. Treat them like passwords.
Using Your API Key
Include your key in the x-api-key header:
Example Request
curl -X GET "{{api.baseUrl}}/api/campaigns" \
-H "x-api-key: your-api-key"
All API requests require the following headers:
x-api-key: Your API key (required)
API Key
The x-api-key header identifies which organization context the request should be executed in. You can find your API key in your account settings.
API Key Expiration
API keys do not expire unless manually revoked. If you suspect your key has been compromised, revoke it immediately and generate a new one.
Error Responses
If authentication fails, you’ll receive a 401 Unauthorized response:
{
"success": false,
"statusCode": 401,
"message": "Unauthorized",
"error": "Invalid or missing API key"
}