Skip to content

Import complaint list

Request

Import a CSV file containing a list of addresses to add to the complaint list. The CSV file must be 25MB or under and can contain the following column headers: address, created_at. address is a valid email address (required). created_at is timestamp of complaint event in RFC2822 format (optional, default: current time)

Security
basicAuth
Path
domain_namestringrequired

Domain to update complaints for

Headers
Content-Typestringrequired

Content-Type must be multipart/form-data

Bodymultipart/form-datarequired
filestringrequired

CSV file

curl -i -X POST \
  -u '<username>:<password>' \
  'https://api.mailgun.net/v3/{domain_name}/complaints/import' \
  -H 'Content-Type: multipart/form-data' \
  -F file=string

Responses

A 202 response

Bodyapplication/json
messagestringrequired

Response message

Response
{ "message": "ffile uploaded successfully for processing. standby..." }