Success response
A successful request returns HTTP200 or 201 with a JSON body:
Error response shape
Most errors return:error is a stable, machine-readable code you can safely match on. message is
a human-readable description and may change wording over time — don’t parse it.
A few less common failure paths (like exceeding your plan’s notification
limit, or a resolved device token/key not being found) throw a generic Nest
exception instead of a coded one. For those,
error falls back to the
generic HTTP reason phrase (e.g. "Bad Request", "Not Found") rather than
a specific code — check the HTTP status and message text in that case.Common error codes
Validation errors
Missing or malformed required fields (e.g. an emptytitle) return 400 with
a message array describing each failing field, in the standard NestJS
validation-pipe shape: