Prefer an SDK when one is available. The SDKs add client-side validation, batching, retry with backoff, and automatic
messageId generation. The formal wire contract is included in JSON Schema.Authentication
Send the write key as a bearer token or withX-Glyph-Write-Key:
400. A missing, invalid, revoked, or rotated key returns 401.
The endpoint allows cross-origin requests from any origin (Access-Control-Allow-Origin: *), so browsers can post to it directly.
Request body
The payload is either a single message object, or a batch:Fields shared by every message
Unknown fields return
422; each message type accepts only its documented keys.
profile
Upserts traits onto a customer. userId is the durable identity key. traits.email is required so Glyph can recognize the customer and provide an outreach path. Traits merge shallowly with what’s already stored: keys you send overwrite, keys you omit are preserved.
track
Records something a customer did. event is required (1–256 characters); properties is any JSON object and defaults to {}. Tracking an unknown userId creates the customer record automatically, with no traits until a profile arrives.
group
Records account or team context as an event on the customer’s timeline. groupId is required (1–256 characters); traits defaults to {}. Glyph does not currently create a separate account record or provide group-level analytics.
page
Records a page view. name is optional but must be non-empty when present. Omit the field rather than sending an empty string.
Example request
Responses
The server sends a response after the database transaction commits. Retry non-2xx responses and timeouts according to Idempotency.
A
202 does not mean every input produced new visible data. Repeated messageId values are deduplicated. Messages for new customers beyond the plan’s profile limit are skipped while messages for existing customers continue to work. See Troubleshooting.Request provenance
Glyph records the authenticated write key, its name, and its configured purpose with each accepted request. Create a separate key with the Direct HTTP purpose for this integration rather than reusing a browser or server key. Official Glyph SDKs also report their package name and version. Direct HTTP integrations should not imitate this metadata. A request without SDK metadata is stored with an unknown client; the write key remains the authoritative source.Rate limits
Each write key has a default budget of 600 messages per 60-second sliding window; some plans have a higher limit. The budget counts messages rather than requests, so a batch of 100 consumes 100. Exceeding the budget returns429 with a Retry-After header, which the SDKs honor automatically.
Pace sustained imports below the budget. The backfill guide includes an example.
Idempotency
If you implement your own delivery, mirror the SDKs’ behavior:- Retry
408,429,500,502,503, and504(and network failures) with exponential backoff, honoringRetry-Afterwhen present. - Treat other errors as permanent:
401means a bad key,422an invalid payload. - Send a
messageIdand reuse it when retrying, so deliveries stay idempotent.
messageId deduplication is also what makes re-runnable imports possible: derive stable IDs from your source data (for example import-invoice-1042) and running the same import twice stores each message once. The SDKs generate a fresh UUID per call, so this technique is only available over HTTP.
JSON Schema
You usually won’t need the schema when using an SDK. Use it to validate direct HTTP integrations, generate types, or build tooling around the ingest endpoint.View the ingest v1 JSON Schema
View the ingest v1 JSON Schema