/api/public/pageRecord a page view
Accepts siteId, visitorId, url, referrer, and title. Stores a durable page.viewed TrackingEvent and can trigger automations.
Everything you need to send events, embed forms, manage API keys, and wire up integrations — across Envoi's public ingestion APIs, scoped server APIs, and webhooks.
CORS-enabled endpoints for tracking snippets and hosted forms.
/api/public/pageAccepts siteId, visitorId, url, referrer, and title. Stores a durable page.viewed TrackingEvent and can trigger automations.
/api/public/trackAccepts siteId, visitorId, event, properties, url, and referrer. Email properties can resolve or create a contact.
/api/public/identifyAccepts siteId, visitorId, email, and properties. Stitches prior anonymous events to the resolved contact.
/api/public/forms/{formId}/embed.jsServes the hosted form script. The script shares the _envoi_vid visitor id with onsite tracking before submit/view calls.
/api/public/forms/{formId}/submitValidates required fields, creates or updates the contact, records the submission, and writes form.submitted tracking activity.
Dashboard/session APIs that read collected TrackingEvent data back into product workflows.
/api/eventsRequires Authorization: Bearer <API key> or x-api-key with the events:write scope. Records a server TrackingEvent, links contactId or email, triggers flows, applies the key rate limit, and writes an API request log.
curl -X POST https://app.envoi.example/api/events -H "Authorization: Bearer env_..." -H "Content-Type: application/json" -d '{"event":"purchase.completed","email":"buyer@example.com","properties":{"orderId":"ord_1"}}'fetch('/api/public/track', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
siteId: 'site_...',
visitorId: 'visitor_...',
event: 'product.viewed',
url: 'https://shop.example/products/hat',
properties: { productId: 'hat_1' }
})
})fetch('/api/public/identify', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
siteId: 'site_...',
visitorId: 'visitor_...',
email: 'buyer@example.com',
properties: { firstName: 'Buyer' }
})
})fetch('/api/public/forms/form_123/submit', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
fields: { email: 'buyer@example.com' },
metadata: { visitorId: 'visitor_...', source: 'landing-page' }
})
})curl -X POST https://app.envoi.example/api/webhooks/int_123 -H "x-envoi-signature: sha256=..." -H "Content-Type: application/json" -d '{"event":"order.created","email":"buyer@example.com"}'Provider webhooks should fail closed when signing secrets are missing. Custom integration webhooks should use each integration's webhook URL and rotated secret, then verify received events in the integration detail event log.