Skip to main content

Purpose

This page documents wrapper and utility patterns used by Evento services so integrators can mirror behavior.
These snippets are representative references, not a published SDK contract.

Public API auth wrapper pattern

Accepted key sources:
  1. x-evento-api-key header (preferred)
  2. Authorization: Bearer {key} (alternative)

Embed API CORS wrapper pattern

Response utility pattern

Operational tips

Keep contracts stable

Preserve success, message, and data envelope consistency across all handlers.

Log with context

Include actor, endpoint, and request identifiers in server logs for audit and debugging.

Do not expose API keys

Keep keyed requests on trusted backend infrastructure.

Prefer explicit validation

Validate path/query/body before data fetches to avoid noisy 500s.

Next steps

Examples

Practical snippets using these patterns in integrations.

Authentication

Header patterns, CORS rules, and auth failure handling.