## Get Campaign **get** `/print-mail/v1/campaigns/{id}` Retrieve a specific campaign by its ID. ### Path Parameters - `id: string` ### Returns - `Campaign = object { id, createdAt, createdCount, 15 more }` Represents a bulk mail campaign. - `id: string` A unique ID prefixed with campaign_ - `createdAt: string` The UTC time at which this resource was created. - `createdCount: number` The number of orders successfully created for this campaign. - `live: boolean` `true` if this is a live mode resource else `false`. - `mailingList: string` The ID of the mailing list associated with this campaign. - `status: "drafting" or "changes_required" or "creating_orders" or 4 more` Status of the campaign lifecycle. - `"drafting"` - `"changes_required"` - `"creating_orders"` - `"draft"` - `"ready"` - `"printing"` - `"processed_for_delivery"` - `updatedAt: string` The UTC time at which this resource was last updated. - `chequeProfile: optional string` The ID of the cheque profile used for this campaign, if applicable. - `defaultSenderContact: optional string` The ID of the default sender contact to use for orders if not specified per recipient. - `description: optional string` An optional string describing this resource. Will be visible in the API and the dashboard. - `errors: optional array of object { message, type }` A list of processing errors encountered, if any. Present when status is 'changes_required'. - `message: string` A human-readable message describing the error. - `type: "processing_error" or "internal_error"` Type of error encountered during campaign processing. - `"processing_error"` - `"internal_error"` - `letterProfile: optional string` The ID of the letter profile used for this campaign, if applicable. - `metadata: optional map[unknown]` See the section on Metadata. - `orderPreviewURL: optional string` A temporary URL to preview the first rendered order, available once the campaign status is 'draft' or later. - `postcardProfile: optional string` The ID of the postcard profile used for this campaign, if applicable. - `reportURL: optional string` A temporary URL to download the processing report, available once the campaign is in the `ready` status. - `selfMailerProfile: optional string` The ID of the self-mailer profile used for this campaign, if applicable. - `sendDate: optional string` The scheduled date and time for the campaign to be sent. ### Example ```http curl https://api.postgrid.com/print-mail/v1/campaigns/$ID \ -H "X-API-Key: $POSTGRID_PRINT_MAIL_API_KEY" ``` #### Response ```json { "id": "campaign_sqF12lZ1VlBb", "createdAt": "2019-12-27T18:11:19.117Z", "createdCount": 0, "live": true, "mailingList": "mailingList", "status": "drafting", "updatedAt": "2019-12-27T18:11:19.117Z", "chequeProfile": "chequeProfile", "defaultSenderContact": "defaultSenderContact", "description": "description", "errors": [ { "message": "message", "type": "processing_error" } ], "letterProfile": "letterProfile", "metadata": { "foo": "bar" }, "orderPreviewURL": "https://example.com", "postcardProfile": "postcardProfile", "reportURL": "https://example.com", "selfMailerProfile": "selfMailerProfile", "sendDate": "2019-12-27T18:11:19.117Z" } ```