Get
GET /campaigns/:campaign
A Campaign is a message sent to multiple recipients.
Examples
Get a Campaign
Request
GET /campaigns/joOQd57
Example
$ curl -i -H Accept:"application/vnd.textus+jsonld" \
-H Authorization:"Bearer {token}" \
-X GET /campaigns/joOQd57
Response
Status
200
Response Type
Example Body
{
"@type": "Campaign",
"@context": "/contexts/Campaign.jsonld",
"id": "/campaigns/joOQd57",
"title": "The Best Campaign",
"messageBody": "The best campaign message.",
"state": "sent",
"type": "single",
"schedule": null,
"createdAt": "2018-11-19T20:51:54.000Z",
"scheduledAt": "2018-11-19T21:00:54.000Z",
"sendingStartAt": "2018-11-19T21:00:54.000Z",
"sendingEndAt": "2018-11-19T21:01:54.000Z",
"estimatedStartAt": "2018-11-19T21:01:54.000Z",
"estimatedFinishAt": "2018-11-19T21:01:54.000Z",
"deliveryStatistics": {
"total": 1,
"skipped": 0,
"sent": 1,
"delivered": 1,
"replied": 0,
"unreplied": 1,
"failed": 0,
"omitted": 0
},
"campaignTemplates": {
"@type": "hydra:Collection",
"@context": "/contexts/hydra:Collection.jsonld",
"id": "/campaigns/joOQd57/templates",
"members": [
{
"@type": "CampaignTemplate",
"@context": "/contexts/CampaignTemplate.jsonld",
"id": "/campaigns/joOQd57/templates/BYoaNE",
"sortOrder": 1,
"messageBody": "hi",
"attachments": {
"@type": "hydra:Collection",
"@context": "/contexts/hydra:Collection.jsonld",
"id": "/campaigns/AJoOVb7/campaign_attachments",
"members": [
{
"@type": "Attachment",
"@context": "/contexts/Attachment.jsonld",
"id": "/campaign_attachments/7LdVlM",
"url": "https://foo.cloudfront.net/bar1234=",
"downloadUrl": "https://s3.amazonaws.com/attachments",
"key": "abc123.png",
"contentType": "image/png",
"size": 6829,
"width": 101,
"height": 128,
"originalFilename": "original"
}
],
"totalItems": 1
},
"registeredLinks": {
"@type": "hydra:Collection",
"@context": "/contexts/hydra:Collection.jsonld",
"id": "/campaigns/bK9DjpX/templates/bK9DjpX/links",
"members": [
{
"@type": "ShortenedLink",
"@context": "/contexts/ShortenedLink.jsonld",
"id": "/campaigns/bK9DjpX/templates/bK9DjpX/links/BYoaNE",
"shortLink": "https://cattaps.textus-stg.app/6Tb1mk",
"originalLink": "https://xkcd.com",
"clickCount": 9
}
],
"totalItems": 1
},
"deliveryStatistics": {
"total": 1,
"skipped": 0,
"sent": 1,
"delivered": 1,
"replied": 0,
"unreplied": 1,
"failed": 0
},
"totalRecipients": "/campaigns/joOQd57/templates/joOQd57/recipients/total",
"skippedRecipients": "/campaigns/joOQd57/templates/joOQd57/recipients/skipped",
"sentRecipients": "/campaigns/joOQd57/templates/joOQd57/recipients/sent",
"deliveredRecipients": "/campaigns/joOQd57/templates/joOQd57/recipients/delivered",
"failedRecipients": "/campaigns/joOQd57/templates/joOQd57/recipients/failed",
"repliedRecipients": "/campaigns/joOQd57/templates/joOQd57/recipients/replied",
"unrepliedRecipients": "/campaigns/joOQd57/templates/joOQd57/recipients/unreplied"
}
],
"totalItems": 1
},
"delete": null,
"edit": null,
"cancel": null,
"account": "/accounts/my_account",
"group": null,
"user": {
"@type": "User",
"@context": "/contexts/User.jsonld",
"id": "/users/wqyODPA",
"name": "Chuck Norris",
"firstName": "Chuck",
"lastName": "Norris",
"email": "chuck@textus.example",
"avatar": null,
"automatedActor": false,
"hasPassword": false,
"discarded": false,
"settings": {
"customSettings": {}
},
"memberships": "/users/wqyODPA/memberships"
},
"totalRecipients": {
"@type": "Collection",
"@context": "/contexts/Collection.jsonld",
"id": "/campaigns/joOQd57/campaign_recipients/total",
"members": [
{
"@type": "CampaignRecipient",
"@context": "/contexts/CampaignRecipient.jsonld",
"id": "/campaign_recipients/joOQd57",
"state": "sent",
"errorDescription": null,
"createdAt": "2018-11-19T20:49:03.581Z",
"scheduledAt": null,
"sentAt": null,
"replyLag": null,
"delivered": true,
"unknown": false,
"contactPhone": {
"@type": "RecipientContactPhone",
"id": "/contact_phones/mxvbRw",
"@context": "/contexts/ContactPhone.jsonld",
"phoneNumber": "13035551234",
"formattedPhoneNumber": "+1 303-555-1234",
"extension": null,
"type": "Mobile",
"deliverabilityStatus": "unknown",
"contact": {
"id": "/contacts/Vled2N",
"@type": "ContactItem",
"@context": "/contexts/Contact.jsonld",
"name": "Jamel Hirthe",
"firstName": "Jamel",
"lastName": "Hirthe",
"phones": "/contacts/Vled2N/phones",
"notes": "/contacts/Vled2N/notes",
"data": {},
"formattedData": {},
"conversations": "/contacts/Vled2N/conversations",
"createdAt": "2020-01-06T21:49:58.312Z"
}
},
"message": null,
"campaign": "/campaigns/joOQd57"
},
{
"@type": "CampaignRecipient",
"@context": "/contexts/CampaignRecipient.jsonld",
"id": "/campaign_recipients/joOQd57",
"state": "sent",
"errorDescription": null,
"createdAt": "2018-11-19T20:49:03.581Z",
"scheduledAt": "2018-11-19T20:49:03.581Z",
"sentAt": "2019-02-28T22:05:45.000Z",
"replyLag": "PT59M",
"delivered": true,
"unknown": false,
"contactPhone": {
"@type": "RecipientContactPhone",
"id": "/contact_phones/mxvbRw",
"@context": "/contexts/ContactPhone.jsonld",
"phoneNumber": "13035551234",
"formattedPhoneNumber": "+1 303-555-1234",
"extension": null,
"type": "Mobile",
"deliverabilityStatus": "unknown",
"contact": {
"id": "/contacts/Vled2N",
"@type": "ContactItem",
"@context": "/contexts/Contact.jsonld",
"name": "Jamel Hirthe",
"firstName": "Jamel",
"lastName": "Hirthe",
"phones": "/contacts/Vled2N/phones",
"notes": "/contacts/Vled2N/notes",
"data": {},
"formattedData": {},
"conversations": "/contacts/Vled2N/conversations",
"createdAt": "2020-01-06T21:49:58.312Z"
}
},
"message": "/messages/joBW57",
"campaign": "/campaigns/joOQd57"
},
{
"@type": "CampaignRecipient",
"@context": "/contexts/CampaignRecipient.jsonld",
"id": "/campaign_recipients/joOQd57",
"state": "sent",
"errorDescription": null,
"createdAt": "2018-11-19T20:49:03.581Z",
"scheduledAt": "2018-11-19T20:49:03.581Z",
"sentAt": "2019-03-04T23:01:03.000Z",
"replyLag": null,
"delivered": true,
"unknown": false,
"contactPhone": {
"@type": "RecipientContactPhone",
"id": "/contact_phones/mxvbRw",
"@context": "/contexts/ContactPhone.jsonld",
"phoneNumber": "13035551234",
"formattedPhoneNumber": "+1 303-555-1234",
"extension": null,
"type": "Mobile",
"deliverabilityStatus": "unknown",
"contact": {
"id": "/contacts/Vled2N",
"@type": "ContactItem",
"@context": "/contexts/Contact.jsonld",
"name": "Jamel Hirthe",
"firstName": "Jamel",
"lastName": "Hirthe",
"phones": "/contacts/Vled2N/phones",
"notes": "/contacts/Vled2N/notes",
"data": {},
"formattedData": {},
"conversations": "/contacts/Vled2N/conversations",
"createdAt": "2020-01-06T21:49:58.312Z"
}
},
"message": "/messages/joBW57",
"campaign": "/campaigns/joOQd57"
}
],
"totalItems": 1,
"blockContacts": "/campaigns/joOQd57/campaign_recipients/delivered/block",
"unblockContacts": "/campaigns/joOQd57/campaign_recipients/delivered/block",
"subscribeContacts": "/campaigns/joOQd57/campaign_recipients/delivered/subscribe",
"unsubscribeContacts": "/campaigns/joOQd57/campaign_recipients/delivered/subscribe",
"sendCampaign": "/campaigns/joOQd57/campaign_recipients/total/contact_filter",
"view": {
"@type": "hydra:PartialCollectionView",
"@context": "/contexts/hydra:PartialCollectionView.jsonld",
"id": "/campaigns/joOQd57/campaign_recipients/total",
"first": "/campaigns/joOQd57/campaign_recipients/total",
"next": null,
"previous": null
}
},
"skippedRecipients": "/campaigns/joOQd57/campaign_recipients/skipped",
"sentRecipients": "/campaigns/joOQd57/campaign_recipients/sent",
"deliveredRecipients": "/campaigns/joOQd57/campaign_recipients/delivered",
"repliedRecipients": "/campaigns/joOQd57/campaign_recipients/replied",
"unrepliedRecipients": "/campaigns/joOQd57/campaign_recipients/unreplied",
"failedRecipients": "/campaigns/joOQd57/campaign_recipients/failed",
"omittedRecipients": "/campaigns/joOQd57/campaign_recipients/omitted",
"lastSentAt": null,
"attachments": {
"@type": "hydra:Collection",
"@context": "/contexts/hydra:Collection.jsonld",
"id": "/campaigns/AJoOVb7/campaign_attachments",
"members": [],
"totalItems": 0
}
}