Get a single Campaign

Get a particular Campaign object

Parameter

Accessible via URL https://api.channel.io/open/v4/mkt/campaigns/{id} and HTTP GET

ParameterExampleRequiredDescriptionParameter Type
id1234RequiredID of Campaign objectPath

Example

GET https://api.channel.io/open/v4/mkt/campaigns/1234

Response

Returns a Campaign object and a list of CampaignMsg objects along with related information

{
  "campaign": {
    "id": "string",
    "channelId": "string",
    "name": "string",
    "state": "draft",
    "userQuery": {
      "key": "string",
      "type": "boolean",
      "operator": {},
      "values": [
        {}
      ],
      "and": [
        null
      ],
      "or": [
        null
      ]
    },
    "triggerEventName": "string",
    "triggerEventQuery": {
      "key": "string",
      "type": "boolean",
      "operator": {},
      "values": [
        {}
      ],
      "and": [
        null
      ],
      "or": [
        null
      ]
    },
    "waitingTime": {
      "seconds": 0,
      "nano": 0,
      "units": [
        {
          "dateBased": true,
          "timeBased": true,
          "durationEstimated": true
        }
      ],
      "zero": true,
      "negative": true
    },
    "filterEventName": "string",
    "filterEventQuery": {
      "key": "string",
      "type": "boolean",
      "operator": {},
      "values": [
        {}
      ],
      "and": [
        null
      ],
      "or": [
        null
      ]
    },
    "filterMatch": "positive",
    "goalEventName": "string",
    "goalEventQuery": {
      "key": "string",
      "type": "boolean",
      "operator": {},
      "values": [
        {}
      ],
      "and": [
        null
      ],
      "or": [
        null
      ]
    },
    "advertising": true,
    "enableSupportBot": true,
    "followingSupportBotId": "string",
    "sendToOfflineUser": true,
    "cooldown": {
      "seconds": 0,
      "nano": 0,
      "units": [
        {
          "dateBased": true,
          "timeBased": true,
          "durationEstimated": true
        }
      ],
      "zero": true,
      "negative": true
    },
    "sendMode": "always",
    "sendTimeRanges": {
      "timeRanges": [
        {
          "dayOfWeeks": [
            "mon"
          ],
          "from": 0,
          "to": 0
        }
      ]
    },
    "startAt": 1624422358160,
    "endAt": 1624422358160,
    "draft": {
      "campaign": {},
      "msgs": [
        {
          "vanilla": {
            "id": "string",
            "campaignId": "string",
            "name": "string",
            "botName": "string",
            "message": {
              "blocks": [
                {
                  "type": "bullets",
                  "language": "string",
                  "value": "string",
                  "blocks": [
                    null
                  ]
                }
              ],
              "buttons": [
                {
                  "title": "string",
                  "colorVariant": "cobalt",
                  "url": "string"
                }
              ],
              "files": [
                {
                  "id": "string",
                  "type": "string",
                  "name": "string",
                  "size": 0,
                  "contentType": "string",
                  "duration": 0,
                  "width": 0,
                  "height": 0,
                  "orientation": 0,
                  "animated": true,
                  "bucket": "string",
                  "key": "string",
                  "previewKey": "string",
                  "channelId": "string",
                  "chatId": "string",
                  "chatType": "string"
                }
              ],
              "webPage": {
                "id": "string",
                "url": "string",
                "title": "string",
                "description": "string",
                "imageUrl": "string",
                "videoUrl": "string",
                "publisher": "string",
                "author": "string",
                "width": 0,
                "height": 0,
                "bucket": "string",
                "previewKey": "string",
                "logo": "string",
                "name": "string"
              }
            },
            "exposureType": "fullScreen",
            "createdAt": 1624422358172,
            "updatedAt": 1624422358172,
            "sent": 0,
            "view": 0,
            "goal": 0,
            "click": 0
          }
        }
      ]
    },
    "createdAt": 1624422358172,
    "updatedAt": 1624422358172,
    "sent": 0,
    "view": 0,
    "goal": 0,
    "click": 0,
    "userChatExpireDuration": {
      "seconds": 0,
      "nano": 0,
      "units": [
        {
          "dateBased": true,
          "timeBased": true,
          "durationEstimated": true
        }
      ],
      "zero": true,
      "negative": true
    }
  },
  "msgs": [
    {
      "id": "string",
      "campaignId": "string",
      "name": "string",
      "botName": "string",
      "message": {
        "blocks": [
          {
            "type": "bullets",
            "language": "string",
            "value": "string",
            "blocks": [
              null
            ]
          }
        ],
        "buttons": [
          {
            "title": "string",
            "colorVariant": "cobalt",
            "url": "string"
          }
        ],
        "files": [
          {
            "id": "string",
            "type": "string",
            "name": "string",
            "size": 0,
            "contentType": "string",
            "duration": 0,
            "width": 0,
            "height": 0,
            "orientation": 0,
            "animated": true,
            "bucket": "string",
            "key": "string",
            "previewKey": "string",
            "channelId": "string",
            "chatId": "string",
            "chatType": "string"
          }
        ],
        "webPage": {
          "id": "string",
          "url": "string",
          "title": "string",
          "description": "string",
          "imageUrl": "string",
          "videoUrl": "string",
          "publisher": "string",
          "author": "string",
          "width": 0,
          "height": 0,
          "bucket": "string",
          "previewKey": "string",
          "logo": "string",
          "name": "string"
        }
      },
      "exposureType": "fullScreen",
      "createdAt": 1624422358172,
      "updatedAt": 1624422358172,
      "sent": 0,
      "view": 0,
      "goal": 0,
      "click": 0
    }
  ]
}