Skip to main content
ZeroBounce Docs logo
Log InSign Up Free
  • Home
  • Getting started
  • Products
  • API
  • Integrations
  • FAQ
  • About ZeroBounce
Browse documentation
ZeroBounce Docs logo
  • Getting started
  • Products
  • API
  • Integrations
  • FAQ
  • About ZeroBounce

Type at least 2 characters to search the docs.

↑↓ Navigate↵ OpenEsc Close

Docs Assistant

Answers written from the ZeroBounce documentation

Hi! I'm your ZeroBounce Docs Assistant. How can I help you with our APIs or integrations today?

Try Asking

Loading suggestions...

AI-generated from our docs. Check important details against the linked pages.

API

  • Email Validation API
  • Inbox Placement Tester API
  • Warmup API
    • Overview
    • Authentication
    • Response and error model
    • Endpoint reference
    • Adding a sending account
    • Updating a sending account
    • Engagement rules
    • Statistics and utilities
    • Rate limits
    • Data isolation
    • Quickstart
  • Activity Data API
  • List Evaluator API
  • Email Finder API
  • Domain Search API
  • A.I. Scoring API
  • Api Dashboard
  • API Wrappers
  • API Migration
  1. Home
  2. Warmup API
  3. Response and error model

Response and error model

The API uses two different error shapes, and which one you get depends on the kind of problem. Knowing the split makes error handling much simpler.

  • Status
    Body shape
    When you get it
  • 200
    JSON object or array
    Success with a payload.
  • 204
    Empty
    Success with no body. Used by some PUT and DELETE calls.
  • 400
    {"error": "..."}
    The body parsed fine but a value is not acceptable. This covers most field errors.
  • 401
    {"error": "..."}
    Missing, malformed or inactive API key.
  • 404
    {"detail": "Not Found"}
    The path does not exist. Usually an underscore where a hyphen belongs.
  • 404
    Descriptive message
    The path is right but the resource is not there.
  • 405
    Standard
    The path exists but the HTTP verb is wrong.
  • 409
    {"error": "..."}
    Duplicate resource. A sending account or custom rule already exists.
  • 422
    {"detail": [ ... ]}
    The request body is malformed, incomplete, or a value has the wrong JSON type.
  • 429
    {"error": "..."}
    A cooldown or rate limit applies. See sections 7.2 and 9.
  • 502
    {"error": "..."}
    An upstream ZeroBounce service is unavailable.

1. 400 versus 422

This is the distinction worth building into your client:

  • 422 means the request could not be read as expected JSON. A missing required key, a string where an integer belongs, an empty body, or invalid JSON. The body carries a detail array.
  • 400 means the request was readable but a value was rejected. A malformed email address, an identifier outside its allowed range, a timezone_offset beyond its bounds, a bad date format, or a start date later than an end date. The body carries a single error string.

So {"engagement_rule_id": "two"} returns 422, while {"engagement_rule_id": 9} returns 400. Do not expect a detail array on a 400, or an error string on a 422.

2. Parameter naming

Two names are used for the same thing across endpoints. Both refer to a from-address you have registered:

  • Name
    Used by
  • from_address
    /sending-account, /statistics, /statistics-per-day, /from-address-statistics, /check-domain-dmarc, /sending-accounts (body and delete query)
  • c_from
    /engagement-rule, /custom-engagement, /statistics-detailed, /statistics/download

Where the address appears in a URL path rather than a query string, URL-encode the @.

Was this page helpful?

PreviousAuthenticationNextEndpoint reference
Interested in our partner programs?
Partner program

Interested in our partner programs?