profile, track, group, and page. Every message belongs to the workspace named by its write key and to the customer named by userId.
Identity
userId is the durable customer identity key. Send the stable identifier from your own database, not an email address or a value that can change.
A profile must also include traits.email. Glyph uses the address to display and contact the customer; userId remains the identity key.
Glyph does not accept anonymous identities or provide aliasing. Start sending messages once you know the customer.
JavaScript and TypeScript
The browser and Node.js clients share these methods:MessageOptions currently contains timestamp?: Date | number | string. The promise resolves after queueing and after any flush triggered by flushAt. Call flush() when the process must wait for an immediate delivery attempt.
Python
The synchronous Python client provides:page. Use the browser SDK or the HTTP API when you need page messages.
Methods return None. Enqueueing can block for delivery when the queue reaches flush_at or the flush interval has elapsed. Call flush() or close() before a short-lived process exits.
Message fields
userId, event, groupId, and a supplied page name must be non-empty strings of at most 256 characters. Profile email must also be a non-empty string of at most 256 characters.
JSON values
Traits and properties must be JSON-serializable objects. Valid values are strings, finite numbers, booleans,null, arrays, and nested objects containing those values.
Do not send functions, undefined, BigInt, class instances, byte buffers, or circular references. Keep event properties small and focused on the moment; put durable customer attributes in profile traits.
Validation and delivery failures
Invalid identifiers and profile traits fail before the message is queued. JavaScript throws aTypeError; Python raises TypeError.
HTTP and network failures follow the retry and callback behavior in Configuration & delivery. An explicit flush() waits for the delivery attempt, but HTTP failures are reported through onError or on_error instead of being raised as application errors.