List of OneTimeMsg

Retrieve a list of OneTimeMsg objects

Parameter

Accessible via URL https://api.channel.io/open/v4/mkt/one-time-msgs and HTTP GET

ParameterExampleRequiredDescriptionParameter Type
since1605795977290OptionalEpoch time in microseconds of the first OneTimeMsg to be retrieved.
Pagination is supported along with the next value contained in the root object of the JSON response.
Query
limit25OptionalRestrict the maximum number of OneTimeMsg objects to be retrieved
- min : 1
- max : 500
- default : 25
Query
stateswaitingOptionalA set of OneTimeMsg states to be retrieved.
- available values : draft, waiting, sent, canceled
Query

Example

GET https://api.channel.io/open/v4/mkt/one-time-msgs?since=1605795977290&limit=25&states=draft&states=canceled

Response

Returns a list of OneTimeMsg objects

{
  "next": 1624422348472,
  "oneTimeMsgs": [
    {
      "id": "string",
      "channelId": "string",
      "name": "string",
      "state": "draft",
      "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",
      "userQuery": {
        "key": "string",
        "type": "boolean",
        "operator": {},
        "values": [
          {}
        ],
        "and": [
          null
        ],
        "or": [
          null
        ]
      },
      "goalEventName": "string",
      "goalEventQuery": {
        "key": "string",
        "type": "boolean",
        "operator": {},
        "values": [
          {}
        ],
        "and": [
          null
        ],
        "or": [
          null
        ]
      },
      "enableSupportBot": true,
      "followingSupportBotId": "string",
      "advertising": true,
      "sendToOfflineUser": true,
      "startAt": 1624422362761,
      "draft": {
        "oneTimeMsg": {}
      },
      "createdAt": 1624422362766,
      "updatedAt": 1624422362766,
      "sent": 0,
      "view": 0,
      "goal": 0,
      "click": 0,
      "userChatExpireDuration": {
        "seconds": 0,
        "nano": 0,
        "units": [
          {
            "dateBased": true,
            "timeBased": true,
            "duration": {
              "seconds": 0,
              "nano": 0,
              "zero": true,
              "negative": true
            },
            "durationEstimated": true
          }
        ],
        "zero": true,
        "negative": true
      }
    }
  ]
}