Skip to content

Add bounces

Request

Request body is expected to be a valid JSON encoded sting containing up to 1000 bounce records or a single bounce record as application/form-data

Security
basicAuth
Path
domain_namestringrequired

Domain to add the bounce to

Headers
Content-Typestringrequired

Content-Type must be application/json if inserting using JSON, no header necessary for form-data insertion

Bodyrequired
Array [
addressstringrequired

Email address for the original recipient

codestringrequired

SMTP error code

errorstringrequired

SMTP error message

created_atobject(github.com-mailgun-mime-RFC822Time)required

Timestamp for when the Bounce event was received in RFC822 format

]
curl -i -X POST \
  -u '<username>:<password>' \
  'https://api.mailgun.net/v3/{domain_name}/bounces' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "address": "alice@example.com",
      "code": "550",
      "error": "Bounced",
      "createdat": "Thu, 11 Dec 2025 01:49:40 UTC",
      "messagehash": ""
    },
    {
      "address": "bob@example.com",
      "code": "550",
      "error": "Bounced",
      "createdat": "Mon, 01 Jan 0001 00:00:00 UTC",
      "messagehash": ""
    },
    {
      "address": "carol@example.com",
      "code": "550",
      "error": "",
      "createdat": "Mon, 01 Jan 0001 00:00:00 UTC",
      "messagehash": ""
    },
    {
      "address": "dan@example.com",
      "code": "",
      "error": "",
      "createdat": "Mon, 01 Jan 0001 00:00:00 UTC",
      "messagehash": ""
    }
  ]'

Responses

A 200 response

Bodyapplication/json
messagestringrequired

Response message

Response
{ "message": "4 addresses have been added to the bounces table" }