List Campaigns
GET/print-mail/v1/campaigns
Retrieve a list of campaigns.
Returns a paginated list of campaigns associated with the authenticated organization, filterable by various parameters.
Query Parameters
search: optional string
You can supply any string to help narrow down the list of resources. For example, if you pass "New York" (quoted), it will return resources that have that string present somewhere in their response. Alternatively, you can supply a structured search query. See the documentation on StructuredSearchQuery for more details.
List Campaigns
curl https://api.postgrid.com/print-mail/v1/campaigns \
-H "X-API-Key: $POSTGRID_PRINT_MAIL_API_KEY"{
"data": [
{
"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"
}
],
"limit": 0,
"object": "list",
"skip": 0,
"totalCount": 0
}Returns Examples
{
"data": [
{
"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"
}
],
"limit": 0,
"object": "list",
"skip": 0,
"totalCount": 0
}