Partner API
REST • JSON • API key authentication
Read your microsite's leads and policies from your own systems. Most partners don't need the API: the website widget and webhooks cover the usual setups without code on your server.
Base URL
https://dailyeventinsurance.com/api/external/v1All requests use HTTPS and return JSON. A successful response has "success": true and a data field.
Get an API key
- Sign in to the partner portal and open Settings, then API Keys.
- Pick the microsite the key is for, then create the key. Microsite keys can read that microsite's leads and policies.
- Copy the key right away. It's shown only once.
- Store it on your server, for example in a DEI_API_KEY environment variable. Never put it in website or app code that runs in a browser.
Open API Keys in the portal: /partner/settings/api-keys
Send the key on every request in the Authorization header: Authorization: Bearer YOUR_API_KEY
Endpoints
/api/external/v1/microsites/{micrositeId}/leadsWorks with portal keysLeads captured on one of your microsites, newest first (up to 100 per page).
Permission: microsite:leads:read
/api/external/v1/microsites/{micrositeId}/policiesWorks with portal keysPolicies bought through one of your microsites, newest first (up to 100 per page).
Permission: microsite:policies:read
/api/external/v1/webhooksNeeds extra permissionWebhook subscriptions created with your API key.
Permission: webhooks:manage
/api/external/v1/webhooksNeeds extra permissionSubscribe a URL to events. The signing secret is returned only in this response. Events: partner.signup, partner.activated, policy.sold, commission.earned, payout.ready, payout.completed, lead.created.
Permission: webhooks:manage
webhooks:manage today. To get event notifications without it, add a webhook in the portal instead; see Webhooks.Code examples
List your microsite's leads
- This call needs the "microsite:leads:read" permission. Keys you create in the portal have it when you pick a microsite while creating the key.
- Replace YOUR_MICROSITE_ID with your microsite's ID (shown in the portal on your microsite page).
# List your microsite's leads: GET /api/external/v1/microsites/{micrositeId}/leads
# Needs an API key with the "microsite:leads:read" permission.
# Set your key first: export DEI_API_KEY="your-key"
curl -X GET 'https://dailyeventinsurance.com/api/external/v1/microsites/YOUR_MICROSITE_ID/leads?page=1&limit=20' \
-H "Authorization: Bearer $DEI_API_KEY"Response
{
"success": true,
"data": [
{
"id": "lead-uuid",
"contactName": "Jane Smith",
"email": "jane@example.com",
"phone": "+1-555-0100",
"source": "microsite",
"status": "new",
"interestLevel": "warm",
"createdAt": "2026-11-01T17:00:00.000Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 1,
"hasNext": false
}
}List your microsite's policies
- This call needs the "microsite:policies:read" permission. Keys you create in the portal have it when you pick a microsite while creating the key.
- Replace YOUR_MICROSITE_ID with your microsite's ID (shown in the portal on your microsite page).
# List your microsite's policies: GET /api/external/v1/microsites/{micrositeId}/policies
# Needs an API key with the "microsite:policies:read" permission.
# Set your key first: export DEI_API_KEY="your-key"
curl -X GET 'https://dailyeventinsurance.com/api/external/v1/microsites/YOUR_MICROSITE_ID/policies?page=1&limit=20' \
-H "Authorization: Bearer $DEI_API_KEY"Response
{
"success": true,
"data": [
{
"id": "policy-uuid",
"policyNumber": "POL-0001",
"eventType": "fitness_class",
"eventDate": "2026-11-20T00:00:00.000Z",
"premium": "12.00",
"status": "active",
"customerEmail": "jane@example.com",
"createdAt": "2026-11-01T17:05:00.000Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 1,
"hasNext": false
}
}List your API webhooks
- This call needs the "webhooks:manage" permission, which keys created in the portal don't include today, so it will return 403 with a portal key. To get webhooks without code, add one in the portal at https://dailyeventinsurance.com/partner/settings/integrations/webhooks, or ask support to enable this permission.
# List your API webhooks: GET /api/external/v1/webhooks
# Needs an API key with the "webhooks:manage" permission.
# Set your key first: export DEI_API_KEY="your-key"
curl -X GET 'https://dailyeventinsurance.com/api/external/v1/webhooks' \
-H "Authorization: Bearer $DEI_API_KEY"Response
{
"success": true,
"data": [
{
"id": "webhook-uuid",
"url": "https://your-site.example/dei-webhook",
"events": [
"policy.sold",
"lead.created"
],
"isActive": true,
"lastDeliveredAt": null,
"lastDeliveryStatus": null,
"consecutiveFailures": 0,
"createdAt": "2026-11-01T17:00:00.000Z"
}
]
}Create an API webhook
- This call needs the "webhooks:manage" permission, which keys created in the portal don't include today, so it will return 403 with a portal key. To get webhooks without code, add one in the portal at https://dailyeventinsurance.com/partner/settings/integrations/webhooks, or ask support to enable this permission.
# Create an API webhook: POST /api/external/v1/webhooks
# Needs an API key with the "webhooks:manage" permission.
# Set your key first: export DEI_API_KEY="your-key"
curl -X POST 'https://dailyeventinsurance.com/api/external/v1/webhooks' \
-H "Authorization: Bearer $DEI_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"url":"https://your-site.example/dei-webhook","events":["policy.sold","lead.created"]}'Response
{
"success": true,
"data": {
"id": "webhook-uuid",
"url": "https://your-site.example/dei-webhook",
"events": [
"policy.sold",
"lead.created"
],
"isActive": true,
"lastDeliveredAt": null,
"lastDeliveryStatus": null,
"consecutiveFailures": 0,
"createdAt": "2026-11-01T17:00:00.000Z",
"secret": "returned-once"
}
}Errors
// Every error response has this shape
{
"success": false,
"error": "FORBIDDEN",
"message": "Missing required permission(s): webhooks:manage"
}
// Error codes
// UNAUTHORIZED 401 Missing or badly formatted Authorization header
// INVALID_API_KEY 401 Key not found or revoked
// API_KEY_EXPIRED 401 Key has expired
// FORBIDDEN 403 Key lacks the permission, or is scoped to another microsite
// NOT_FOUND 404 Microsite or webhook not found
// VALIDATION_ERROR 400 Bad query or body
// RATE_LIMIT_EXCEEDED 429 Too many requests; wait for Retry-After seconds
// SERVICE_UNAVAILABLE 503 Temporarily unavailable; try again shortly
// INTERNAL_ERROR 500 Something went wrong on our sideRate limits
Limits apply per key. Unless we've set a different limit for your key, it's 100 requests per minute.
Every response includes X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. When you go over, you get a 429 with a Retry-After header in seconds.
Need a permission or help with a call?
Email us at support@dailyeventinsurance.com. Hours: Monday-Friday, 9am-5pm PT.