Skip to main content
POST
/
mailings
/
create
Create a mailing
curl --request POST \
  --url https://postal.platform.arb.inc/mailings/create \
  --header 'Content-Type: multipart/form-data' \
  --form 'parameters={
  "mailType": "pressureSealed",
  "idempotencyKey": "6b2cf4b8-40e9-4f2a-9f15-2d1e8b0d9b4e",
  "recipient": {
    "name": "Jane Doe",
    "address": "123 Main St Apt 4B",
    "city": "Springfield",
    "state": "IL",
    "zipcode": "62704"
  }
}
' \
  --form pdf='@example-file'
{
  "id": "c17c3433-81b3-4096-90e0-9fbb32c06204"
}

Body

multipart/form-data
parameters
string
required

JSON string with mailing details. This field must be the first part in the multipart body.

Example:

"{\n \"mailType\": \"pressureSealed\",\n \"idempotencyKey\": \"6b2cf4b8-40e9-4f2a-9f15-2d1e8b0d9b4e\",\n \"recipient\": {\n \"name\": \"Jane Doe\",\n \"address\": \"123 Main St Apt 4B\",\n \"city\": \"Springfield\",\n \"state\": \"IL\",\n \"zipcode\": \"62704\"\n }\n}\n"

pdf
file
required

PDF file to mail. Must be content-type application/pdf.

Example:

"document.pdf"

Response

Mailing queued successfully.

id
string

ID of the created mailing.

Example:

"c17c3433-81b3-4096-90e0-9fbb32c06204"