Link Search Menu Expand Document

Updated Fri Mar 5th 2021, 12:17 UTC

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

Campaign

Example
{
  "@type": "Campaign",
  "@context": "/contexts/Campaign.jsonld",
  "id": "/campaigns/joOQd57",
  "title": "The Best Campaign",
  "messageBody": "The best campaign message.",
  "state": "sent",
  "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
  },
  "delete": null,
  "edit": null,
  "cancel": null,
  "account": "/accounts/my_account",
  "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": {
      "notifications": {
        "email": true
      },
      "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/DQeeO69/notes",
            "data": {},
            "conversations": "/contacts/DQeeO69/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/DQeeO69/notes",
            "data": {},
            "conversations": "/contacts/DQeeO69/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/DQeeO69/notes",
            "data": {},
            "conversations": "/contacts/DQeeO69/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"
}

© 2021 TextUs