Skip to main content

@hatang/sdk 0.4.0: production by default, templates, global contacts, automations

@hatang/sdk 0.4.0 calls https://api.hatang.dev by default. Before, a client created without baseUrl or HATANG_BASE_URL called http://localhost:3001; local development now passes baseUrl (or sets HATANG_BASE_URL) instead.

New calls:

  • Templates: templates.create/get/list/update/remove/publish/duplicate, and emails.send({ to, template: { id, variables } }).
  • Global contacts: contacts.* without audience_id, by id or email, with properties, segments and topics; new segments, topics and contactProperties namespaces. audience_id still uses the older audience routes.
  • Automations: events.*, automations.* and automations.runs.*.
  • Insights: emails.metrics(), logs.list/get and usage.get.

The blog namespace is removed. See the Node.js guide.