All changes
ImprovedAPI

Every API error now has a stable code

Every PushFire API error now carries a stable code, such as subscriber_not_found, and a mistake in your request returns a 4xx, never a 5xx.

Your code can now handle each API error by its code, not by its message text. Every error from the PushFire API returns the same body:

  • Branch on code. A code keeps its meaning. We add new codes, but we never rename or remove one.
  • message is for people. Its text can change.
  • Validation errors name the field. A validation_failed error has a path, for example data.notification.title, with one entry for each invalid field.
  • Your mistakes return 4xx. A bad request, an unknown id or a missing scope returns a 4xx status. A 5xx now means a fault on our side, and it is safe to retry later.

Some codes you will see: validation_failed, invalid_json, scope_denied, subscriber_not_found, device_not_found, tag_not_found, workflow_not_found, workflow_inactive and device_token_exists.

The top-level error string stays, so clients that read only that field keep working. The batch send endpoints also add a code to each per-subscriber error, for example no_push_device or no_email_address.

See the API Reference.