Skip to content
  • sdk
  • cli
  • api

Upgrading to samva 0.11: five changes to check

The 0.11 SDK and 0.8 CLI page lists by cursor, return smaller read models, and rename parameters. The same changes are live on the REST API.

These changes are live on the REST API too, so apps that call the API directly are affected, not only apps that use the SDK. Check these five things.

What you need to do

  1. Paging. Lists take limit and cursor and return { items, nextCursor }. Pass nextCursor back until it is null. page, offset, total and pagination are gone. The CLI's --cursor replaces --page, and --json prints { items, nextCursor }.
  2. Read models. Lists return summaries and get returns the full item. Read deliveries and bodies with messages.listDeliveries and messages.getContent. On contacts, humanProfile is now profile and addresses live on identities. Template bodies come from templates.get. Conversations return contacts instead of participants, and metrics is gone.
  3. Updates. contacts.update and conversations.update change only what you send. Use the add* and remove* methods for identities, tags, categories and channels. metadata merges by key, and null deletes a key.
  4. Names. Methods take the resource identifier as id, for example webhookId is now id. Date filters are after and before, and the CLI's --after and --before replace --start-date, --end-date and --period. campaigns.archive replaces delete, apiKeys.revoke replaces apiKeys.remove, and messages.getEmail takes includeDownloadUrls and returns downloadUrls.
  5. Validation errors. An invalid request fails with 422 ValidationError and lists each bad field. Handle it where you handled other client errors.

The full list is in the package changelog.