Skip to content

Add complaints

Request

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

Security
basicAuth
Path
domain_namestringrequired

Domain to add the complaint 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

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

Timestamp for when the Complaint event was received in RFC822 format

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

Responses

A 200 response

Bodyapplication/json
messagestringrequired

Response message

Response
{ "message": "2 complaint addresses have been added to the complaints table" }