Create Custom Envelope
POST/print-mail/v1/custom_envelopes
Creates a new custom envelope. The artwork is reviewed after it is
uploaded: the custom envelope is returned with a status of pending
and moves to approved or rejected once the review finishes. Create a custom envelope via a multipart/form-data request. Accepts the
same fields as the JSON create body; use this content type to upload the
PDF file directly.
Create Custom Envelope
curl https://api.postgrid.com/print-mail/v1/custom_envelopes \
-H 'Content-Type: application/json' \
-H "X-API-Key: $POSTGRID_PRINT_MAIL_API_KEY" \
-F envelopeType=standard_single_window \
-F pdf=https://postgrid-public.s3.amazonaws.com/custom-envelope-artwork.pdf{
"id": "custom_envelope_sqF12lZ1VlBb",
"available": 0,
"createdAt": "2019-12-27T18:11:19.117Z",
"live": true,
"object": "custom_envelope",
"status": "pending",
"updatedAt": "2019-12-27T18:11:19.117Z",
"description": "description",
"envelopeType": "standard_double_window",
"lowInventoryThreshold": {
"type": "fixed",
"value": 1
},
"metadata": {
"foo": "bar"
},
"rejectionReason": "content_overlapping_restricted_region",
"url": "https://example.com"
}Returns Examples
{
"id": "custom_envelope_sqF12lZ1VlBb",
"available": 0,
"createdAt": "2019-12-27T18:11:19.117Z",
"live": true,
"object": "custom_envelope",
"status": "pending",
"updatedAt": "2019-12-27T18:11:19.117Z",
"description": "description",
"envelopeType": "standard_double_window",
"lowInventoryThreshold": {
"type": "fixed",
"value": 1
},
"metadata": {
"foo": "bar"
},
"rejectionReason": "content_overlapping_restricted_region",
"url": "https://example.com"
}