Version 4 of the API allows the POST
and GET
HTTP verbs to be used interchangeably. Endpoints listed in this document have recommended HTTP verbs listed however these are not strictly enforced. The API does not support other HTTP verb methods (e.g. OPTION
, HEAD
, PUT
, DELETE
, etc..) at this time.
In addition to the HTTP verbs, the API also accepts both application/x-www-form-urlencoded
and application/json
content-types. Below you will see several examples of correct and incorrect usage.
# GET request with querystring in URI
curl -X GET 'https://api.neverbounce.com/v4/account/info?key=secret_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
# GET request with application/json encoded body
curl -X GET -H "Content-Type: application/json"\
https://api.neverbounce.com/v4/account/info \
-d '{"key":"secret_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}'
# POST request with querystring in URI
curl -X POST 'https://api.neverbounce.com/v4/account/info?key=secret_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
# POST request with application/x-www-form-urlencoded encoded body
curl -X POST https://api.neverbounce.com/v4/account/info \
-d key=secret_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# POST request with application/json encoded body
curl -X POST -H "Content-Type: application/json"\
https://api.neverbounce.com/v4/account/info \
-d '{"key":"secret_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}'
# POST request with mismatched Content-Type and data encoding
curl -X POST -H "Content-Type: application/json"\
https://api.neverbounce.com/v4/account/info \
-d key=secret_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# POST request with application/json encoded body with no Content-Type specified
# (request libraries typically set x-www-form-urlencoded as default)
curl -X POST https://api.neverbounce.com/v4/account/info \
-d '{"key":"secret_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}'
# PUT requests are not supported
curl -X PUT -H "Content-Type: application/json"\
https://api.neverbounce.com/v4/account/info \
-d key=secret_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Boolean Values
When working with our API you will encounter several parameters that accept boolean values. The acceptable representation of these values depends on requests encoding. With application/json
we accept both boolean (true
/false
) and integer (1
/0
) representations. application/x-www-form-urlencoded
on the other hand only accepts integer (1
/0
) representations.