Campaigns

Create a new campaign.

A campaign links a mailing list with a specific mail piece configuration (letter, postcard, cheque, self-mailer, or snap pack) to send bulk mail. Only one collateral type can be set per campaign.

Upon creation, the campaign enters the drafting status while assets are validated.

post/print-mail/v1/campaigns

Request

  • Base URL
    https://api.postgrid.com
  • URL
    https://api.postgrid.com/print-mail/v1/campaigns
  • Auth
    API key in header X-API-Key

Headers

idempotency-keystring

Request body

descriptionstring

An optional string describing this resource. Will be visible in the API and the dashboard.

metadataobject

See the section on Metadata.

defaultSenderContactstring

The ID of the default sender contact to use for orders if not specified per recipient.

mailingListstring required

The ID of the mailing list associated with this campaign.

sendDatestring date-time

The scheduled date and time for the campaign to be sent.

Response

The newly created campaign in drafting status.

idstring required

A unique ID prefixed with campaign_

descriptionstring

An optional string describing this resource. Will be visible in the API and the dashboard.

metadataobject

See the section on Metadata.

liveboolean required

true if this is a live mode resource else false.

createdAtstring date-time required

The UTC time at which this resource was created.

updatedAtstring date-time required

The UTC time at which this resource was last updated.

status'drafting' | 'changes_required' | 'creating_orders' | 'draft' | 'ready' | 'printing' | 'processed_for_delivery' required

Status of the campaign lifecycle.

defaultSenderContactstring

The ID of the default sender contact to use for orders if not specified per recipient.

mailingListstring required

The ID of the mailing list associated with this campaign.

createdCountinteger required

The number of orders successfully created for this campaign.

orderPreviewURLstring uri

A temporary URL to preview the first rendered order, available once the campaign status is 'draft' or later.

sendDatestring date-time

The scheduled date and time for the campaign to be sent.

reportURLstring uri

A temporary URL to download the processing report, available once the campaign is in the ready status.

Changes

    • breaking

      removed subschema #1 subschema #2 from the ///// request property anyOf list

    • breaking

      removed subschema #1 subschema #2 from the ////////// request property anyOf list

    • breaking

      removed subschema #1 subschema #2 from the ///// request property anyOf list

    • breaking

      removed subschema #1 subschema #2 from the ///// request property anyOf list

    • breaking

      removed subschema #1 subschema #2 from the ///// request property anyOf list

    • breaking

      removed subschema #1 subschema #2 from the ///// request property anyOf list

    • breaking

      added subschema #1 to the ////////// response property oneOf list for the response status

    • info

      added the media type multipart/form-data to the request body

    • info

      added subschema #1 to the ///// request property oneOf list

    • info

      added subschema #1 to the ////////// request property oneOf list

    • info

      added subschema #1 to the ///// request property oneOf list

    • info

      added subschema #1 to the ///// request property oneOf list

    • info

      added subschema #1 to the ///// request property oneOf list

    • info

      added subschema #1 to the ///// request property oneOf list

    • info

      removed subschema #1 subschema #2 from the ////////// response property anyOf list for the response status

    • breaking

      added to the ///// request property allOf list

    • warning

      removed from the ///// request property allOf list

    • info

      added the new optional request property /////

    • info

      added the optional property ///// to the response with the status

    • info

      added to the ///// response property allOf list for the response status

    • info

      removed from the ///// response property allOf list for the response status