Skip to main content

Events

routa.events.list() lists the log of normalized events. It is the reconciliation path after your server was unavailable. See Reconcile events.
Each item is a RoutaEvent, the same type webhooks.constructEvent() returns: id, type, apiVersion, schemaVersion, projectId, externalRef, sequence, occurredAt, recordedAt and data. externalRef is the external_ref of the project, or null when the project has none. Only projects created by a partner have this value. The SDK knows 17 event types. See the list in Webhooks.

Templates

routa.templates creates templates, which then go for approval, uploads the file of a media header and retrieves the result. See Templates for components and errors, and Templates for the lifecycle.
Every variable needs an example, and variableExamples exists from version 0.5.0. Use made-up values: no real personal data or tokens. See Variables and examples.
The SDK does not edit or delete templates. Those operations exist only in the dashboard. A template with deletionRequested: true is being deleted and cannot be sent.

Media

routa.media uploads a file to Routa and retrieves the media object. See Media for uploading and Media for the concept.
retrieve() returns a fresh signed URL, valid for 15 minutes, when the status is ready.

Usage

routa.usage.retrieve() returns the metered usage of the project over a period of up to 92 days. See Usage.
from is inclusive and to is exclusive, as YYYY-MM-DD UTC dates.

Key identity

routa.whoami() resolves the API key in use, with no side effects:
scopes is a list of ApiKeyScope: messages:read, messages:write, channels:read, channels:write, events:read, webhooks:write, usage:read, templates:read, templates:write, media:read and media:write.