{"openapi":"3.0.3","info":{"title":"CleverPush API Reference","version":"0.0.1","description":"REST API Reference"},"paths":{"/channel/{channelId}/app-banners/{id}/statistics":{"get":{"tags":["AppBanner"],"summary":"GetAppBannerStatistics","description":"Get App Banner Statistics","parameters":[{"schema":{"type":"string"},"in":"path","name":"channelId","description":"The id of the channel","required":true},{"schema":{"type":"string"},"in":"path","name":"id","description":"The id of the app banner","required":true},{"schema":{"type":"string"},"in":"query","name":"startDate","description":"The start date of the statistics","required":true},{"schema":{"type":"string"},"in":"query","name":"endDate","description":"The end date of the statistics (max 90 days)","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n    \"statistics\": [\n        {\n            \"date\": \"2024-01-01T00:00:00.000Z\",\n            \"totalClicked\": 10,\n            \"totalDelivered\": 20\n        },\n        {\n            \"date\": \"2024-01-02\",\n            \"totalClicked\": 15,\n            \"totalDelivered\": 25\n        }\n    ],\n    \"metadata\": {\n        \"query\": {\n            \"startDate\": \"2024-01-01T00:00:00.000Z\",\n            \"endDate\": \"2024-01-02T23:59:59.999Z\"\n        }\n    }\n}","schema":{"title":"Success-Response:","type":"object","properties":{"statistics":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"totalClicked":{"type":"number"},"totalDelivered":{"type":"number"}},"required":["date","totalClicked","totalDelivered"]},"description":"<p>The statistics of the app banner</p>"},"metadata":{"type":"object","properties":{"query":{"type":"object","properties":{"startDate":{"type":"string"},"endDate":{"type":"string"}}}}}},"required":["statistics"]}}},"description":"Success-Response:"}}}},"/channel/{id}/events":{"post":{"tags":["Channel_Events"],"summary":"CreateChannelConversionEvents","description":"Create channel conversion events","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true}],"responses":{"201":{"content":{"application/json":{"example":"HTTP/1.1 201 Created\n{\n    \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean"}}}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"channel":{"type":"string","description":"<p>Channel Id</p>"},"name":{"type":"string","description":"<p>Event name</p>"},"triggerType":{"type":"string","description":"<p>Can be one of the following: </br> <b> custom </b> (Event tracking code) </br> <b> path </b> - Path RegEx </br> <b> selector </b> - CSS Selector </br> <b> function </b> - JavaScript function </br> <b> cpc </b> - CPC (Cost per click)</p>"},"shared":{"type":"boolean","description":"<p>Is shared between channels</p>"},"triggerPath":{"type":"string","description":"<p>E.g. /examplePath</p>"},"triggerSelector":{"type":"string","description":"<p>E.g. .className</p>"},"triggerFunction":{"type":"string","description":"<p>E.g. &quot;function(){}&quot;&quot;</p>"},"amountFunction":{"type":"string","description":"<p>E.g. &quot;function(){}&quot;&quot;</p>"},"currencies":{"items":{"type":"string","description":"<p>E.g. [ &quot;EUR&quot; ]</p>"},"type":"array","description":"<p>E.g. [ &quot;EUR&quot; ]</p>"},"enableCpcTracking":{"type":"boolean","description":"<p>Enable CPC tracking</p>"},"properties":{"items":{"type":"string","description":"<p>E.g. [ &quot;examplePropertyName&quot; ]</p>"},"type":"array","description":"<p>E.g. [ &quot;examplePropertyName&quot; ]</p>"}},"type":"object","required":["channel","name","triggerType"]}}}}},"get":{"tags":["Channel_Events"],"summary":"GetChannelConversionEvents","description":"Get channel conversion events","parameters":[{"schema":{"type":"string"},"in":"header","name":"Authorization","description":"Private API key","required":true},{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n \"events\": [\n  {\n     \"_id\": \"exampleId\",\n     \"channel\": \"exampleId\",\n     \"name\": \"Test\",\n     \"shared\": false,\n     \"triggerType\": \"path\",\n     \"triggerPath\": \"/examplePath\",\n     \"triggerSelector\": \"cssSelector\",\n     \"triggerFunction\": \"function(){}\",\n     \"amountFunction\": \"function(){}\",\n     \"attributes\": [ ],\n     \"currencies\": [ ],\n     \"enableCpcTracking\": false,\n     \"properties\": [ \"examplePropertyName\" ]\n  }\n ]\n}","schema":{"title":"Success-Response:","type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"channel":{"type":"string"},"name":{"type":"string"},"shared":{"type":"boolean"},"triggerType":{"type":"string"},"triggerPath":{"type":"string"},"triggerSelector":{"type":"string"},"triggerFunction":{"type":"string"},"amountFunction":{"type":"string"},"attributes":{"type":"array","items":{}},"currencies":{"type":"array","items":{}},"enableCpcTracking":{"type":"boolean"},"properties":{"type":"array","items":{"type":"string"}}}},"description":"<p>List of conversion events</p>"}},"required":["events"]}}},"description":"Success-Response:"}}}},"/channel/{id}/segments":{"post":{"tags":["Channel_segments"],"summary":"CreateChannelSegment","description":"Create channel segment","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"id\": \"XXXX\",\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"id":{"type":"string"},"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string","description":"<p>Segment name</p>"},"filterOperator":{"type":"string","description":"<p>Boolean operator for chaining the filters ('and' or 'or')</p>"},"filters":{"type":"array","items":{"type":"object","properties":{}},"description":"<p>Array to create segments with filters included below <br> <b>type:</b><br> Can be 'clickRate', 'tags', 'excludeTags', 'topics', 'excludeTopics', 'platform', 'excludePlatform', 'browser', 'excludeBrowser', 'language', 'country', 'daysSinceOptIn', 'notificationGroupClicked', 'notificationGroupDelivered'  <br> <b>value:</b><br> Depends on filter, can be integer, string or array <br> [<b>relation</b>] Optional:<br> Use 'gt' for greater than or 'lt' for lesser than  <br> [<b>days</b>] Optional:<br> Days, e.g. 14 or 30  <br> Object example: <br> <code> { &quot;type&quot;: 'clickRate', &quot;value&quot;: 1, &quot;days&quot;: 7 } </code></p>"}},"type":"object","required":["name","filterOperator","filters"]}}}}},"delete":{"tags":["Channel_segments"],"summary":"DeleteChannelSegments","description":"Delete channel segment","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}}},"get":{"tags":["Channel_segments"],"summary":"GetChannelSegments","description":"Get channel segments","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"query","name":"limit","description":"Used for pagination. Default: 50, Max: 100"},{"schema":{"type":"string"},"in":"query","name":"skip","description":"Used for pagination. Default: 0"}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"segments\": [\n    {\n      \"_id\": \"xxxxxxxxxxxxxxxxx\",\n      \"channel\": \"xxxxxxxxxxxxxxxxx\",\n      \"name\": \"Example Segment\",\n      \"subscriptions\": 0,\n      \"filters\": [\n        {\n          \"type\": \"\",\n          \"operator\": \"\",\n          \"children\": [\n             {\n               \"type\": \"type name\",\n               \"relation\": \"\",\n               \"value\": [\"XXXXXXXXXXX\"]\n             }\n           ]\n        }\n      ],\n      \"shared\": false,\n      \"filterOperator\": \"and\",\n      \"createdAt\": \"2018-01-01T01:00:00.000Z\",\n      \"updatedAt\": \"2018-01-01T11:00:00.000Z\",\n      \"updateJobNecessary\": true,\n      \"channelInactiveSubscriptions\": {\n          \"XXXXXXXXXXX\": 0\n      },\n      \"channelSubscriptions\": {\n          \"XXXXXXXXXXX\": 0\n      },\n      \"inactiveSubscriptions\": 0\n    }\n  ]\n}","schema":{"title":"Success-Response:","type":"object","properties":{"segments":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"channel":{"type":"string","description":"<p>channel  ID</p>"},"name":{"type":"string","description":"<p>segment's name</p>"},"subscriptions":{"type":"number","description":"<p>segment's subscriptions count</p>"},"filters":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"<p>filter's type</p>"},"operator":{"type":"string","description":"<p>filter's operator value</p>"},"children":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"<p>children types name</p>"},"relation":{"type":"string","description":"<p>children relation name</p>"},"value":{"type":"array","items":{"type":"string"},"description":"<p>array of children value ID</p>"}},"required":["type","relation","value"]},"description":"<p>filter's children value</p>"}},"required":["type","operator","children"]},"description":"<p>segment's filter array object</p>"},"shared":{"type":"boolean","description":"<p>shared boolean value</p>"},"filterOperator":{"type":"string","description":"<p>filterOperator value</p>"},"createdAt":{"type":"string","description":"<p>date of create of segments</p>"},"updatedAt":{"type":"string","description":"<p>date of update of segments</p>"},"updateJobNecessary":{"type":"boolean","description":"<p>boolean value</p>"},"channelInactiveSubscriptions":{"type":"object","properties":{"XXXXXXXXXXX":{"type":"number"}},"description":"<p>object of channel ID with number value</p>"},"channelSubscriptions":{"type":"object","properties":{"XXXXXXXXXXX":{"type":"number"}},"description":"<p>object of channel ID with number value</p>"},"inactiveSubscriptions":{"type":"number","description":"<p>inactiveSubscriptions count</p>"},"id":{"type":"string","description":"<p>channel segments ID</p>"}},"required":["id","channel","name","subscriptions","filters","shared","filterOperator","updatedAt","createdAt","updateJobNecessary","channelInactiveSubscriptions","channelSubscriptions","inactiveSubscriptions"]},"description":"<p>Array of data on the channel segments</p>"}},"required":["segments"]}}},"description":"Success-Response:"}}}},"/channel/{id}/segment/{segmentId}":{"get":{"tags":["Channel_segments"],"summary":"GetChannelSegment","description":"Get channel segment","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"path","name":"segmentId","description":"The segment id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"segment\": {\n      \"_id\": \"XXXXXXXXXXXXXXX\",\n      \"filters\": []\n  }\n}","schema":{"title":"Success-Response:","type":"object","properties":{"segment":{"type":"object","properties":{"_id":{"type":"string"},"filters":{"type":"array","items":{}}},"description":"<p>Requested segment</p>"}},"required":["segment"]}}},"description":"Success-Response:"}}},"post":{"tags":["Channel_segments"],"summary":"UpdateChannelSegment","description":"Update channel segment","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"path","name":"segmentId","description":"The segment id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":"<p>Status of the update</p>"}},"required":["success"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{},"type":"object"}}}}}},"/channel/{id}/segment/{segmentId}/statistics":{"get":{"tags":["Channel_segments"],"summary":"GetChannelSegmentStatistics","description":"Get channel segment statistics","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"path","name":"segmentId","description":"The segment id","required":true},{"schema":{"type":"string"},"in":"query","name":"startDate","description":"A number representing the amount of seconds passed since January 1, 1970, 00:00:00 UTC, until start date is reached."},{"schema":{"type":"string"},"in":"query","name":"endDate","description":"A number representing the amount of seconds passed since January 1, 1970, 00:00:00 UTC, until end date is reached."}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"statistics\": [\n      {\n         \"_id\": \"XXXXXXXXXXXXXXX\",\n         \"date\": \"2021-06-24T00:00:00.000+0000\",\n         \"inactiveSubscriptions\": 0,\n         \"subscriptions\": 0,\n         \"inactiveSubscriptions\": 0\n      }\n  ]\n}","schema":{"title":"Success-Response:","type":"object","properties":{"statistics":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"date":{"type":"string","description":"<p>date of creation</p>"},"inactiveSubscriptions":{"type":"number","description":"<p>inactiveSubscriptions count</p>"},"subscriptions":{"type":"number","description":"<p>subscriptions count</p>"},"id":{"type":"string","description":"<p>statistics ID</p>"}},"required":["id","date","inactiveSubscriptions","subscriptions"]},"description":"<p>Data with statistics for specified channel's segment</p>"}},"required":["statistics"]}}},"description":"Success-Response:"}}}},"/tag/create":{"post":{"tags":["Channel_tags"],"summary":"CreateTag","description":"Create channel tag","parameters":[],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"tagId\": \"XXXXXXXXXXXXXXXXX\"\n}","schema":{"title":"Success-Response:","type":"object","properties":{"tagId":{"type":"string"},"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"channelId":{"type":"string","description":"<p>The channel ID (can be a string or array of strings).</p>"},"name":{"type":"string","description":"<p>The tag name.</p>"},"externalId":{"type":"string","description":"<p>The external tag ID. Must be unique per channel.</p>"},"autoAssignPath":{"type":"string","description":"<p>The auto assign URL path.</p>"},"autoAssignFunction":{"type":"string","description":"<p>The auto assign JS function.</p>"},"autoAssignSeconds":{"type":"number","description":"<p>The auto assign min. seconds.</p>"},"autoAssignVisits":{"type":"number","description":"<p>The auto assign min. visits.</p>"},"autoAssignSessions":{"type":"number","description":"<p>The auto assign min. sessions.</p>"}},"type":"object","required":["channelId","name"]}}}}}},"/channel/{id}/tag/{tagId}":{"delete":{"tags":["Channel_tags"],"summary":"DeleteChannelTag","description":"Delete channel tag","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"Channel ID","required":true},{"schema":{"type":"string"},"in":"path","name":"tagId","description":"Tag ID","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}}},"get":{"tags":["Channel_tags"],"summary":"GetChannelTag","description":"Get channel tag","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"Channel ID","required":true},{"schema":{"type":"string"},"in":"path","name":"tagId","description":"Tag ID","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"tag\": {\n      \"_id\": \"xxxxxxxxxxxxxxxxx\",\n      \"channel\": \"xxxxxxxxxxxxxxxxx\",\n      \"name\": \"Example Tag\",\n      \"subscriptions\": 0\n  }\n}","schema":{"title":"Success-Response:","type":"object","properties":{"tag":{"type":"object","properties":{"_id":{"type":"string"},"channel":{"type":"string"},"name":{"type":"string"},"subscriptions":{"type":"number"}},"description":"<p>Data of single channel tag</p>"}},"required":["tag"]}}},"description":"Success-Response:"}}},"post":{"tags":["Channel_tags"],"summary":"UpdateChannelTag","description":"Update channel tag","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"Channel ID","required":true},{"schema":{"type":"string"},"in":"path","name":"tagId","description":"Tag ID","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string","description":"<p>The tag name.</p>"},"externalId":{"type":"string","description":"<p>The external tag ID.</p>"},"sort":{"type":"number","description":"<p>Sort value.</p>"},"autoAssignPath":{"type":"string","description":"<p>The auto assign URL path.</p>"},"autoAssignOptInPath":{"type":"string","description":"<p>The auto assign opt-in URL path.</p>"},"autoAssignFunction":{"type":"string","description":"<p>The auto assign JS function.</p>"},"autoAssignSelector":{"type":"string","description":"<p>The auto assign CSS selector.</p>"},"autoAssignSeconds":{"type":"number","description":"<p>The auto assign min. seconds.</p>"},"autoAssignVisits":{"type":"number","description":"<p>The auto assign min. visits.</p>"},"autoAssignSessions":{"type":"number","description":"<p>The auto assign min. sessions.</p>"},"autoAssignSessionVisits":{"type":"boolean","description":"<p>Enables session visit based auto assignment.</p>"},"autoAssignDays":{"type":"number","description":"<p>The auto assign min. days.</p>"},"autoAssignCheckInterval":{"type":"number","description":"<p>The auto assign check interval.</p>"},"icon":{"type":"string","description":"<p>The tag icon.</p>"},"defaultNotificationIconUrl":{"type":"string","description":"<p>The default notification icon URL.</p>"},"includeAllSubscriptions":{"type":"boolean","description":"<p>Includes all subscriptions.</p>"}},"type":"object"}}}}}},"/channel/{id}/tag/externalId/{externalId}":{"get":{"tags":["Channel_tags"],"summary":"GetChannelTagByExternalId","description":"Get channel tag by externalId","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"Channel ID","required":true},{"schema":{"type":"string"},"in":"path","name":"externalId","description":"The external tag ID","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"tags\": [\n      {\n          \"_id\": \"xxxxxxxxxxxxxxxxx\",\n          \"channel\": \"xxxxxxxxxxxxxxxxx\",\n          \"name\": \"Example Tag\",\n          \"externalId\": \"my-external-id\",\n          \"subscriptions\": 0\n      }\n  ]\n}","schema":{"title":"Success-Response:","type":"object","properties":{"tags":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"channel":{"type":"string"},"name":{"type":"string"},"externalId":{"type":"string"},"subscriptions":{"type":"number"}}},"description":"<p>Array of matching channel tags</p>"}},"required":["tags"]}}},"description":"Success-Response:"}}}},"/channel/{id}/tag-groups":{"get":{"tags":["Channel_tags"],"summary":"GetChannelTagGroups","description":"Get channel tag groups","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"query","name":"limit","description":"Used for pagination. Default: 50, Max: 100"},{"schema":{"type":"string"},"in":"query","name":"skip","description":"Used for pagination. Default: 0"}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"tagGroups\": [{\n    \"_id\": \"XXXXXXXXXXXX\",\n    \"channel\": \"XXXXXXXXXXX\",\n    \"name\": \"tag group name\",\n    \"createdAt\": \"2021-11-10T14:27:04.267Z\",\n    \"tags\": [\"XXXXXXXXXXXX\", \"XXXXXXXXXXXX\"]\n  }]\n}","schema":{"title":"Success-Response:","type":"object","properties":{"tagGroups":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string","description":"<p>tag group ID</p>"},"channel":{"type":"string","description":"<p>tag group of channel ID</p>"},"name":{"type":"string","description":"<p>tag group name</p>"},"createdAt":{"type":"string","description":"<p>date of creation</p>"},"tags":{"type":"array","items":{"type":"string"},"description":"<p>Array of tag IDs</p>"}},"required":["_id","channel","name","tags","createdAt"]},"description":"<p>Data of all tag groups connected to specified channel</p>"}},"required":["tagGroups"]}}},"description":"Success-Response:"}}}},"/channel/{id}/tag/{tagId}/statistics":{"get":{"tags":["Channel_tags"],"summary":"GetChannelTagStatistics","description":"Get channel tag statistics","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"path","name":"tagId","description":"The tag id","required":true},{"schema":{"type":"string"},"in":"query","name":"startDate","description":"A number representing the amount of seconds passed since January 1, 1970, 00:00:00 UTC, until start date is reached."},{"schema":{"type":"string"},"in":"query","name":"endDate","description":"A number representing the amount of seconds passed since January 1, 1970, 00:00:00 UTC, until end date is reached."}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"statistics\": [\n    {\n        \"_id\": \"XXXXXXXXXXXXXXX\",\n        \"date\": \"2021-06-24T00:00:00.000+0000\",\n        \"subscriptions\": 10,\n        \"inactiveSubscriptions\": 0\n    }\n  ]\n}","schema":{"title":"Success-Response:","type":"object","properties":{"statistics":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"date":{"type":"string","description":"<p>date of creation</p>"},"subscriptions":{"type":"number","description":"<p>subscriptions count</p>"},"inactiveSubscriptions":{"type":"number","description":"<p>inactive subscriptions count</p>"},"id":{"type":"string","description":"<p>statistics ID</p>"}},"required":["id","date","subscriptions","inactiveSubscriptions"]},"description":"<p>Array of Data specific statistics for given tag</p>"}},"required":["statistics"]}}},"description":"Success-Response:"}}}},"/channel/{id}/tags":{"get":{"tags":["Channel_tags"],"summary":"GetChannelTags","description":"Get channel tags","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"query","name":"limit","description":"Used for pagination. Default: 50, Max: 100"},{"schema":{"type":"string"},"in":"query","name":"skip","description":"Used for pagination. Default: 0"},{"schema":{"type":"string"},"in":"query","name":"tagGroupId","description":"Used for tag group based filtering."}],"responses":{"200":{"content":{"application/json":{"example":"  HTTP/1.1 200 OK\n  {\n    \"tags\": [{\n     \"subscriptions\": 0,\n      \"_id\": \"XXXXXXXXXXXX\",\n      \"channel\": [\"XXXXXXXXXXX\"],\n      \"name\": \"tag name\",\n      \"autoAssignSeconds\": \"\",\n      \"autoAssignVisits\": \"\",\n      \"autoAssignFunction\": \"\",\n      \"autoAssignPath\": \"\",\n      \"sort\": 2,\n      \"createdAt\": \"2021-11-10T14:27:04.267Z\",\n      \"channelInactiveSubscriptions\": {\n          \"XXXXXXXXXXXX\": 0\n      },\n      \"channelSubscriptions\": {\n          \"XXXXXXXXXXXX\": 0\n      },\n      \"inactiveSubscriptions\": 0,\n       \"tagGroups\": [{\n        \"_id\": \"XXXXXXXXXXXX\",\n        \"channel\": \"XXXXXXXXXXX\",\n        \"name\": \"tag group name\",\n        \"createdAt\": \"2021-11-10T14:27:04.267Z\",\n        \"tags\": [\"XXXXXXXXXXXX\", \"XXXXXXXXXXXX\"]\n}]\n    }]\n  }","schema":{"title":"Success-Response:","type":"object","properties":{"tags":{"type":"array","items":{"type":"object","properties":{"subscriptions":{"type":"number","description":"<p>subscriptions count</p>"},"_id":{"type":"string"},"channel":{"type":"array","items":{"type":"string"},"description":"<p>array of channel ID</p>"},"name":{"type":"string","description":"<p>tag name</p>"},"autoAssignSeconds":{"type":"string","description":"<p>autoAssignSeconds of tag</p>"},"autoAssignVisits":{"type":"string","description":"<p>autoAssignVisits of tag</p>"},"autoAssignFunction":{"type":"string","description":"<p>autoAssignFunction of tag</p>"},"autoAssignPath":{"type":"string","description":"<p>autoAssignPath of tag</p>"},"sort":{"type":"number","description":"<p>sort value</p>"},"createdAt":{"type":"string","description":"<p>date of creation</p>"},"channelInactiveSubscriptions":{"type":"object","properties":{"XXXXXXXXXXXX":{"type":"number"}},"description":"<p>channelInactiveSubscriptions with channel ID and count</p>"},"channelSubscriptions":{"type":"object","properties":{"XXXXXXXXXXXX":{"type":"number"}},"description":"<p>channelSubscriptions with channel ID and count</p>"},"inactiveSubscriptions":{"type":"number","description":"<p>inactiveSubscriptions count</p>"},"tagGroups":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string","description":"<p>tag group ID</p>"},"channel":{"type":"string","description":"<p>tag group of channel ID</p>"},"name":{"type":"string","description":"<p>tag group name</p>"},"createdAt":{"type":"string","description":"<p>date of creation</p>"},"tags":{"type":"array","items":{"type":"string"},"description":"<p>Array of tag IDs</p>"}},"required":["_id","channel","name","tags","createdAt"]},"description":"<p>Data of all tag groups connected to specified channel</p>"},"id":{"type":"string","description":"<p>tags ID</p>"}},"required":["subscriptions","id","channel","name","autoAssignSeconds","autoAssignVisits","autoAssignFunction","autoAssignPath","sort","createdAt","channelInactiveSubscriptions","channelSubscriptions","inactiveSubscriptions","tagGroups"]},"description":"<p>Data of all tags connected to specified channel</p>"}},"required":["tags"]}}},"description":"Success-Response:"}}}},"/subscription/tags/sync":{"post":{"tags":["Channel_tags"],"summary":"SyncSubscriptionTags","description":"Sync Subscription Tags","parameters":[],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true,\n  \"results\": [\n    {\n      \"externalId\": \"tag-001\",\n      \"name\": \"Tag 1\",\n      \"status\": \"created\"\n    },\n    {\n      \"externalId\": \"tag-002\",\n      \"name\": \"Tag 2\",\n      \"status\": \"exists\"\n    }\n  ]\n}","schema":{"title":"Success Response:","type":"object","properties":{"success":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"externalId":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"}},"required":["externalId","name","status"]}},"externalId":{"type":"string","description":"<p>The external identifier of the processed tag.</p>"},"name":{"type":"string","description":"<p>The name of the processed tag.</p>"},"status":{"type":"string","description":"<p>Indicates whether the tag was created (&quot;created&quot;) or already existed (&quot;exists&quot;).</p>"}},"required":["externalId","name","status"]}}},"description":"Success Response:"},"400":{"content":{"application/json":{"example":"HTTP/1.1 400 Bad Request\n{\n  \"success\": false,\n  \"error\": \"Invalid or empty tags array.\"\n}","schema":{"title":"Error Response:","type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"}}}}},"description":"Error Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"channelId":{"type":"string","description":"<p>The unique identifier for the channel.</p>"},"subscriptionId":{"type":"string","description":"<p>The subscriptionId used to update the subscription's tags. (Either subscriptionId or customAttributes.user_id is required)</p>"},"tags":{"type":"array","items":{"type":"object","properties":{"externalId":{"type":"string","description":"<p>The unique external identifier for the tag.</p>"},"name":{"type":"string","description":"<p>The name of the tag.</p>"}},"required":["externalId","name"]},"description":"<p>An array of tag objects, each containing:</p>"}},"type":"object","required":["channelId","subscriptionId","tags"]}}}}}},"/channel/{id}/topics":{"post":{"tags":["Channel_topics"],"summary":"CreateChannelTopic","description":"Create channel topic","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"topicId\": \"XXXXXXXXXXXXXXXXX\"\n}","schema":{"title":"Success-Response:","type":"object","properties":{"topicId":{"type":"string"},"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string","description":"<p>The topic name.</p>"},"externalId":{"type":"string","description":"<p>The topic external ID.</p>"},"customData":{"type":"object","properties":{},"description":"<p>The topic custom data.</p>"}},"type":"object","required":["name"]}}}}},"get":{"tags":["Channel_topics"],"summary":"GetChannelTopics","description":"Get channel topics","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"query","name":"limit","description":"Used for pagination. Default: 50, Max: 100"},{"schema":{"type":"string"},"in":"query","name":"skip","description":"Used for pagination. Default: 0"},{"schema":{"type":"string"},"in":"query","name":"includeHidden","description":"Set to true to include hidden topics"}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"topics\": [\n  {\n      \"_id\": \"xxxxxxxxxxxxxxxxx\",\n      \"channel\": [\"xxxxxxxxxxxxxxxxx\"],\n      \"createdAt\": \"2018-01-01T01:00:00.000Z\",\n      \"name\": \"Example Topic\",\n      \"shared\": true,\n      \"subscriptions\": 0,\n      \"parentTopic\": \"XXXXXXXXXX\"\n    }\n  ]\n}","schema":{"title":"Success-Response:","type":"object","properties":{"topics":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"channel":{"type":"array","items":{"type":"string"},"description":"<p>array of channel ID</p>"},"createdAt":{"type":"string","description":"<p>date of creation</p>"},"name":{"type":"string","description":"<p>name of topics</p>"},"shared":{"type":"boolean","description":"<p>topics shared</p>"},"subscriptions":{"type":"number","description":"<p>subscriptions count</p>"},"parentTopic":{"type":"string","description":"<p>parentTopic ID</p>"},"id":{"type":"string","description":"<p>topics ID</p>"},"layerFunction":{"type":"string","description":"<p>layerFunction of topics</p>"}},"required":["id","channel","createdAt","name","layerFunction","shared","subscriptions","parentTopic"]},"description":"<p>Array of topics connected to specified channel</p>"}},"required":["topics"]}}},"description":"Success-Response:"}}}},"/channel/{id}/topic/{topicId}/statistics":{"get":{"tags":["Channel_topics"],"summary":"GetChannelTopicStatistics","description":"Get channel topic statistics","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"path","name":"topicId","description":"The topic id","required":true},{"schema":{"type":"string"},"in":"query","name":"startDate","description":"A number representing the amount of seconds passed since January 1, 1970, 00:00:00 UTC, until start date is reached."},{"schema":{"type":"string"},"in":"query","name":"endDate","description":"A number representing the amount of seconds passed since January 1, 1970, 00:00:00 UTC, until end date is reached."}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"statistics\": [\n      {\n        \"_id\": \"XXXXXXXXXXXXXXX\",\n        \"date\": \"2021-06-24T00:00:00.000+0000\",\n        \"subscriptions\": 10,\n        \"inactiveSubscriptions\": 0\n      }\n  ]\n}","schema":{"title":"Success-Response:","type":"object","properties":{"statistics":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"date":{"type":"string","description":"<p>date of creation</p>"},"subscriptions":{"type":"number","description":"<p>subscriptions count,</p>"},"inactiveSubscriptions":{"type":"number","description":"<p>inactive subscriptions count</p>"},"id":{"type":"string","description":"<p>statistics ID</p>"}},"required":["id","date","subscriptions","inactiveSubscriptions"]},"description":"<p>Array of specified topic statistics connected to specified channel</p>"}},"required":["statistics"]}}},"description":"Success-Response:"}}}},"/channels":{"post":{"tags":["Channels"],"summary":"CreateChannel","description":"Create channel","parameters":[],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"id\": \"xxxxxxxxxxxxxxx\"\n}","schema":{"title":"Success-Response:","type":"object","properties":{"id":{"type":"string","description":""}},"required":["id"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string","description":"<p>See the &quot;Get channel&quot; route for parameters.</p>"}},"type":"object","required":["name"]}}}}},"get":{"tags":["Channels"],"summary":"GetChannels","description":"Get channels","parameters":[],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"channels\": [\n    {\n      \"_id\": \"xxxxxxxxxxxxxxxxx\",\n      \"user\": \"xxxxxxxxxxxxxxxxx\",\n      \"name\": \"Example Channel\",\n      \"identifier\": \"example\",\n      \"example\": \"example.com\",\n      \"iconUrl\": \"https://static.cleverpush.com/channel/icon/2676037e-920a-4b2c-9e1f-e93e814c30ea.png\",\n      \"iconFile\": \"2676037e-920a-4b2c-9e1f-e93e814c30ea.png\",\n      \"subscriptions\": 0,\n      \"optIns\": 0,\n      \"confirmAlerts\": 4,\n      \"confirmAlertBackdrop\": true,\n      \"showNotificationBell\": false,\n      \"autoRegister\": false,\n      \"createdAt\": \"2018-01-01T12:00:00.000Z\",\n      \"vapidPublicKey\": \"XXX\",\n      \"vapidPrivateKey\": \"XXX\",\n      \"confirmAlertTheme\": \"\",\n      \"confirmAlertThemeBackground\": \"\",\n      \"confirmAlertThemeVariant\": \"\",\n      \"confirmAlertNativeTheme\": \"\",\n      \"alertMinimumVisits\": 0,\n      \"ownDomain\": false,\n      \"showConfirmAlert\": true,\n      \"hideBranding\": true,\n      \"hideFaqLink\": true,\n      \"alertTimeout\": 1,\n      \"alertLocalization\": {\n        \"title\": \"Receive push notifications\",\n        \"info\": \"You can unsubscribe at any time\",\n        \"allow\": \"Allow\",\n        \"deny\": \"Deny\"\n      }\n    }\n  ]\n}","schema":{"title":"Success-Response:","type":"object","properties":{"channels":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"user":{"type":"string"},"name":{"type":"string"},"identifier":{"type":"string"},"example":{"type":"string"},"iconUrl":{"type":"string"},"iconFile":{"type":"string"},"subscriptions":{"type":"number"},"optIns":{"type":"number"},"confirmAlerts":{"type":"number"},"confirmAlertBackdrop":{"type":"boolean"},"showNotificationBell":{"type":"boolean"},"autoRegister":{"type":"boolean"},"createdAt":{"type":"string"},"vapidPublicKey":{"type":"string"},"vapidPrivateKey":{"type":"string"},"confirmAlertTheme":{"type":"string"},"confirmAlertThemeBackground":{"type":"string"},"confirmAlertThemeVariant":{"type":"string"},"confirmAlertNativeTheme":{"type":"string"},"alertMinimumVisits":{"type":"number"},"ownDomain":{"type":"boolean"},"showConfirmAlert":{"type":"boolean"},"hideBranding":{"type":"boolean"},"hideFaqLink":{"type":"boolean"},"alertTimeout":{"type":"number"},"alertLocalization":{"type":"object","properties":{"title":{"type":"string"},"info":{"type":"string"},"allow":{"type":"string"},"deny":{"type":"string"}}}}},"description":"<p>Array of Objects with channel data</p>"}},"required":["channels"]}}},"description":"Success-Response:"}}}},"/channel/{id}":{"get":{"tags":["Channels"],"summary":"GetChannel","description":"Get channel","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"channel\": {\n      \"_id\": \"xxxxxxxxxxxxxxxxx\",\n      \"user\": \"xxxxxxxxxxxxxxxxx\",\n      \"name\": \"Example Channel\",\n      \"identifier\": \"example\",\n      \"iconUrl\": \"https://static.cleverpush.com/channel/icon/2676037e-920a-4b2c-9e1f-e93e814c30ea.png\",\n      \"iconFile\": \"2676037e-920a-4b2c-9e1f-e93e814c30ea.png\",\n      \"project\": \"XXXXXXXXXXXX\",\n      \"subscriptions\": 0,\n      \"inactive\": false,\n      \"type\": \"web\",\n      \"domain\": \"domain name\",\n      \"optIns\": 0,\n      \"confirmAlerts\": 4,\n      \"confirmAlertBackdrop\": true,\n      \"showNotificationBell\": false,\n      \"autoRegister\": false,\n      \"createdAt\": \"2018-01-01T12:00:00.000Z\",\n      \"confirmAlertTheme\": \"\",\n      \"confirmAlertThemeBackground\": \"\",\n      \"confirmAlertThemeVariant\": \"\",\n      \"confirmAlertNativeTheme\": \"\",\n      \"alertMinimumVisits\": 0,\n      \"ownDomain\": false,\n      \"showConfirmAlert\": true,\n      \"hideBranding\": true,\n      \"hideFaqLink\": true,\n      \"alertTimeout\": 1,\n      \"alertLocalization\": {\n        \"title\": \"Receive push notifications\",\n        \"info\": \"You can unsubscribe at any time\",\n        \"allow\": \"Allow\",\n        \"deny\": \"Deny\"\n      }\n  }\n}","schema":{"title":"Success-Response:","type":"object","properties":{"channel":{"type":"object","properties":{"_id":{"type":"string","description":"<p>channel ID</p>"},"user":{"type":"string","description":"<p>user ID</p>"},"name":{"type":"string","description":"<p>Channel's name</p>"},"identifier":{"type":"string","description":"<p>identifier</p>"},"iconUrl":{"type":"string","description":"<p>url of icon image.</p>"},"iconFile":{"type":"string","description":"<p>icon file name</p>"},"project":{"type":"string","description":"<p>project ID</p>"},"subscriptions":{"type":"number","description":"<p>subscriptions count</p>"},"inactive":{"type":"boolean","description":"<p>inactive boolean value</p>"},"type":{"type":"string","description":"<p>type type of channel</p>"},"domain":{"type":"string","description":"<p>domain domain name of channel</p>"},"optIns":{"type":"number","description":"<p>optIns count</p>"},"confirmAlerts":{"type":"number","description":"<p>confirmAlerts count</p>"},"confirmAlertBackdrop":{"type":"boolean","description":"<p>boolean value either true or false</p>"},"showNotificationBell":{"type":"boolean","description":"<p>boolean value either true or false</p>"},"autoRegister":{"type":"boolean","description":"<p>boolean value either true or false</p>"},"createdAt":{"type":"string","description":"<p>Date in UTC String format</p>"},"confirmAlertTheme":{"type":"string","description":"<p>string value</p>"},"confirmAlertThemeBackground":{"type":"string","description":"<p>string value</p>"},"confirmAlertThemeVariant":{"type":"string","description":"<p>string value</p>"},"confirmAlertNativeTheme":{"type":"string","description":"<p>string value</p>"},"alertMinimumVisits":{"type":"number","description":"<p>alertMinimumVisits count</p>"},"ownDomain":{"type":"boolean","description":"<p>boolean value either true or false</p>"},"showConfirmAlert":{"type":"boolean","description":"<p>boolean value either true or false</p>"},"hideBranding":{"type":"boolean","description":"<p>boolean value either true or false</p>"},"hideFaqLink":{"type":"boolean","description":"<p>boolean value either true or false</p>"},"alertTimeout":{"type":"number","description":"<p>alertTimeout count</p>"},"alertLocalization":{"type":"object","properties":{"title":{"type":"string","description":"<p>title of alert</p>"},"info":{"type":"string","description":"<p>short description of alert</p>"},"allow":{"type":"string","description":"<p>text</p>"},"deny":{"type":"string","description":"<p>text</p>"}},"description":"<p>Object with alertLocalization data</p>","required":["title","info","allow","deny"]},"welcomeNotification":{"type":"object","properties":{},"description":"<p>Object with targetted channel data</p>"}},"description":"<p>Object with targetted channel data</p>","required":["_id","user","name","identifier","iconUrl","iconFile","project","subscriptions","inactive","type","domain","optIns","confirmAlerts","confirmAlertBackdrop","showNotificationBell","autoRegister","createdAt","confirmAlertTheme","confirmAlertThemeBackground","confirmAlertThemeVariant","confirmAlertNativeTheme","alertMinimumVisits","ownDomain","showConfirmAlert","hideBranding","hideFaqLink","welcomeNotification","alertTimeout","alertLocalization"]}},"required":["channel"]}}},"description":"Success-Response:"}}},"post":{"tags":["Channels"],"summary":"UpdateChannel","description":"Update channel","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string","description":"<p>See the &quot;Get channel&quot; route for parameters to update.</p>"},"whatsappWelcomeMessage":{"type":"object","properties":{},"description":"<p>The WhatsApp welcome message will be sent as soon as someone activates your bot. See the example above for the object structure, it uses the <a href=\"./#api-Class_definitions-MessengerMessage\"><u>messengerMessage</u></a></p>"},"whatsappCommands":{"type":"array","items":{"type":"object","properties":{}},"description":"<p>Array of commands that the bot reacts to <a href=\"./#api-Class_definitions-MessengerCommand\"><u>messengerCommand</u></a></p>"},"whatsappDefaultMessage":{"type":"object","properties":{},"description":"<p>This is the default response your bot will send if it can not assign the received message to a command.</p>"},"facebookWelcomeMessage":{"type":"object","properties":{},"description":"<p>The same as whatsappWelcomeMessage</p>"},"facebookCommands":{"type":"array","items":{"type":"object","properties":{}},"description":"<p>The same as whatsappCommands</p>"},"facebookDefaultMessage":{"type":"object","properties":{},"description":"<p>The same as whatsappDefaultMessage</p>"},"telegramWelcomeMessage":{"type":"object","properties":{},"description":"<p>The same as whatsappWelcomeMessage</p>"},"telegramCommands":{"type":"array","items":{"type":"object","properties":{}},"description":"<p>The same as whatsappCommands</p>"},"telegramDefaultMessage":{"type":"object","properties":{},"description":"<p>The same as whatsappDefaultMessage</p>"},"lineWelcomeMessage":{"type":"object","properties":{},"description":"<p>The same as whatsappWelcomeMessage</p>"},"lineCommands":{"type":"array","items":{"type":"object","properties":{}},"description":"<p>The same as whatsappCommands</p>"},"lineDefaultMessage":{"type":"object","properties":{},"description":"<p>The same as whatsappDefaultMessage</p>"}},"type":"object","required":["name"]}}}}}},"/channel/{id}/attribute-statistics":{"get":{"tags":["Channels"],"summary":"GetChannelAttributeStatistics","description":"Get channel attribute statistics","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"Channel ID","required":true},{"schema":{"type":"string"},"in":"query","name":"attribute","description":"Attribute ID","required":true},{"schema":{"type":"string"},"in":"query","name":"date","description":"Date in YYYY-MM-DD format. Will use current date if not provided."}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n   \"_id\" : \"XXXXXXX\",\n   \"date\" : \"2023-08-19T00:00:00.000+0000\",\n   \"channel\" : \"XXXXXXX\",\n   \"attribute\" : \"sub_id\",\n   \"subscriptionCounts\" : {\n       \"1\": 10,\n       \"2\": 2\n   }\n }","schema":{"title":"Success-Response:","type":"object","properties":{"_id":{"type":"string"},"date":{"type":"string"},"channel":{"type":"string"},"attribute":{"type":"string"},"subscriptionCounts":{"type":"object","properties":{"1":{"type":"number"},"2":{"type":"number"}}},"statistics":{"type":"object","properties":{},"description":"<p>Object containing channel attribute statistics</p>"}},"required":["statistics"]}}},"description":"Success-Response:"}}}},"/channel/{id}/app-banner/{bannerId}":{"get":{"tags":["Channels"],"summary":"GetChannelInAppBanner","description":"Get in-app banner","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"path","name":"bannerId","description":"The app-banner id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n         \"_id\": \"xxxxxxxxxxx\",\n         \"name\": \"xxxxxxxxxx\",\n         \"status\": \"draft\",\n         \"showOnlySubscribers\": true,\n         \"frequency\": \"once\",\n         \"startsAt\": \"..\",\n         \"endsAt\": \"..\"\n}","schema":{"title":"Success-Response:","type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"showOnlySubscribers":{"type":"boolean"},"frequency":{"type":"string"},"startsAt":{"type":"string"},"endsAt":{"type":"string"},"banner":{"type":"object","properties":{},"description":"<p>Object with data for an in-app banner</p>"}},"required":["banner"]}}},"description":"Success-Response:"}}},"post":{"tags":["Channels"],"summary":"UpdateChannelInAppBanner","description":"Update in-app banner","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"path","name":"bannerId","description":"The app-banner id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n    \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string","description":""},"content":{"type":"string","description":"<p>The banner's content (in HTML)</p>"},"frequency":{"type":"string","description":"<p>Can be: once, once_per_session</p>"},"showOnlySubscribers":{"type":"boolean","description":""},"startsAt":{"type":"string","description":""},"endsAt":{"type":"string","description":""}},"type":"object","required":["name","content","frequency"]}}}}}},"/channel/{id}/app-banners":{"get":{"tags":["Channels"],"summary":"GetChannelInAppBanners","description":"Get in-app banners","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"Channel ID","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"banners\": [\n      {\n         \"_id\": \"xxxxxxxxxxx\",\n         \"name\": \"xxxxxxxxxx\",\n         \"status\": \"draft\",\n         \"showOnlySubscribers\": true,\n         \"frequency\": \"once\",\n         \"startsAt\": \"..\",\n         \"endsAt\": \"..\"\n      }\n ]\n}","schema":{"title":"Success-Response:","type":"object","properties":{"banners":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"showOnlySubscribers":{"type":"boolean"},"frequency":{"type":"string"},"startsAt":{"type":"string"},"endsAt":{"type":"string"}}},"description":"<p>Array of banners connected to the specified channel</p>"}},"required":["banners"]}}},"description":"Success-Response:"}}}},"/channel/{id}/statistics":{"get":{"tags":["Channels"],"summary":"GetChannelStatistics","description":"Get channel statistics","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"Channel ID","required":true},{"schema":{"type":"string"},"in":"query","name":"startDate","description":"Start date timestamp","required":true},{"schema":{"type":"string"},"in":"query","name":"endDate","description":"End date timestamp","required":true},{"schema":{"type":"string"},"in":"query","name":"aggregate","description":"Aggregate statistics? Defaults to true. Will output array if false."}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n   \"sent\": 100,\n   \"delivered\": 80,\n   \"clicked\": 20,\n   \"optIns\": 30,\n   \"optOuts\": 20,\n   \"confirmAlerts\": 60,\n   \"subscriptionsEndDate\": 25,\n   \"activeSubscriptionsEndDate\": 250,\n   \"inactiveSubscriptionsEndDate\": 25\n}","schema":{"title":"Success-Response:","type":"object","properties":{"sent":{"type":"number","description":"<p>total sent count in channel</p>"},"delivered":{"type":"number","description":"<p>total delivered count in channel</p>"},"clicked":{"type":"number","description":"<p>total clicked count in channel</p>"},"optIns":{"type":"number","description":"<p>total optIns count in channel</p>"},"optOuts":{"type":"number","description":"<p>total optOuts count in channel</p>"},"confirmAlerts":{"type":"number","description":"<p>total confirmAlerts count in channel</p>"},"subscriptionsEndDate":{"type":"number","description":"<p>total subscriptionsEndDate count in channel</p>"},"activeSubscriptionsEndDate":{"type":"number","description":"<p>total activeSubscriptionsEndDate count in channel</p>"},"inactiveSubscriptionsEndDate":{"type":"number","description":"<p>total inactiveSubscriptionsEndDate count in channel</p>"}},"required":["sent","delivered","clicked","optIns","optOuts","confirmAlerts","subscriptionsEndDate","activeSubscriptionsEndDate","inactiveSubscriptionsEndDate"]}}},"description":"Success-Response:"}}}},"/channel/{id}/subscription-count":{"get":{"tags":["Channels"],"summary":"GetChannelSubscriptionCount","description":"Get subscription count","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"filters","description":"Array of filter objects containing multiple fields with relations (e.g.: [{ field: 'customAttributes.userId', value: 123, relation: 'eq' }, { field: 'customAttributes.age', value: 18, relation: 'gt' }]). Available relations: eq: equals, ne: not equals, gt: greater than, gte: greater than or equals, lt: lesser than, lte: lesser than or equals. Can't be used together with 'customAttributes' parameter."},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"tags","description":"Targeting: array of tag IDs."},{"schema":{"type":"string"},"in":"query","name":"tagsLogic","description":"One of: 'and', 'or', default: 'or'"},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"topics","description":"Targeting: array of topic IDs. Include null to match subscriptions without any topics."},{"schema":{"type":"string"},"in":"query","name":"topicsLogic","description":"One of: 'and', 'or', default: 'or'"},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"platform","description":"Targeting: array of platform names (case-sensitive, e.g. &quot;Android&quot;, &quot;Mac OS&quot;, ..)."},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"browser","description":"Targeting: array of browser names (case-sensitive, e.g. &quot;Chrome&quot;, &quot;Firefox&quot;, ..)."},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"country","description":"Targeting: array of country IDs (e.g. &quot;US&quot;, &quot;DE&quot;, ..)."},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"language","description":"Targeting: array of language IDs (e.g. &quot;en&quot;, &quot;de&quot;, ..)."}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"subscriptions\": 123,\n  \"inactiveSubscriptions\": 123\n}","schema":{"title":"Success-Response:","type":"object","properties":{"subscriptions":{"type":"number","description":""},"inactiveSubscriptions":{"type":"number"}},"required":["subscriptions"]}}},"description":"Success-Response:"}}}},"/channel/{id}/subscriptions":{"get":{"tags":["Channels"],"summary":"GetChannelSubscriptions","description":"Get channel subscriptions","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"subscriptionIds","description":"Array of subscription IDs"},{"schema":{"type":"string"},"in":"query","name":"startId","description":"Start subscription ID (it will only work if you have not passed subscriptionIds)"},{"schema":{"type":"string"},"in":"query","name":"endId","description":"End subscription ID (it will only work if you have not passed subscriptionIds)"},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"fields","description":"Provide additional fields (can contain: customAttributes, tags, topics, segments, country, language, createdAt, clickedDates). Wait time until response will increase if more fields will be requested."},{"schema":{"type":"string"},"in":"query","name":"since","description":"Return only subscriptions created since specified UNIX timestamp (in milliseconds). Can use either since or updatedSince."},{"schema":{"type":"string"},"in":"query","name":"updatedSince","description":"Return only subscriptions last updated since specified UNIX timestamp (in milliseconds). Can use either since or updatedSince."},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"tags","description":"Targeting: array of tag IDs."},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"topics","description":"Targeting: array of topic IDs."},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"segments","description":"Targeting: array of segment IDs."},{"schema":{"type":"string"},"in":"query","name":"customAttributes[user_id]","description":"Targeting: Search for subscriptions with custom attribute user_id"},{"schema":{"type":"string"},"in":"query","name":"onlyUnsubscribed","description":"For email channels: Return only unsubscribed subscriptions"}],"responses":{"200":{"content":{"application/json":{"example":" HTTP/1.1 200 OK\n {\n \"subscriptions\": [\n    {\n      \"_id\" : \"XXXXXXXXXXXXXX\",\n      \"createdAt\" : \"2022-01-11T10:44:30.866Z\",\n      \"syncedAt\" : \"2022-01-11T11:41:06.181Z\",\n      \"channel\" : \"XXXXXXXXXXXXXX\",\n      \"browserType\" : \"Chrome\",\n      \"browserVersion\" : \"97\",\n      \"platformName\" : \"Mac OS\",\n      \"platformVersion\" : \"10\",\n      \"language\" : \"de\",\n      \"country\" : \"DE\",\n      \"timezone\" : \"Europe/Berlin\",\n      \"inactive\" : false,\n      \"topics\" : [],\n      \"type\" : \"web\",\n      \"segments\" : []\n    }\n  ]\n}","schema":{"title":"Success-Response:","type":"object","properties":{"subscriptions":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"createdAt":{"type":"string"},"syncedAt":{"type":"string"},"channel":{"type":"string"},"browserType":{"type":"string"},"browserVersion":{"type":"string"},"platformName":{"type":"string"},"platformVersion":{"type":"string"},"language":{"type":"string"},"country":{"type":"string"},"timezone":{"type":"string"},"inactive":{"type":"boolean"},"topics":{"type":"array","items":{}},"type":{"type":"string"},"segments":{"type":"array","items":{}}}},"description":"<p>Array of subscriptions connected to specified channel</p>"}},"required":["subscriptions"]}}},"description":"Success-Response:"}}}},"/channel/{id}/subscriptions/update":{"post":{"tags":["Channels"],"summary":"GetChannelUpdateSubscriptions","description":"Mass update subscriptions","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true,\n  \"updated\": 123,\n  \"skippedProtected\": 0\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean"},"updated":{"type":"number","description":""},"skippedProtected":{"type":"number","description":"<p>Number of update entries that targeted an overwrite-protected attribute and were left unchanged because no forceOverwrite was provided.</p>"}},"required":["updated","skippedProtected"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"title":"Remove subscription segments by using attribute \"user_id\":","type":"object","properties":{"updates":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"number"},"removeSegments":{"type":"array","items":{"type":"string"}}}},"description":"<p>Array of updates (see example below). Maximum allowed updates per request: 50.000</p>"}}},"examples":{"0":{"summary":"Update an attribute by using attribute \"user_id\":","value":"{\n  \"updates\": [\n    { \"field\": \"customAttributes.user_id\", \"value\": 123, \"update\": { \"customAttributes.categories\": [\"CATEGORY_1\"] } }\n  ]\n}"},"1":{"summary":"Update an attribute by using subscription id:","value":"{\n  \"updates\": [\n    { \"field\": \"_id\", \"value\": \"XXXXXXXXX\", \"update\": { \"customAttributes.user_id\": \"USER_ID\" } }\n  ]\n}"},"2":{"summary":"Overwrite a protected \"user_id\" attribute by using subscription id:","value":"{\n  \"updates\": [\n    { \"field\": \"_id\", \"value\": \"XXXXXXXXX\", \"forceOverwrite\": true, \"update\": { \"customAttributes.user_id\": \"USER_ID\" } }\n  ]\n}\n// forceOverwrite only applies to the \"user_id\" attribute and only when matching by \"_id\".\n// Without it, an overwrite-protected attribute keeps its existing value when one is already set."},"3":{"summary":"Add subscription tag by using attribute \"user_id\":","value":"{\n  \"updates\": [\n    { \"field\": \"customAttributes.user_id\", \"value\": 123, \"tag\": \"TAG_ID\" }\n  ]\n}"},"4":{"summary":"Set subscription topics by using attribute \"user_id\":","value":"{\n  \"updates\": [\n    { \"field\": \"customAttributes.user_id\", \"value\": 123, \"topics\": [\"TOPIC_ID_1\", \"TOPIC_ID_2\"] }\n  ]\n}"},"5":{"summary":"Add subscription topics by using attribute \"user_id\":","value":"{\n  \"updates\": [\n    { \"field\": \"customAttributes.user_id\", \"value\": 123, \"addTopics\": [\"TOPIC_ID_1\", \"TOPIC_ID_2\"] }\n  ]\n}"},"6":{"summary":"Remove subscription topics by using attribute \"user_id\":","value":"{\n  \"updates\": [\n    { \"field\": \"customAttributes.user_id\", \"value\": 123, \"removeTopics\": [\"TOPIC_ID_1\", \"TOPIC_ID_2\"] }\n  ]\n}"},"7":{"summary":"Set subscription tags by using subscription id:","value":"{\n  \"updates\": [\n    { \"field\": \"_id\", \"value\": \"XXXXXXXXX\", \"tags\": [\"TAG_ID_1\", \"TAG_ID_2\"] }\n  ]\n}"},"8":{"summary":"Add subscription tags by using attribute \"user_id\":","value":"{\n  \"updates\": [\n    { \"field\": \"customAttributes.user_id\", \"value\": 123, \"addTags\": [\"TAG_ID_1\", \"TAG_ID_2\"] }\n  ]\n}"},"9":{"summary":"Remove subscription tags by using attribute \"user_id\":","value":"{\n  \"updates\": [\n    { \"field\": \"customAttributes.user_id\", \"value\": 123, \"removeTags\": [\"TAG_ID_1\", \"TAG_ID_2\"] }\n  ]\n}"},"10":{"summary":"Add subscription tags by externalId using attribute \"user_id\":","value":"{\n  \"updates\": [\n    { \"field\": \"customAttributes.user_id\", \"value\": 123, \"addTagExternalIds\": [\"EXT_TAG_ID_1\", \"EXT_TAG_ID_2\"] }\n  ]\n}"},"11":{"summary":"Remove subscription tags by externalId using attribute \"user_id\":","value":"{\n  \"updates\": [\n    { \"field\": \"customAttributes.user_id\", \"value\": 123, \"removeTagExternalIds\": [\"EXT_TAG_ID_1\", \"EXT_TAG_ID_2\"] }\n  ]\n}"},"12":{"summary":"Add single tag by externalId using attribute \"user_id\":","value":"{\n  \"updates\": [\n    { \"field\": \"customAttributes.user_id\", \"value\": 123, \"tagExternalId\": \"EXT_TAG_ID_1\" }\n  ]\n}"},"13":{"summary":"Set subscription segments by using subscription id:","value":"{\n  \"updates\": [\n    { \"field\": \"_id\", \"value\": \"XXXXXXXXX\", \"segments\": [\"SEGMENT_ID_1\", \"SEGMENT_ID_2\"] }\n  ]\n}"},"14":{"summary":"Add subscription segments by using attribute \"user_id\":","value":"{\n  \"updates\": [\n    { \"field\": \"customAttributes.user_id\", \"value\": 123, \"addSegments\": [\"SEGMENT_ID_1\", \"SEGMENT_ID_2\"] }\n  ]\n}"},"15":{"summary":"Remove subscription segments by using attribute \"user_id\":","value":"{\n  \"updates\": [\n    { \"field\": \"customAttributes.user_id\", \"value\": 123, \"removeSegments\": [\"SEGMENT_ID_1\", \"SEGMENT_ID_2\"] }\n  ]\n}"}}}},"description":"Remove subscription segments by using attribute \"user_id\":"}}},"/channel/{id}/follow-up-campaign/{campaignId}":{"get":{"tags":["Channels"],"summary":"GetFollowUpCampaign","description":"Get follow up campaign","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"Channel ID","required":true},{"schema":{"type":"string"},"in":"path","name":"campaignId","description":"Follow up campaign ID","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"_id\": \"xxx\",\n  \"name\": \"xxx\",\n  \"notifications\": [\n     {\n        \"_id\": \"xxxxxxxxxxxx\",\n        \"title\": \"xxxxxxxxxxxx\",\n        \"url\": \"http://cleverpush.com\",\n        \"sent\": 0,\n        \"delivered\": 0,\n        \"clicked\": 0\n     }\n   ]\n}","schema":{"title":"Success-Response:","type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"notifications":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"sent":{"type":"number"},"delivered":{"type":"number"},"clicked":{"type":"number"}}}},"campaign":{"type":"object","properties":{},"description":"<p>Object with targetted campaign data corresponding to channel</p>"}},"required":["campaign"]}}},"description":"Success-Response:"}}}},"/channel/{id}/follow-up-campaigns":{"get":{"tags":["Channels"],"summary":"GetFollowUpCampaigns","description":"Get follow up campaigns","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"Channel ID","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"campaigns\": [\n     {\n       \"_id\": \"xxxxxxxxxxx\",\n       \"name\": \"xxxxxxxxxx\"\n     }\n ]\n}","schema":{"title":"Success-Response:","type":"object","properties":{"campaigns":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"}}},"description":"<p>Array of Objects containing data for each campaign corresponding to the channel</p>"}},"required":["campaigns"]}}},"description":"Success-Response:"}}}},"/channel/{id}/geo-fence/{geoFenceId}":{"get":{"tags":["Channels"],"summary":"GetGeoFence","description":"Get geo fence","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"Channel ID","required":true},{"schema":{"type":"string"},"in":"path","name":"geoFenceId","description":"Geo Fence ID","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"_id\": \"xxx\",\n  \"name\": \"xxx\",\n  \"latitude\": 1.0000,\n  \"longitude\": 1.0000,\n  \"radius\": 500\n}","schema":{"title":"Success-Response:","type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"},"radius":{"type":"number"},"geoFence":{"type":"object","properties":{},"description":"<p>Object containing data about targetted geographical information</p>"}},"required":["geoFence"]}}},"description":"Success-Response:"}}}},"/channel/{id}/geo-fences":{"get":{"tags":["Channels"],"summary":"GetGeoFences","description":"Get geo fences","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"Channel ID","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"geoFences\": [\n     {\n        \"_id\": \"xxxxxxxxxxx\",\n        \"name\": \"xxxxxxxxxx\",\n        \"latitude\": 1.0000,\n        \"longitude\": 1.0000,\n        \"radius\": 500\n     }\n   ]\n}","schema":{"title":"Success-Response:","type":"object","properties":{"geoFences":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"},"radius":{"type":"number"}}},"description":"<p>Array of geographical informations corresponding to the specified channel</p>"}},"required":["geoFences"]}}},"description":"Success-Response:"}}}},"/channel/{id}/stories":{"get":{"tags":["Channels"],"summary":"GetStories","description":"Get stories","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"query","name":"limit","description":"Used for pagination. Default: 50, Max: 100"},{"schema":{"type":"string"},"in":"query","name":"skip","description":"Used for pagination. Default: 0"},{"schema":{"type":"string"},"in":"query","name":"category","description":"Used for filter category"}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"stories\": [\n     {\n        \"_id\": \"xxxxxxxxxxx\",\n        \"title\": \"xxxxxxxxxx\",\n        \"content\": {},\n        \"content.pages\": [{}],\n        \"code\": \"<!doctype html> ...\"\n     }\n   ]\n}","schema":{"title":"Success-Response:","type":"object","properties":{"stories":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"},"content":{"type":"object","properties":{}},"content.pages":{"type":"array","items":{"type":"object","properties":{}}},"code":{"type":"string"}}},"description":"<p>Array of Objects representing stories data for specified channel</p>"}},"required":["stories"]}}},"description":"Success-Response:"}}}},"/channel/{id}/story/{storyId}":{"get":{"tags":["Channels"],"summary":"GetStory","description":"Get story","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"Channel ID","required":true},{"schema":{"type":"string"},"in":"path","name":"storyId","description":"Story ID","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"_id\": \"xxx\",\n  \"name\": \"xxx\"\n}","schema":{"title":"Success-Response:","type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"story":{"type":"object","properties":{},"description":"<p>Object containing data for a specified channel story</p>"}},"required":["story"]}}},"description":"Success-Response:"}}}},"/channel/{id}/conversations":{"get":{"tags":["Chat"],"summary":"GetConversations","description":"Get conversations","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"Channel ID","required":true},{"schema":{"type":"string"},"in":"query","name":"archived","description":"Archived conversations"},{"schema":{"type":"string"},"in":"query","name":"offset","description":"How many conversations to skip. Default: 0"},{"schema":{"type":"string"},"in":"query","name":"limit","description":"How many conversations to get. Default: 10"},{"schema":{"type":"string"},"in":"query","name":"startDate","description":"Start date timestamp"},{"schema":{"type":"string"},"in":"query","name":"endDate","description":"End date timestamp"},{"schema":{"type":"string"},"in":"query","name":"filterBy","description":"('updatedAt' | 'createdAt') which field you want to filter with date. By default: 'createdAt' (it will only work when you have passed startDate and endDate)"}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n \"conversations\": [\n  {\n   \"id\": \"cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n   \"channel\": \"cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n   \"name\": \"Conversation name\",\n   \"lastMsgSeen\": true,\n   \"updatedAt\": \"2022-02-01T00:00:00.000Z\",\n   \"lastMsg\": \"The mass of the present is wise, and not from the valley of the sniper, but not from want.\",\n   \"archived\": false,\n   \"isGuest\": false,\n   \"createdAt\": \"2022-01-01T00:00:00.000Z\",\n   \"status\": \"active\",\n   \"phone\": \"+49********13\",\n   \"type\": \"whatsapp\"\n  },\n  {\n   \"id\": \"cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n   \"channel\": \"cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n   \"name\": \"Conversation name\",\n   \"lastMsgSeen\": true,\n   \"updatedAt\": \"2022-02-01T00:00:00.000Z\",\n   \"lastMsg\": \"The mass of the present is wise, and not from the valley of the sniper, but not from want.\",\n   \"archived\": false,\n   \"isGuest\": false,\n   \"createdAt\": \"2022-01-01T00:00:00.000Z\",\n   \"status\": \"inactive\"\n  }\n ],\n \"count\": 2\n}","schema":{"title":"Success-Response:","type":"object","properties":{"conversations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"type":"string"},"name":{"type":"string"},"lastMsgSeen":{"type":"boolean"},"updatedAt":{"type":"string"},"lastMsg":{"type":"string"},"archived":{"type":"boolean"},"isGuest":{"type":"boolean"},"createdAt":{"type":"string"},"status":{"type":"string"},"phone":{"type":"string"},"type":{"type":"string"}},"required":["id","channel","name","lastMsgSeen","updatedAt","lastMsg","archived","isGuest","createdAt","status"]},"description":"<p>array</p>"},"count":{"type":"number"}},"required":["conversations"]}}},"description":"Success-Response:"}}}},"/channel/{id}/conversation/{conversationId}/messages":{"get":{"tags":["Chat"],"summary":"GetMessages","description":"Get messages","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"Channel ID","required":true},{"schema":{"type":"string"},"in":"path","name":"conversationId","description":"Conversation ID","required":true},{"schema":{"type":"string"},"in":"query","name":"offset","description":"How many messages to skip. Default: 0"},{"schema":{"type":"string"},"in":"query","name":"limit","description":"How many messages to get. Default: 10"},{"schema":{"type":"string"},"in":"query","name":"startDate","description":"Start date timestamp"},{"schema":{"type":"string"},"in":"query","name":"endDate","description":"End date timestamp"}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n \"messages\": [\n  {\n   \"id\": \"cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n   \"channel\": \"cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n   \"name\": \"John Doe\",\n   \"fromChannel\": true,\n   \"createdAt\": \"2022-01-01T00:00:00.000Z\",\n   \"text\": \"The mass of the present is wise, and not from the valley of the sniper, but not from want.\",\n   \"read\": true,\n   \"conversation\": \"cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n   \"phone\": \"+49*********13\"\n  },\n  {\n   \"id\": \"cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n   \"channel\": \"cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n   \"name\": \"Jack Denial\",\n   \"fromChannel\": false,\n   \"createdAt\": \"2022-01-01T00:00:00.000Z\",\n   \"text\": \"The mass of the present is wise, and not from the valley of the sniper, but not from want.\",\n   \"read\": false,\n   \"conversation\": \"cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n  }\n ],\n \"count\": 2\n}","schema":{"title":"Success-Response:","type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"type":"string"},"name":{"type":"string"},"fromChannel":{"type":"boolean"},"createdAt":{"type":"string"},"text":{"type":"string"},"read":{"type":"boolean"},"conversation":{"type":"string"},"phone":{"type":"string"}},"required":["id","channel","name","fromChannel","createdAt","text","read","conversation"]},"description":"<p>array</p>"},"count":{"type":"number"}},"required":["messages"]}}},"description":"Success-Response:"}}}},"/":{"get":{"tags":["Class_definitions"],"summary":"MessengerReactionAction","description":"MessengerReactionAction","parameters":[],"responses":{"200":{"content":{"application/json":{"example":"{\n     \"type\": \"reaction\",\n     \"title\": \"😂\"\n}","schema":{"title":"{","type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"messengerReactionAction":{"type":"object","properties":{}}},"required":["messengerReactionAction"]}}},"description":"{"}}}},"/channel/{id}/deep-links":{"post":{"tags":["Deep_Links"],"summary":"CreateDeepLink","description":"Create Deep link","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"id\": \"xxxxxxxxxxxxxxx\"\n}","schema":{"title":"Success-Response:","type":"object","properties":{"id":{"type":"string","description":""}},"required":["id"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"shortLinkUrlPath":{"type":"string","description":"<p>Short link url path</p>"},"iosBehavior":{"type":"string","description":"<p>Ios Behavior</p>"},"androidBehavior":{"type":"string","description":"<p>Android Behavior</p>"},"fallbackUrl":{"type":"string","description":"<p>Fallback Url</p>"},"androidDeepLinkUrl":{"type":"string","description":"<p>Android Deep Link Url</p>"},"iosDeepLinkUrl":{"type":"string","description":"<p>Ios Deep Link Url</p>"},"utmParams":{"type":"object","properties":{"utmSource":{"type":"string","description":"<p>Utm Source</p>"},"utmMedium":{"type":"string","description":"<p>Utm Medium</p>"},"utmCampaign":{"type":"string","description":"<p>Utm Campaign</p>"}},"description":"<p>Utm Params</p>"}},"type":"object","required":["shortLinkUrlPath","iosBehavior","androidBehavior","fallbackUrl"]}}}}},"get":{"tags":["Deep_Links"],"summary":"GetDeepLinks","description":"Get Deep links","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"deepLinks\": [\n    {\n        \"_id\": \"xxxxxxxxxxxxxxxxx\",\n        \"shortLinkUrlPath\":\"/param\",\n        \"androidDeepLinkUrl\":\"https://example.com\",\n        \"iosDeepLinkUrl\":\"https://example.com\",\n        \"url\":\"https://example.com\",\n        \"iosBehavior\":\"string\",\n        \"androidBehavior\":\"string\",\n        \"utmParams\":{\n          \"utmSource\":\"string\",\n          \"utmMedium\":\"string\",\n          \"utmCampaign\":\"string\"\n        },\n        \"fallbackUrl\":\"https://example.com\",\n        \"channel\":\"xxxxxxxxxxxxxxxxx\",\n        \"createdAt\":\"2018-01-01T12:00:00.000Z\",\n        \"clicked\":0\n    }\n  ]\n}","schema":{"title":"Success-Response:","type":"object","properties":{"deepLinks":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string","description":"<p>Deep Link ID</p>"},"shortLinkUrlPath":{"type":"string","description":"<p>Short link url path</p>"},"androidDeepLinkUrl":{"type":"string","description":"<p>Android Deep Link Url</p>"},"iosDeepLinkUrl":{"type":"string","description":"<p>Ios Deep Link Url</p>"},"url":{"type":"string","description":"<p>Deep link url</p>"},"iosBehavior":{"type":"string","description":"<p>Ios Behavior</p>"},"androidBehavior":{"type":"string","description":"<p>Android Behavior</p>"},"utmParams":{"type":"object","properties":{"utmSource":{"type":"string","description":"<p>Utm Source</p>"},"utmMedium":{"type":"string","description":"<p>Utm Medium</p>"},"utmCampaign":{"type":"string","description":"<p>Utm Campaign</p>"}},"description":"<p>Utm Params</p>","required":["utmSource","utmMedium","utmCampaign"]},"fallbackUrl":{"type":"string","description":"<p>Fallback Url</p>"},"channel":{"type":"string","description":"<p>Channel's ID</p>"},"createdAt":{"type":"string","description":"<p>Created date</p>"},"clicked":{"type":"string","description":"<p>Click count</p>"}},"required":["_id","channel","shortLinkUrlPath","iosBehavior","url","androidBehavior","androidDeepLinkUrl","iosDeepLinkUrl","utmParams","fallbackUrl","clicked","createdAt"]},"description":"<p>Array of Objects with deep link data</p>"}},"required":["deepLinks"]}}},"description":"Success-Response:"}}}},"/channel/{channelid}/deep-link/{id}":{"delete":{"tags":["Deep_Links"],"summary":"DeleteDeepLink","description":"Delete Deep link","parameters":[{"schema":{"type":"string"},"in":"path","name":"channelid","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"path","name":"id","description":"The deep link id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}}},"get":{"tags":["Deep_Links"],"summary":"GetDeepLink","description":"Get Deep link","parameters":[{"schema":{"type":"string"},"in":"path","name":"channelid","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"path","name":"id","description":"The deep link id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"deepLink\": {\n      \"_id\": \"xxxxxxxxxxxxxxxxx\",\n      \"shortLinkUrlPath\": \"/param\",\n      \"androidDeepLinkUrl\":\"https://example.com\",\n      \"iosDeepLinkUrl\":\"https://example.com\",\n      \"url\":\"https://example.com\",\n      \"iosBehavior\":\"string\",\n      \"androidBehavior\":\"string\",\n      \"utmParams\": {\n        \"utmSource\":\"string\",\n        \"utmMedium\":\"string\",\n        \"utmCampaign\":\"string\"\n      },\n      \"fallbackUrl\":\"https://example.com\",\n      \"channel\":\"xxxxxxxxxxxxxxxxx\",\n      \"createdAt\":\"2018-01-01T12:00:00.000Z\",\n      \"clicked\":0\n  }\n}","schema":{"title":"Success-Response:","type":"object","properties":{"deepLink":{"type":"object","properties":{"_id":{"type":"string","description":"<p>Deep Link ID</p>"},"shortLinkUrlPath":{"type":"string","description":"<p>Short link url path</p>"},"androidDeepLinkUrl":{"type":"string","description":"<p>Android Deep Link Url</p>"},"iosDeepLinkUrl":{"type":"string","description":"<p>Ios Deep Link Url</p>"},"url":{"type":"string","description":"<p>Deep link url</p>"},"iosBehavior":{"type":"string","description":"<p>Ios Behavior</p>"},"androidBehavior":{"type":"string","description":"<p>Android Behavior</p>"},"utmParams":{"type":"object","properties":{"utmSource":{"type":"string","description":"<p>Utm Source</p>"},"utmMedium":{"type":"string","description":"<p>Utm Medium</p>"},"utmCampaign":{"type":"string","description":"<p>Utm Campaign</p>"}},"description":"<p>Utm Params</p>","required":["utmSource","utmMedium","utmCampaign"]},"fallbackUrl":{"type":"string","description":"<p>Fallback Url</p>"},"channel":{"type":"string","description":"<p>Channel's ID</p>"},"createdAt":{"type":"string","description":"<p>Created date</p>"},"clicked":{"type":"string","description":"<p>Click count</p>"}},"description":"<p>Object with targetted deep link data</p>","required":["_id","channel","shortLinkUrlPath","androidDeepLinkUrl","iosDeepLinkUrl","iosBehavior","androidBehavior","url","utmParams","fallbackUrl","clicked","createdAt"]}},"required":["deepLink"]}}},"description":"Success-Response:"}}},"post":{"tags":["Deep_Links"],"summary":"UpdateDeepLink","description":"Update Deep link","parameters":[{"schema":{"type":"string"},"in":"path","name":"channelid","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"path","name":"id","description":"The deep link id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"channel":{"type":"string","description":"<p>Channel's ID</p>"},"shortLinkUrlPath":{"type":"string","description":"<p>Short link url path</p>"},"androidBehavior":{"type":"string","description":"<p>Android Behavior</p>"},"iosBehavior":{"type":"string","description":"<p>Ios Behavior</p>"},"url":{"type":"string","description":"<p>Deep link url</p>"},"fallbackUrl":{"type":"string","description":"<p>Fallback Url</p>"},"androidDeepLinkUrl":{"type":"string","description":"<p>Android Deep Link Url</p>"},"iosDeepLinkUrl":{"type":"string","description":"<p>Ios Deep Link Url</p>"},"utmParams":{"type":"object","properties":{"utmSource":{"type":"string","description":"<p>Utm Source</p>"},"utmMedium":{"type":"string","description":"<p>Utm Medium</p>"},"utmCampaign":{"type":"string","description":"<p>Utm Campaign</p>"}},"description":"<p>Utm Params</p>"}},"type":"object","required":["channel","shortLinkUrlPath","androidBehavior","iosBehavior","url","fallbackUrl"]}}}}}},"/channel/{channelId}/email/set-attributes":{"get":{"tags":["Email"],"summary":"EmailSetAttributes","description":"Set subscription attributes via email link","parameters":[{"schema":{"type":"string"},"in":"path","name":"channelId","description":"The ID of the channel","required":true},{"schema":{"type":"string"},"in":"query","name":"subscriptionId","description":"The subscription ID to set attributes for","required":true},{"schema":{"type":"string"},"in":"query","name":"redirectUrl","description":"URL to redirect to after setting attributes. Use 'doubleOptIn' to redirect to the email confirmation page"},{"schema":{"type":"string"},"in":"query","name":"customAttributes","description":"Custom attributes to set using bracket notation (e.g., customAttributes[user_id]=123&amp;customAttributes[firstname]=Max)"}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true,\n  \"attributesSet\": 2\n}","schema":{"title":"Success-Response (without redirect):","type":"object","properties":{"success":{"type":"boolean"},"attributesSet":{"type":"number"}}}}},"description":"Success-Response (without redirect):"}}}},"/channel/{id}/email-opt-in-forms":{"get":{"tags":["Email"],"summary":"Get_all_email_opt-in_forms","description":"Get all email opt-in forms","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"emailOptInForms\": [\n       {\n           \"channels\": [\"xxxxx\"],\n           \"name\": \"xxxxx\",\n           \"fields\": [{}],\n           \"emailOptInRoutineId\": \"xxxxx\",\n           \"checkboxEnabled\": false,\n           \"checkboxText\": \"xxxxx\",\n           \"tags\": [\"xxxxx\"],\n           \"headlineStyle\": {},\n           \"descriptionStyle\": {},\n           \"fieldStyle\": {},\n           \"labelStyle\": {},\n           \"inputStyle\": {},\n           \"buttonStyle\": {},\n           \"buttonContent\": \"xxxxx\",\n           \"topicStyle\": {},\n           \"topicElementStyle\": {},\n           \"enabledEditOptInForm\": false,\n           \"emailTemplateId\": \"xxxxx\",\n           \"editOptInFormFields\": [{}],\n           \"createdAt\": \"2021-06-24T00:00:00.000+0000\"\n       }\n   ]\n}","schema":{"title":"Success-Response:","type":"object","properties":{"emailOptInForms":{"type":"array","items":{"type":"object","properties":{"channels":{"type":"array","items":{"type":"string"}},"name":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{}}},"emailOptInRoutineId":{"type":"string"},"checkboxEnabled":{"type":"boolean"},"checkboxText":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"headlineStyle":{"type":"object","properties":{}},"descriptionStyle":{"type":"object","properties":{}},"fieldStyle":{"type":"object","properties":{}},"labelStyle":{"type":"object","properties":{}},"inputStyle":{"type":"object","properties":{}},"buttonStyle":{"type":"object","properties":{}},"buttonContent":{"type":"string"},"topicStyle":{"type":"object","properties":{}},"topicElementStyle":{"type":"object","properties":{}},"enabledEditOptInForm":{"type":"boolean"},"emailTemplateId":{"type":"string"},"editOptInFormFields":{"type":"array","items":{"type":"object","properties":{}}},"createdAt":{"type":"string"}}},"description":"<p>Array of objects with email opt-in forms data</p>"}},"required":["emailOptInForms"]}}},"description":"Success-Response:"}}}},"/channel/{id}/email-opt-in-routines":{"get":{"tags":["Email"],"summary":"Get_all_email_opt-in_routines","description":"Get all email opt-in routines","parameters":[{"schema":{"type":"string"},"in":"header","name":"Authorization","description":"Private API key","required":true},{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"emailOptInRoutines\": [\n       {\n           \"channels\": [\"xxxxx\"],\n           \"name\": \"xxxxx\",\n           \"subject\": \"xxxxx\",\n           \"emailAccountId\": \"xxxxx\",\n           \"smsProviderId\": \"xxxxx\",\n           \"content\": \"xxxxx\",\n           \"contentState\": {},\n           \"pendingPageUrl\": \"xxxxx\",\n           \"successPageUrl\": \"xxxxx\",\n           \"createdAt\": \"2021-06-24T00:00:00.000+0000\"\n       }\n   ]\n}","schema":{"title":"Success-Response:","type":"object","properties":{"emailOptInRoutines":{"type":"array","items":{"type":"object","properties":{"channels":{"type":"array","items":{"type":"string"}},"name":{"type":"string"},"subject":{"type":"string"},"emailAccountId":{"type":"string"},"smsProviderId":{"type":"string"},"content":{"type":"string"},"contentState":{"type":"object","properties":{}},"pendingPageUrl":{"type":"string"},"successPageUrl":{"type":"string"},"createdAt":{"type":"string"}}},"description":"<p>Array of objects with email opt-in routines data</p>"}},"required":["emailOptInRoutines"]}}},"description":"Success-Response:"}}}},"/email-accounts/create":{"post":{"tags":["Email_accounts"],"summary":"Create_email_Account","description":"Create email account","parameters":[],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"id\": \"xxx\"\n}","schema":{"title":"Success-Response:","type":"object","properties":{"id":{"type":"string","description":""}},"required":["id"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"channels":{"items":{"type":"string","description":"<p>ChannelIds of the email account</p>"},"type":"array","description":"<p>ChannelIds of the email account</p>"},"hostName":{"type":"string","description":"<p>The email hostname.</p>"},"port":{"type":"number","description":"<p>The email port.</p>"},"username":{"type":"string","description":"<p>The email username.</p>"},"password":{"type":"string","description":"<p>The email password.</p>"},"email":{"type":"string","description":"<p>The email address.</p>"},"name":{"type":"string","description":"<p>The sender name.</p>"}},"type":"object","required":["channels","hostName","port","username","password","email","name"]}}}}}},"/email-accounts/{id}":{"delete":{"tags":["Email_accounts"],"summary":"Delete_email_account","description":"Delete email account","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The email account id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}}},"post":{"tags":["Email_accounts"],"summary":"Update_email_account","description":"Update email account","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The email account id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"channels":{"items":{"type":"string","description":"<p>ChannelIds of the email account</p>"},"type":"array","description":"<p>ChannelIds of the email account</p>"},"hostName":{"type":"string","description":"<p>The email hostname.</p>"},"port":{"type":"number","description":"<p>The email port.</p>"},"username":{"type":"string","description":"<p>The email username.</p>"},"password":{"type":"string","description":"<p>The email password.</p>"},"email":{"type":"string","description":"<p>The email address.</p>"},"name":{"type":"string","description":"<p>The sender name.</p>"}},"type":"object"}}}}}},"/email-accounts/":{"get":{"tags":["Email_accounts"],"summary":"Get_email_accounts","description":"Get all email accounts","parameters":[],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"emailAccounts\": [\n       {\n           \"channels\": [],\n           \"hostName\": \"xxx\",\n           \"port\": 0,\n           \"username\": \"xxx\",\n           \"password\": \"xxx\",\n           \"email\": \"xxx\",\n           \"name\": \"xxx\",\n           \"createdAt\": \"2021-06-24T00:00:00.000+0000\",\n           \"updatedAt\": \"2021-06-24T00:00:00.000+0000\"\n       }\n   ]\n}","schema":{"title":"Success-Response:","type":"object","properties":{"emailAccounts":{"type":"array","items":{"type":"object","properties":{"channels":{"type":"array","items":{}},"hostName":{"type":"string"},"port":{"type":"number"},"username":{"type":"string"},"password":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}}},"description":"<p>Array of objects with email account data</p>"}},"required":["emailAccounts"]}}},"description":"Success-Response:"}}}},"/channel/{id}/email-template/{templateId}":{"get":{"tags":["Email_templates"],"summary":"GetEmailTemplate","description":"Get email template","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"path","name":"templateId","description":"The email template id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"template\": {\n    \"_id\": \"xxxxxxxxxxxxxxxxx\",\n    \"channels\": [\"xxxxxxxxxxxxxxxxx\"],\n    \"name\": \"Daily Newsletter\",\n    \"version\": 2,\n    \"emailTemplate\": {\n      \"subject\": \"Daily Newsletter\",\n      \"content\": {\n        \"elements\": [\n          {\n            \"id\": \"html-block\",\n            \"type\": \"html\",\n            \"content\": \"\\u003c!-- DAILY_BLOCK_START --\\u003e<p>...</p>\\u003c!-- DAILY_BLOCK_END --\\u003e\"\n          }\n        ]\n      }\n    }\n  }\n}","schema":{"title":"Success-Response:","type":"object","properties":{"template":{"type":"object","properties":{"_id":{"type":"string"},"channels":{"type":"array","items":{"type":"string"}},"name":{"type":"string"},"version":{"type":"number"},"emailTemplate":{"type":"object","properties":{"subject":{"type":"string"},"content":{"type":"object","properties":{"elements":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"content":{"type":"string"}}}}}}}}},"description":"<p>The requested email template document.</p>"}},"required":["template"]}}},"description":"Success-Response:"}}},"patch":{"tags":["Email_templates"],"summary":"UpdateEmailTemplate","description":"Update email template","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"path","name":"templateId","description":"The email template id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":"<p>True if the template was updated successfully.</p>"}},"required":["success"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string","description":"<p>The template name.</p>"},"subject":{"type":"string","description":"<p>The email subject.</p>"},"preHeader":{"type":"string","description":"<p>The email preheader.</p>"},"content":{"type":"object","properties":{},"description":"<p>The structured email editor content. HTML blocks are stored in content.elements entries with type &quot;html&quot; and field &quot;content&quot;.</p>"}},"type":"object"}}}}}},"/channel/{id}/email-template/{templateId}/html-section":{"post":{"tags":["Email_templates"],"summary":"ReplaceEmailTemplateHtmlSection","description":"Replace marked email template HTML section","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"path","name":"templateId","description":"The email template id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true,\n  \"jobId\": \"XXXXXXXX\"\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":"<p>True if the template was updated successfully.</p>"},"jobId":{"type":"string"},"replacedSections":{"type":"number","description":"<p>Number of marked sections replaced.</p>"}},"required":["success","replacedSections"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"sections":{"type":"array","items":{"type":"object","properties":{"html":{"type":"string","description":"<p>The new HTML block to inject between the markers.</p>"},"startMarker":{"type":"string","description":"<p>Start marker in an editor element's content field.</p>"},"endMarker":{"type":"string","description":"<p>End marker in an editor element's content field.</p>"}},"required":["html","startMarker","endMarker"]},"description":"<p>Multiple HTML blocks to inject between marker pairs.</p>"},"html":{"type":"string","description":"<p>Backward-compatible single HTML block to inject between the markers.</p>"},"startMarker":{"type":"string","description":"<p>Backward-compatible single start marker. Default: <code>&lt;!-- DAILY_BLOCK_START --&gt;</code></p>"},"endMarker":{"type":"string","description":"<p>Backward-compatible single end marker. Default: <code>&lt;!-- DAILY_BLOCK_END --&gt;</code></p>"},"replaceAll":{"type":"boolean","description":"<p>Replace every matching marked section instead of only the first one.</p>"},"processAsync":{"type":"boolean","description":"<p>Queue the update as a worker job. Set to false for immediate local testing.</p>"}},"type":"object"}}}}}},"/link-statistics/export":{"post":{"tags":["Link_Statistics"],"summary":"ExportLinkStatistics","description":"Export per-link statistics","parameters":[{"schema":{"type":"string"},"in":"header","name":"authorization","description":"Private API key","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{},"type":"object","required":[]}}}}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"channelIds":{"items":{"type":"string","description":"<p>Channel IDs (email channels only; uses all accessible email channels if empty)</p>"},"type":"array","description":"<p>Channel IDs (email channels only; uses all accessible email channels if empty)</p>"},"startDate":{"type":"number","description":"<p>Range start (UNIX timestamp)</p>"},"endDate":{"type":"number","description":"<p>Range end (UNIX timestamp)</p>"},"pickedColumns":{"items":{"type":"string","description":"<p>Optional column keys; default all; allowed values: notificationId, notificationTitle, sendDate, channelId, channelName, url, totalClicks, uniqueClicks</p>"},"type":"array","description":"<p>Optional column keys; default all; allowed values: notificationId, notificationTitle, sendDate, channelId, channelName, url, totalClicks, uniqueClicks</p>"},"exportDateFormat":{"type":"string","description":""},"timezone":{"type":"string","description":""},"testEmail":{"type":"string","description":"<p>Send download link to this address instead of the account email</p>"}},"type":"object","required":["startDate","endDate"]}}}}}},"/channel/{id}/notification-groups":{"post":{"tags":["Notification_groups"],"summary":"NotificationGroupCreate","description":"Create notification group","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true,\n  \"id\": \"XXXXXXXX\"\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":""},"id":{"type":"string"}},"required":["success"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string","description":"<p>The notification group name</p>"}},"type":"object","required":["name"]}}}}},"get":{"tags":["Notification_groups"],"summary":"NotificationGroupsGet","description":"Get notification groups","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"groups\": [\n    {\n      \"_id\": \"xxxxxxxxxxxxxxxxx\",\n      \"channel\": \"xxxxxxxxxxxxxxxxx\",\n      \"name\": \"Example Group\",\n      \"notifications\": 0\n    }\n  ]\n}","schema":{"title":"Success-Response:","type":"object","properties":{"groups":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"channel":{"type":"string"},"name":{"type":"string"},"notifications":{"type":"number"}}},"description":"<p>Array of Groups included in notifications</p>"}},"required":["groups"]}}},"description":"Success-Response:"}}}},"/channel/{id}/notification-template/{templateId}":{"get":{"tags":["Notification_templates"],"summary":"GetNotificationTemplate","description":"Get notification template","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"path","name":"templateId","description":"The notification template id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"template\": {\n      \"_id\": \"xxxxxxxxxxxxxxxxx\",\n      \"channel\": \"xxxxxxxxxxxxxxxxx\",\n      \"name\": \"Example Template\",\n      \"title\": \"My template\",\n      \"templateGroup\": \"My Group\"\n    }\n}","schema":{"title":"Success-Response:","type":"object","properties":{"template":{"type":"object","properties":{"_id":{"type":"string"},"channel":{"type":"string"},"name":{"type":"string"},"title":{"type":"string"},"templateGroup":{"type":"string","description":"<p>The notification template group name</p>"}},"description":"<p>The data of the requested notification template</p>","required":["templateGroup"]}},"required":["template"]}}},"description":"Success-Response:"}}},"post":{"tags":["Notification_templates"],"summary":"UpdateNotificationTemplate","description":"Update notification template","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"path","name":"templateId","description":"The notification template id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":"<p>True if the template was updated successfully</p>"}},"required":["success"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"title":{"type":"string","description":"<p>The template's title.</p>"}},"type":"object"}}}}}},"/channel/{id}/notification-templates":{"post":{"tags":["Notification_templates"],"summary":"NotificationTemplateCreate","description":"Create notification template","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true,\n  \"id\": \"XXXXXXXX\"\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":""},"id":{"type":"string"}},"required":["success"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"title":{"type":"string","description":"<p>The notification title.</p>"},"name":{"type":"string","description":"<p>The notification name.</p>"},"text":{"type":"string","description":"<p>The notification text.</p>"},"url":{"type":"string","description":"<p>The notification URL.</p>"},"iconUrl":{"type":"string","description":"<p>The notification's icon.</p>"},"mediaUrl":{"type":"string","description":"<p>The notification's large media/image.</p>"},"actions":{"items":{"type":"string","description":"<p>Array of action objects: { title, url, [icon] }.</p>"},"type":"array","description":"<p>Array of action objects: { title, url, [icon] }.</p>"}},"type":"object"}}}}},"get":{"tags":["Notification_templates"],"summary":"NotificationTemplatesGet","description":"Get notification templates","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"query","name":"limit","description":"Used for pagination. Default: 50, Max: 100"},{"schema":{"type":"string"},"in":"query","name":"skip","description":"Used for pagination. Default: 0"},{"schema":{"type":"string","default":"true"},"in":"query","name":"sourcecode","description":"Include HTML source code in the response. Set to false to return template metadata only."}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"templates\": [\n    {\n      \"_id\": \"xxxxxxxxxxxxxxxxx\",\n      \"channel\": \"xxxxxxxxxxxxxxxxx\",\n      \"name\": \"Example Template\",\n      \"title\": \"My template\",\n      \"templateGroup\": \"My Group\"\n    }\n  ]\n}","schema":{"title":"Success-Response:","type":"object","properties":{"templates":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"channel":{"type":"string"},"name":{"type":"string"},"title":{"type":"string"},"templateGroup":{"type":"string","description":"<p>The notification template group name</p>"}},"required":["templateGroup"]},"description":"<p>Array with data for notification templates corresponding to the specified channel</p>"}},"required":["templates"]}}},"description":"Success-Response:"}}}},"/channel/{id}/notification-campaign":{"post":{"tags":["Notifications"],"summary":"CreateNotificationCampaign","description":"Create Notification campaign","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true,\n  \"notificationCampaignId\": \"xxxxxxxxxx\"\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean"},"notificationCampaignId":{"type":"string"},"Object":{"type":"object","properties":{},"description":"<p>api suceess response and notification campaign id</p>"}},"required":["Object"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string","description":"<p>Name for new notification campaign</p>"},"externalId":{"type":"string","description":"<p>External ID for the campaign (optional)</p>"}},"type":"object","required":["name"]}}}}}},"/channel/{channelId}/notification/{id}":{"delete":{"tags":["Notifications"],"summary":"DeleteChannelNotification","description":"Delete notification","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The notification id","required":true},{"schema":{"type":"string"},"in":"path","name":"channelId","description":"The channel id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}}},"get":{"tags":["Notifications"],"summary":"GetChannelNotification","description":"Get notification","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The notification id","required":true},{"schema":{"type":"string"},"in":"path","name":"channelId","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"path","name":"fields","description":"Comma-separated list of fields to include in the response (sparse fieldsets). When omitted, the full object is returned (default, unchanged behavior). Unknown fields are ignored; _id is always included. Example: fields=_id,title,sent. Selectable fields: _id, title, text, channel, user, source, url, autoHide, socialSharingActions, createdAt, expiresAt, expiresAtHours, iconUrl, subscriptionCount, sent, optOuts, delivered, clicked, hidden, jobId, queuedAt, status, subscriptionStatistics, actions."}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"notification\": {\n      \"_id\": \"xxxxxxxxxxxxxxxxx\",\n      \"title\": \"Example title\",\n      \"text\": \"Example text\",\n      \"channel\": \"xxxxxxxxxxxxxxxxx\",\n      \"user\": \"xxxxxxxxxxxxxxxxx\",\n      \"source\": \"web\",\n      \"url\": \"https://example.com\",\n      \"autoHide\": false,\n      \"socialSharingActions\": true,\n      \"createdAt\": \"2018-01-01T01:00:00.000Z\",\n      \"expiresAt\": \"2018-01-01T11:00:00.000Z\",\n      \"expiresAtHours\": 10,\n      \"iconUrl\": \"\",\n      \"subscriptionCount\": 2,\n      \"sent\": 2,\n      \"optOuts\": 0,\n      \"delivered\": 2,\n      \"clicked\": 1,\n      \"hidden\": false,\n      \"jobId\": \"123456\",\n      \"queuedAt\": \"2018-01-01T01:00:00.000Z\",\n      \"status\": \"sent\",\n      \"subscriptionStatistics\": { \"browser\": { \"Chrome\": 2 }, \"platform\": { \"Windows\": 1, \"Android\": 1 }, \"language\": { \"en\": 2 }, \"country\": { \"US\": 2 } },\n      \"actions\": [ { \"clicked\": 0 }, { \"clicked\": 1 } ]\n    }\n}","schema":{"title":"Success-Response:","type":"object","properties":{"notification":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"},"text":{"type":"string"},"channel":{"type":"string"},"user":{"type":"string"},"source":{"type":"string"},"url":{"type":"string"},"autoHide":{"type":"boolean"},"socialSharingActions":{"type":"boolean"},"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"expiresAtHours":{"type":"number"},"iconUrl":{"type":"string"},"subscriptionCount":{"type":"number"},"sent":{"type":"number"},"optOuts":{"type":"number"},"delivered":{"type":"number"},"clicked":{"type":"number"},"hidden":{"type":"boolean"},"jobId":{"type":"string"},"queuedAt":{"type":"string"},"status":{"type":"string"},"subscriptionStatistics":{"type":"object","properties":{"browser":{"type":"object","properties":{"Chrome":{"type":"number"}}},"platform":{"type":"object","properties":{"Windows":{"type":"number"},"Android":{"type":"number"}}},"language":{"type":"object","properties":{"en":{"type":"number"}}},"country":{"type":"object","properties":{"US":{"type":"number"}}}}},"actions":{"type":"array","items":{"type":"object","properties":{"clicked":{"type":"number"}},"required":["clicked"]}}},"description":"<p>Object containing data for a single notification connected to specified channel</p>"}},"required":["notification"]}}},"description":"Success-Response:"}}},"post":{"tags":["Notifications"],"summary":"UpdateChannelNotification","description":"Update notification","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The notification id","required":true},{"schema":{"type":"string"},"in":"path","name":"channelId","description":"The channel id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{},"type":"object"}}}}}},"/channel/{id}/notification-campaign/{campaignId}":{"delete":{"tags":["Notifications"],"summary":"DeleteNotificationCampaign","description":"Delete Notification campaign","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"path","name":"campaignId","description":"The notification campaign id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}}},"get":{"tags":["Notifications"],"summary":"GetNotificationCampaign","description":"Get Notification campaign","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"path","name":"campaignId","description":"The notification campaign id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n   \"_id\": \"xxxxxxxxxxx\",\n   \"name\": \"xxxxxxxxxx\",\n   \"channel\": \"xxxxxxxxxx\",\n   \"queuedAt\": \"xxxxxxxxxx\",\n   \"sent\": \"xxx\"\n}","schema":{"title":"Success-Response:","type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"channel":{"type":"string"},"queuedAt":{"type":"string"},"sent":{"type":"string"},"Object":{"type":"object","properties":{},"description":"<p>containing data for individual notification campaign corresponding to the channel</p>"}},"required":["Object"]}}},"description":"Success-Response:"}}},"post":{"tags":["Notifications"],"summary":"UpdateNotificationCampaign","description":"Update Notification campaign","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"path","name":"campaignId","description":"The notification campaign id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string","description":"<p>Updated name of campaign</p>"}},"type":"object","required":["name"]}}}}}},"/channel/{id}/notification-campaigns":{"delete":{"tags":["Notifications"],"summary":"DeleteNotificationCampaigns","description":"Delete Notification campaigns","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"Channel ID","required":true},{"schema":{"type":"string"},"in":"query","name":"campaignIds","description":"Array of campaign ids to be deleted","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}}},"get":{"tags":["Notifications"],"summary":"GetNotificationCampaigns","description":"Get Notification campaigns","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"Channel ID","required":true},{"schema":{"type":"string"},"in":"query","name":"offset","description":"How many campaigns to skip. Default: 0"},{"schema":{"type":"string"},"in":"query","name":"limit","description":"How many campaigns to get. Default: 10"}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"notificationCampaigns\": [\n     {\n       \"_id\": \"xxxxxxxxxxx\",\n       \"name\": \"xxxxxxxxxx\",\n       \"channel\": \"xxxxxxxxxx\",\n       \"queuedAt\": \"xxxxxxxxxx\",\n       \"sent\": \"xxx\"\n     }\n ],\n \"count\": \"xx\"\n}","schema":{"title":"Success-Response:","type":"object","properties":{"notificationCampaigns":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"channel":{"type":"string"},"queuedAt":{"type":"string"},"sent":{"type":"string"}}}},"count":{"type":"string"},"Object":{"type":"object","properties":{},"description":"<p>containing array and total count for notification campaigns corresponding to the channel</p>"}},"required":["Object"]}}},"description":"Success-Response:"}}},"post":{"tags":["Notifications"],"summary":"UpdateNotificationCampaigns","description":"Create Notification campaigns","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"Channel ID","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"campaginUpdates":{"type":"array","items":{"type":"object","properties":{}},"description":"<p>Array of object containing campaign &quot;_id&quot; and &quot;name&quot; field</p>"}},"type":"object","required":["campaginUpdates"]}}}}}},"/channel/{channelId}/notification/{id}/events":{"get":{"tags":["Notifications"],"summary":"GetChannelNotificationEvents","description":"Get notification events","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The notification id","required":true},{"schema":{"type":"string"},"in":"path","name":"channelId","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"query","name":"type","description":"Optionally specify an event type. Valid types: clicked, delivered, opened (only for email channels)"},{"schema":{"type":"string"},"in":"query","name":"pageToken","description":"Optionally specify a page token from a previous response to fetch the next page. One response will always return max. 5000 results."}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n   \"events\": [\n     {\n       \"notification\": \"XXXXXXXX\",\n       \"type\": \"clicked\",\n       \"subscription\": \"XXXXXXXX\",\n       \"date\": \"2020-08-22T20:28:29.976Z\"\n     }\n   ],\n   \"pageToken\": \"...\"\n}","schema":{"title":"Success-Response:","type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"notification":{"type":"string"},"type":{"type":"string"},"subscription":{"type":"string"},"date":{"type":"string"}}}},"pageToken":{"type":"string"},"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}}}},"/channel/{channelId}/notification/{id}/hourly-statistics":{"get":{"tags":["Notifications"],"summary":"GetChannelNotificationHourlyStatistics","description":"Get hourly notification statistics","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The notification id","required":true},{"schema":{"type":"string"},"in":"path","name":"channelId","description":"The channel id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"statistics\": [\n     {\n        \"notification\": \"XXXXXXXXXXXX\",\n        \"date\": \"2020-.....\",\n        \"hour\": 1,\n        \"clicked\": 10\n     }\n  ]\n}","schema":{"title":"Success-Response:","type":"object","properties":{"statistics":{"type":"array","items":{"type":"object","properties":{"notification":{"type":"string"},"date":{"type":"string"},"hour":{"type":"number"},"clicked":{"type":"number"}}}},"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}}}},"/channel/{id}/notifications":{"get":{"tags":["Notifications"],"summary":"GetChannelNotifications","description":"Get notifications","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"query","name":"limit","description":"How many notifications to get. Default: 50. Maximum: 5000"},{"schema":{"type":"string"},"in":"query","name":"offset","description":"How many notifications to skip. Default: 0"},{"schema":{"type":"string"},"in":"query","name":"noTransactional","description":"Does not output notifications which were tagged as 'transactional'"},{"schema":{"type":"string"},"in":"query","name":"status","description":"Shows all notifications if not set. Possible values: 'sent', 'sending', 'scheduled', 'queued', 'failed'"},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"externalId","description":"Include only notifications which match the specified externalId. The external ID can be provided in the /notification/send endpoint. (can be array of external IDs or string)"},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"topics","description":"Include only notifications which match the specified topics. (can be array of topics or string)"},{"schema":{"type":"string"},"in":"query","name":"startDate","description":"Start date UNIX timestamp (seconds), reflects to queuedAt field"},{"schema":{"type":"string"},"in":"query","name":"endDate","description":"End date UNIX timestamp (seconds), reflects to queuedAt field"},{"schema":{"type":"string"},"in":"query","name":"fields","description":"Comma-separated list of fields to include in the response (sparse fieldsets). When omitted, the full object is returned (default, unchanged behavior). Unknown fields are ignored; _id is always included. Example: fields=_id,title,sent. Selectable fields: _id, title, text, channel, user, source, url, autoHide, socialSharingActions, createdAt, expiresAt, expiresAtHours, iconUrl, subscriptionCount, sent, optOuts, delivered, clicked, hidden, jobId, queuedAt, status, subscriptionStatistics, actions."}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"notifications\": [\n    {\n      \"_id\": \"xxxxxxxxxxxxxxxxx\",\n      \"title\": \"Example title\",\n      \"text\": \"Example text\",\n      \"channel\": \"xxxxxxxxxxxxxxxxx\",\n      \"user\": \"xxxxxxxxxxxxxxxxx\",\n      \"source\": \"web\",\n      \"url\": \"https://example.com\",\n      \"autoHide\": false,\n      \"socialSharingActions\": true,\n      \"createdAt\": \"2018-01-01T01:00:00.000Z\",\n      \"expiresAt\": \"2018-01-01T11:00:00.000Z\",\n      \"expiresAtHours\": 10,\n      \"iconUrl\": \"\",\n      \"subscriptionCount\": 2,\n      \"sent\": 2,\n      \"optOuts\": 0,\n      \"delivered\": 2,\n      \"clicked\": 1,\n      \"hidden\": false,\n      \"jobId\": \"123456\",\n      \"templateId\": \"xxxxxxxxxxxxxxxxx\",\n      \"queuedAt\": \"2018-01-01T01:00:00.000Z\",\n      \"status\": \"sent\",\n      \"subscriptionStatistics\": { \"browser\": { \"Chrome\": 2 }, \"platform\": { \"Windows\": 1, \"Android\": 1 }, \"language\": { \"en\": 2 }, \"country\": { \"US\": 2 } },\n      \"actions\": [ {\"title\": \"Action 1\", \"clicked\": 0 } ]\n    }\n  ]\n}","schema":{"title":"Success-Response:","type":"object","properties":{"notifications":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string","description":"<p>notification's title</p>"},"text":{"type":"string","description":"<p>notification's HTML text</p>"},"channel":{"type":"string","description":"<p>channel's ID</p>"},"user":{"type":"string","description":"<p>user's ID</p>"},"source":{"type":"string","description":"<p>type of source</p>"},"url":{"type":"string","description":"<p>notification's url</p>"},"autoHide":{"type":"boolean","description":"<p>auto hide feature</p>"},"socialSharingActions":{"type":"boolean","description":"<p>show social sharing actions</p>"},"createdAt":{"type":"string","description":"<p>date of creation of notifications</p>"},"expiresAt":{"type":"string","description":"<p>date of expiry of notifications</p>"},"expiresAtHours":{"type":"number","description":"<p>remaining time of expire in hours</p>"},"iconUrl":{"type":"string","description":"<p>url of notification icon image</p>"},"subscriptionCount":{"type":"number","description":"<p>number of subscriptions of notification</p>"},"sent":{"type":"number","description":"<p>number of sent of notification</p>"},"optOuts":{"type":"number","description":"<p>number of optOuts of notification</p>"},"delivered":{"type":"number","description":"<p>number of delivered of notification</p>"},"clicked":{"type":"number","description":"<p>number of clicked of notification</p>"},"hidden":{"type":"boolean","description":"<p>notification hidden</p>"},"jobId":{"type":"string","description":"<p>notification's job ID</p>"},"templateId":{"type":"string","description":"<p>notification's template ID</p>"},"queuedAt":{"type":"string","description":"<p>date of creation of notifications</p>"},"status":{"type":"string","description":"<p>status of notifications</p>"},"subscriptionStatistics":{"type":"object","properties":{"browser":{"type":"object","properties":{"Chrome":{"type":"number"},"chrome":{"type":"number","description":"<p>number of notification's subscription on crome</p>"}},"description":"<p>statistics of notification's subscription on browser</p>","required":["chrome"]},"platform":{"type":"object","properties":{"Windows":{"type":"number"},"Android":{"type":"number"},"windows":{"type":"number","description":"<p>number of notification's subscription on Windows</p>"},"android":{"type":"number","description":"<p>number of notification's subscription on Android</p>"}},"description":"<p>statistics of notification's subscription on different platform</p>","required":["windows","android"]},"language":{"type":"object","properties":{"en":{"type":"number","description":"<p>number of notification's subscription on English</p>"}},"description":"<p>statistics of notification's subscription on language spoken</p>","required":["en"]},"country":{"type":"object","properties":{"US":{"type":"number"},"us":{"type":"number","description":"<p>number of notification's subscription on US</p>"}},"description":"<p>statistics of notification's subscription on country</p>","required":["us"]}},"description":"<p>statistics of notification's subscription</p>","required":["browser","platform","language","country"]},"actions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"<p>title of article</p>"},"clicked":{"type":"number","description":"<p>clicked count of article</p>"}},"required":["title","clicked"]},"description":"<p>Array of object including title of article and clicked count</p>"},"id":{"type":"string","description":"<p>notification's ID</p>"}},"required":["id","title","text","channel","user","source","url","autoHide","socialSharingActions","createdAt","expiresAt","expiresAtHours","iconUrl","subscriptionCount","sent","optOuts","delivered","clicked","hidden","jobId","queuedAt","status","subscriptionStatistics","actions"]},"description":"<p>Array of notifications for a specified channel</p>"}},"required":["notifications"]}}},"description":"Success-Response:"}}}},"/notification/send":{"post":{"tags":["Notifications"],"summary":"SendNotification","description":"Create notification","parameters":[],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"error\": \"subscription not found\"\n}","schema":{"title":"Error-Response:","type":"object","properties":{"error":{"type":"string"},"success":{"type":"boolean","description":""},"notificationId":{"type":"string","description":""}},"required":["success","notificationId"]}}},"description":"Error-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"channelId":{"type":"string","description":"<p>The channel ID.</p>"},"title":{"type":"string","description":"<p>The notification title (subject for email channels).</p>"},"text":{"type":"string","description":"<p>The notification text (HTML body for email channels). For custom HTML newsletters, embed AD SLOT placeholders as merge tags: <code>{{adSlot_&lt;slotId&gt;}}</code> where <code>slotId</code> is the EmailAdSlots document ID (e.g. <code>{{adSlot_xYz123AbC}}</code>). Placeholders are resolved with configured ad campaign content at send time.</p>"},"url":{"type":"string","description":"<p>The notification URL.</p>"},"iconUrl":{"type":"string","description":"<p>The notification's icon.</p>"},"mediaUrl":{"type":"string","description":"<p>The notification's large media/image.</p>"},"fetchMediaUrl":{"type":"boolean","description":"<p>Fetches a mediaUrl from the provided url if no mediaUrl is provided.</p>"},"scheduledAt":{"type":"number","description":"<p>A unix timestamp for scheduling notifications (must be in the future).</p>"},"expiresAtHours":{"type":"number","description":"<p>Hours after the notification will expire.</p>"},"expiresAtMinutes":{"type":"number","description":"<p>Alternatively: Minutes after the notification will expire.</p>"},"balancedDeliveryType":{"type":"string","description":"<p>Evenly distribute delivery type, can be 'balancedDeliveryMinutes' or 'balancedDeliverySendings'</p>"},"balancedDeliveryMinutes":{"type":"number","description":"<p>Evenly distribute delivery in these minutes instead of sending to all subscriptions instantly.</p>"},"balancedDeliverySendings":{"type":"number","description":"<p>Distribute delivery in specified number per minute instead of sending to all subscriptions instantly.</p>"},"customData":{"type":"object","properties":{},"description":"<p>Custom data payload which will be sent to the devices.</p>"},"subscriptionId":{"type":"string","description":"<p>The subscription ID(s) (string or alternatively an array of strings). Will broadcast to all subscriptions if not given. If an array is provided, the maximum amount of items in this array is 50000.</p>"},"testSubscriptions":{"type":"boolean","description":"<p>If true, will ignore other targeting settings and only send to defined test subscriptions.</p>"},"customAttributes":{"type":"object","properties":{},"description":"<p>Targeting: An object of custom attributes to filter subscriptions (e.g.: { user_id: 123 } OR { user_id: [123, 124] }). Will broadcast to all subscriptions if not given.</p>"},"tags":{"items":{"type":"string","description":"<p>Targeting: array of tag IDs.</p>"},"type":"array","description":"<p>Targeting: array of tag IDs.</p>"},"tagsLogic":{"type":"string","description":"<p>One of: 'and', 'or', default: 'or'</p>"},"excludeTags":{"items":{"type":"string","description":"<p>Targeting: array of tag IDs.</p>"},"type":"array","description":"<p>Targeting: array of tag IDs.</p>"},"externalTags":{"items":{"type":"string","description":"<p>Targeting: array of tag IDs.</p>"},"type":"array","description":"<p>Targeting: array of tag IDs.</p>"},"excludeExternalTags":{"items":{"type":"string","description":"<p>Targeting: array of tag IDs.</p>"},"type":"array","description":"<p>Targeting: array of tag IDs.</p>"},"topics":{"items":{"type":"string","description":"<p>Targeting: array of topic IDs.</p>"},"type":"array","description":"<p>Targeting: array of topic IDs.</p>"},"topicsLogic":{"type":"string","description":"<p>One of: 'and', 'or', default: 'or'</p>"},"excludeTopics":{"items":{"type":"string","description":"<p>Targeting: array of topic IDs.</p>"},"type":"array","description":"<p>Targeting: array of topic IDs.</p>"},"excludeTopicsLogic":{"type":"string","description":"<p>One of: 'and', 'or', default: 'or'</p>"},"segments":{"items":{"type":"string","description":"<p>Targeting: array of segment IDs.</p>"},"type":"array","description":"<p>Targeting: array of segment IDs.</p>"},"segmentsLogic":{"type":"string","description":"<p>One of: 'and', 'or', default: 'or'</p>"},"excludeSegments":{"items":{"type":"string","description":"<p>Targeting: array of segment IDs.</p>"},"type":"array","description":"<p>Targeting: array of segment IDs.</p>"},"excludeSegmentsLogic":{"type":"string","description":"<p>One of: 'and', 'or', default: 'or'</p>"},"platform":{"items":{"type":"string","description":"<p>Targeting: array of platform names (case-sensitive, e.g. &quot;Android&quot;, &quot;Mac OS&quot;, ..).</p>"},"type":"array","description":"<p>Targeting: array of platform names (case-sensitive, e.g. &quot;Android&quot;, &quot;Mac OS&quot;, ..).</p>"},"platformLogic":{"type":"string","description":"<p>One of: 'include', 'exclude', default: 'include'</p>"},"browser":{"items":{"type":"string","description":"<p>Targeting: array of browser names (case-sensitive, e.g. &quot;Chrome&quot;, &quot;Firefox&quot;, ..).</p>"},"type":"array","description":"<p>Targeting: array of browser names (case-sensitive, e.g. &quot;Chrome&quot;, &quot;Firefox&quot;, ..).</p>"},"browserLogic":{"type":"string","description":"<p>One of: 'include', 'exclude', default: 'include'</p>"},"country":{"items":{"type":"string","description":"<p>Targeting: array of country IDs (e.g. &quot;US&quot;, &quot;DE&quot;, ..).</p>"},"type":"array","description":"<p>Targeting: array of country IDs (e.g. &quot;US&quot;, &quot;DE&quot;, ..).</p>"},"countryLogic":{"type":"string","description":"<p>One of: 'include', 'exclude', default: 'include'</p>"},"language":{"items":{"type":"string","description":"<p>Targeting: array of language IDs (e.g. &quot;en&quot;, &quot;de&quot;, ..).</p>"},"type":"array","description":"<p>Targeting: array of language IDs (e.g. &quot;en&quot;, &quot;de&quot;, ..).</p>"},"languageLogic":{"type":"string","description":"<p>One of: 'include', 'exclude', default: 'include'</p>"},"actions":{"items":{"type":"string","description":"<p>Array of action objects: { title, url, [icon] }.</p>"},"type":"array","description":"<p>Array of action objects: { title, url, [icon] }.</p>"},"groups":{"items":{"type":"string","description":"<p>Array of notification group ids. Used for e.g. tracking similar notifications.</p>"},"type":"array","description":"<p>Array of notification group ids. Used for e.g. tracking similar notifications.</p>"},"clickAssignTags":{"items":{"type":"string","description":"<p>Array of notification tag ids, which are automatically assigned to subscriptions when the notification has been clicked.</p>"},"type":"array","description":"<p>Array of notification tag ids, which are automatically assigned to subscriptions when the notification has been clicked.</p>"},"clickAssignTopics":{"items":{"type":"string","description":"<p>Array of notification topic ids, which are automatically assigned to subscriptions when the notification has been clicked.</p>"},"type":"array","description":"<p>Array of notification topic ids, which are automatically assigned to subscriptions when the notification has been clicked.</p>"},"socialSharingActions":{"type":"boolean","description":"<p>Use pre-defined social sharing actions. Hint: 'actions' will be ignored if 'socialSharingActions' is given.</p>"},"autoHide":{"type":"boolean","description":"<p>Automatically hide notification after approx. 20 seconds (only available for Web Push)</p>"},"bounceUrl":{"type":"string","description":"<p>Set a bounce URL for this notification</p>"},"campaignId":{"type":"string","description":"<p>Campaign id for later analysis</p>"},"externalCampaignId":{"type":"string","description":"<p>External campaign id. If provided, will find or create a NotificationCampaign by externalId and channel. If campaign exists, its _id will be used as campaignId. If not, a new campaign will be created with the provided campaignName (or externalCampaignId as fallback).</p>"},"campaignName":{"type":"string","description":"<p>Campaign name for later analysis</p>"},"category":{"type":"string","description":"<p>Android Notification Category ID</p>"},"transactional":{"type":"boolean","description":"<p>Tags the notification as transactional message, just used for filtering in the backoffice</p>"},"breakingNews":{"type":"boolean","description":"<p>Marks the notification as breaking news (bypasses daily/hourly per-subscription push limits, higher queue priority on Enterprise). Requires a plan with breaking news enabled. Ignored otherwise.</p>"},"translationsEnabled":{"type":"boolean","description":"<p>Enable per-language notification content. With A/B testing, translations belong on each variant (Notification → A/B variant → translations).</p>"},"abTesting":{"type":"boolean","description":"<p>Optionally enable A/B testing</p>"},"testVariants":{"type":"array","items":{"type":"object","properties":{"translations":{"type":"object","properties":{},"description":"<p>Per-language content for this variant, e.g. { &quot;de&quot;: { &quot;title&quot;: &quot;...&quot;, &quot;text&quot;: &quot;...&quot; } }. Hierarchy is Notification → A/B variant → translations.</p>"}}},"description":"<p>Array of objects. An object can consist of the fields you want to test (title, text, ...). When used with translationsEnabled, nest per-language content under testVariants.translations.</p>"},"abTestingAutoCompare":{"type":"boolean","description":"<p>Optionally compares the best notification after 30 minutes and sends the best result to the rest</p>"},"abTestingPercent":{"type":"number","description":"<p>A/B test percentage (0 to 100)</p>"},"machineLearning":{"type":"boolean","description":"<p>Optionally enable machine learning (available for Enterprise plans).</p>"},"machineLearningMinimumPercentage":{"type":"number","description":"<p>Minimum percentage of total subscriptions to send to if the ML algorithm does not find enough subscriptions (rest of the subscriptions are filled up).</p>"},"walletPass":{"type":"string","description":"<p>Optionally set Wallet Pass ID</p>"},"silent":{"type":"boolean","description":"<p>Set this to true if you want to send a silent notification (only available for App Push)</p>"},"soundFilename":{"type":"string","description":"<p>Optionally set iOS sound filename</p>"},"soundVolume":{"type":"number","description":"<p>Optionally set iOS sound volume (0.0 to 1.0)</p>"},"soundCritical":{"type":"boolean","description":"<p>Optionally set iOS sound critical (warning: only for pre-approved apps, see: https://developer.apple.com/contact/request/notifications-critical-alerts-entitlement/)</p>"},"bestDeliveryTime":{"type":"boolean","description":"<p>Enables the optimal delivery time for this message (will deliver 7 days by default, set bestDeliveryTime24Hours: true to send for 24 hours only)</p>"},"bestDeliveryTime24Hours":{"type":"boolean","description":"<p>Enables the optimal delivery time for 24 hours (bestDeliveryTime needs to be true for this to work)</p>"},"priority":{"type":"string","description":"<p>Optionally set priority. Possible values: &quot;high&quot; or &quot;normal&quot;. Defaults to &quot;high&quot;.</p>"},"templateId":{"type":"string","description":"<p>Set the Notification / Email Template ID instead of using &quot;text&quot; for specifiy the content</p>"},"additionalAttributes":{"type":"object","properties":{},"description":"<p>Provide additional attributes for each subscription, that will be replaced as placeholders automatically (e.g. { &quot;XXXXXXX1&quot;: { &quot;first_name&quot;: &quot;John&quot; }, &quot;XXXXXXX2&quot;: { &quot;first_name&quot;: &quot;Sam&quot; } }). The keys of this object represent the Subscription ID's by default. You can also use an indexed custom attribute for this (e.g. &quot;user_id&quot;), by specifying the parameter &quot;additionalAttributesKey&quot;. Only available for transactional notifications. Max. subscriptions per request: 5000.</p>"},"additionalAttributesKey":{"type":"string","description":"<p>When using &quot;additionalAttributes&quot;, the keys of this object represent the Subscription ID's by default. You can specify a indexed custom attribute for this here (e.g. &quot;user_id&quot;). Only available for transactional notifications.</p>"},"emailNewsletter":{"type":"boolean","description":"<p>Optionally set this to true to send email newsletters. Use &quot;title&quot; for the email subject and &quot;text&quot; for the HTML content.</p>"},"emailContentType":{"type":"string","description":"<p>Email content type for custom HTML newsletters. Use <code>&quot;html&quot;</code> when sending custom HTML via <code>text</code>.</p>"},"emailAccount":{"type":"string","description":"<p>Set the Email Account ID</p>"},"emailSenderName":{"type":"string","description":"<p>Set the Email Sender Name</p>"},"emailRecipient":{"type":"string","description":"<p>Transactional Emails: Specify the recipient's email address(es) (string or alternatively an array of strings) instead of using a subscriptionId</p>"},"smsProvider":{"type":"string","description":"<p>Set the SMS Provider ID</p>"},"phoneNumber":{"type":"string","description":"<p>Transactional SMS: Specify the recipient's phone number(s) (string or alternatively an array of strings) in E.164 format instead of using a subscriptionId</p>"},"subscriptionAttributes":{"type":"object","properties":{},"description":"<p>Transactional Emails/SMS: When using Emails with templateId: Specify the subscription's custom attributes which will be replaced as variables in the template fields.</p>"},"collapseKey":{"type":"string","description":"<p>Multiple notifications with the same collapse key will be automatically replaced.</p>"},"threadId":{"type":"string","description":"<p>Multiple notifications with the same thread ID will be automatically grouped together. (Supported only for iOS right now)</p>"},"interruptionLevel":{"type":"string","description":"<p>Interruption levels indicate the priority and delivery timing of a notification, to 'interrupt' the user. Up until iOS 15, Apple primarily focused on Critical notifications. Now they have expanded this to include the following four levels: ['active', 'passive', 'time-sensitive', 'critical'].</p>"},"relevanceScore":{"type":"string","description":"<p>A Relevance Score is a score to be set per notification to indicate how it should be displayed when grouped. The system uses the relevance score, a value between 0 and 1, to sort the notifications from your app. The highest score gets featured in the notification summary. This was introduced in iOS15+. Expected values [0, 0.75, 0.5, 0.25, 1]</p>"},"whatsappTemplateName":{"type":"string","description":"<p>Name of the WhatsApp Template (required when channel type is Whatsapp)</p>"},"externalId":{"type":"string","description":"<p>Used for checking for API notification duplicates internally when the corresponding setting is enabled in the channel settings.</p>"},"iosCategory":{"type":"object","properties":{},"description":"<p>iOS notification category, which is available as categoryIdentifier in the app. It will not work together with the <code>actions</code> field, as the SDK will then dynamically generate a fitting category to display the notification buttons.</p>"},"iosLiveActivityContentState":{"type":"object","properties":{},"description":"<p>iOS Live Activity Content state</p>"},"iosLiveActivityEvent":{"type":"string","description":"<p>iOS Live Activity Event (&quot;update&quot;, &quot;end&quot;)</p>"},"type":{"type":"string","description":"<p>Notification type (&quot;iosLiveActivity&quot;)</p>"},"iosLiveActivityDismissalDate":{"type":"string","description":"<p>ios Live Activity Dismissal Date (Use Epoch Timestamp in string)</p>"},"appBannerId":{"type":"string","description":"<p>App Banner ID If silent:true and the appBannerId is provided, then after the subscriber receives the notification and opens the app, it will show the appbanner</p>"},"autoHandleDeepLink":{"type":"boolean","description":"<p>Used for automatic handling of Deep Links (only available for App Push)</p>"},"chatNotification":{"type":"boolean","description":"<p>Used for defining notifications as &quot;Chat notification&quot; which will be shown in the ChatView, if used (only available for Web / App Push)</p>"},"chatMessage":{"type":"string","description":"<p>Used for defining the message to be shown in the ChatView, if used (only available for Web / App Push)</p>"},"testSubscriptionsConsiderTargeting":{"type":"boolean","description":"<p>Test subscriptions will be considered</p>"}},"type":"object","required":["channelId"]}}}}}},"/notification/send/bulk":{"post":{"tags":["Notifications"],"summary":"SendNotifications","description":"Create notifications in bulk","parameters":[],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n[\n   {\n     \"error\": \"subscription not found\"\n   }\n]","schema":{"title":"Error-Response: Set","type":"array","items":{"type":"object","properties":{"error":{"type":"string"}},"title":"Error-Response:"},"properties":{"responses":{"type":"array","items":{"type":"object","properties":{}},"description":"<p>Array of success objects with notificationId</p>"}},"required":["responses"]}}},"description":"Error-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"channelId":{"type":"string","description":"<p>The channel ID to which every notification will be send if no channelId defined the notification</p>"},"channelIds":{"items":{"type":"string","description":"<p>List of channel IDs to which every notification will be send if no channelId defined the notification</p>"},"type":"array","description":"<p>List of channel IDs to which every notification will be send if no channelId defined the notification</p>"},"notifications":{"type":"array","items":{"type":"object","properties":{}},"description":"<p>Array of notifications with the same structure as notification/send, if no channelId oder channelIds are defined it will default to the channelId or channelIds directly defined in the request body. Maximum supported notifications per request: 500.</p>"}},"type":"object","required":["notifications"]}}}}}},"/notification/upload-media":{"post":{"tags":["Notifications"],"summary":"Upload_Media","description":"Upload Media","parameters":[{"schema":{"type":"string"},"in":"header","name":"Authorization","description":"Private API key","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"url\": \"https://static.cleverpush.com/notification/icon/...\"\n}","schema":{"title":"Success-Response:","type":"object","properties":{"url":{"type":"string"},"Url":{"type":"string","description":"<p>to uploaded file</p>"}},"required":["Url"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"contentType":{"type":"string","description":"<p>The mime type of the file</p>"},"payload":{"type":"string","description":"<p>Base64 encoded file</p>"}},"type":"object","required":["contentType","payload"]}}}}}},"/projects/":{"get":{"tags":["Projects"],"summary":"Get_projects_accounts","description":"Get all projects","parameters":[],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"projects\": [\n       {\n           \"_id\": \"xxx\",\n           \"user\": \"xxx\",\n           \"name\": \"xxx\",\n           \"starred\": false,\n           \"industry\": \"xxx\",\n           \"iconUrl\": \"xxx\",\n           \"iconFile\": \"xxx\",\n           \"createdAt\": \"2021-06-24T00:00:00.000+0000\",\n           \"updatedAt\": \"2021-06-24T00:00:00.000+0000\",\n           \"lastVisited\": \"2021-06-24T00:00:00.000+0000\",\n           \"markedForDeletion\": false\n       }\n   ]\n}","schema":{"title":"Success-Response:","type":"object","properties":{"projects":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"user":{"type":"string"},"name":{"type":"string"},"starred":{"type":"boolean"},"industry":{"type":"string"},"iconUrl":{"type":"string"},"iconFile":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"lastVisited":{"type":"string"},"markedForDeletion":{"type":"boolean"}}},"description":"<p>Array of objects with project data</p>"}},"required":["projects"]}}},"description":"Success-Response:"}}}},"/projects/{id}/subscriptions":{"get":{"tags":["Projects"],"summary":"Get_projects_subscriptions","description":"Get subscriptions of same project","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The project id","required":true},{"schema":{"type":"string"},"in":"query","name":"customAttributes[user_id]","description":"Custom attribute user_id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n\"subscriptions\": [\n  {\n    \"_id\": \"XXXXX1\",\n    \"type\": \"app\",\n    \"platformName\": \"iOS\",\n    \"topics\": [\"TOPIC_ID_1\", \"TOPIC_ID_2\"]\n  },\n  {\n    \"_id\": \"XXXXX2\",\n    \"type\": \"web\",\n    \"platformName\": \"Windows\",\n    \"topics\": []\n  }\n ]\n}","schema":{"title":"Success-Response:","type":"object","properties":{"subscriptions":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"type":{"type":"string"},"platformName":{"type":"string"},"topics":{"type":"array","items":{"type":"string"}}},"required":["_id","type","platformName","topics"]},"description":"<p>Array of objects with subscription data</p>"}},"required":["subscriptions"]}}},"description":"Success-Response:"}}},"put":{"tags":["Projects"],"summary":"Update_project_subscriptions","description":"Update subscriptions of same project","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The project id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"modified\": 2,\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"modified":{"type":"number"},"success":{"type":"boolean"},"Success":{"type":"boolean","description":""}},"required":["Success"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"subscriptions":{"type":"array","items":{"type":"object","properties":{}},"description":"<p>The modified subscriptions array</p>"}},"type":"object","required":["subscriptions"]}}}}}},"/projects/{id}":{"post":{"tags":["Projects"],"summary":"Update_project","description":"Update project","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string","description":"<p>The project name.</p>"},"starred":{"type":"boolean","description":"<p>Is the project starred.</p>"},"industry":{"type":"string","description":"<p>The industry category.</p>"},"iconUrl":{"type":"string","description":"<p>The icon url.</p>"},"iconFile":{"type":"string","description":"<p>The icon file name.</p>"}},"type":"object"}}}}}},"/sms-providers/create":{"post":{"tags":["SMS_providers"],"summary":"Create_SMS_provider","description":"Create SMS provider","parameters":[],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"id\": \"xxx\"\n}","schema":{"title":"Success-Response:","type":"object","properties":{"id":{"type":"string","description":""}},"required":["id"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"channels":{"items":{"type":"string","description":"<p>ChannelIds of the smsProvider</p>"},"type":"array","description":"<p>ChannelIds of the smsProvider</p>"},"provider":{"type":"string","description":"<p>Provider must be twilio or websms or esendex</p>"},"name":{"type":"string","description":"<p>The name you want to give to this smsProvider</p>"},"phone":{"type":"string","description":"<p>The phonenumber.</p>"},"accountSid":{"type":"string","description":"<p>The account SID.</p>"},"authToken":{"type":"string","description":"<p>The auth token.</p>"},"email":{"type":"string","description":"<p>The email.</p>"},"password":{"type":"string","description":"<p>The password.</p>"},"accountReference":{"type":"string","description":"<p>The account reference.</p>"}},"type":"object","required":["channels","provider"]}}}}}},"/sms-providers/{id}":{"delete":{"tags":["SMS_providers"],"summary":"Delete_SMS_provider","description":"Delete SMS provider","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The sms-provider id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}}},"post":{"tags":["SMS_providers"],"summary":"Update_SMS_provider","description":"Update SMS provider","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The sms-provider id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"channels":{"items":{"type":"string","description":"<p>ChannelIds of the smsProvider</p>"},"type":"array","description":"<p>ChannelIds of the smsProvider</p>"},"provider":{"type":"string","description":"<p>Provider must be twilio or websms or esendex</p>"},"name":{"type":"string","description":"<p>The name you want to give to this smsProvider</p>"},"phone":{"type":"string","description":"<p>The phonenumber.</p>"},"accountSid":{"type":"string","description":"<p>The account SID.</p>"},"authToken":{"type":"string","description":"<p>The auth token.</p>"},"email":{"type":"string","description":"<p>The email.</p>"},"password":{"type":"string","description":"<p>The password.</p>"},"accountReference":{"type":"string","description":"<p>The account reference.</p>"}},"type":"object"}}}}}},"/sms-providers/":{"get":{"tags":["SMS_providers"],"summary":"Get_SMS_providers","description":"Get all SMS providers","parameters":[],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"smsProviders\": [\n       {\n           \"channels\": [],\n           \"provider\": \"xxx\",\n           \"name\": \"xxx\",\n           \"phone\": \"xxx\",\n           \"accountSid\": \"xxx\",\n           \"authToken\": \"xxx\",\n           \"email\": \"xxx\",\n           \"password\": \"xxx\",\n           \"createdAt\": \"2021-06-24T00:00:00.000+0000\",\n           \"updatedAt\": \"2021-06-24T00:00:00.000+0000\"\n       }\n   ]\n}","schema":{"title":"Success-Response:","type":"object","properties":{"smsProviders":{"type":"array","items":{"type":"object","properties":{"channels":{"type":"array","items":{}},"provider":{"type":"string"},"name":{"type":"string"},"phone":{"type":"string"},"accountSid":{"type":"string"},"authToken":{"type":"string"},"email":{"type":"string"},"password":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}}},"description":"<p>Array of objects with smsProviders data</p>"}},"required":["smsProviders"]}}},"description":"Success-Response:"}}}},"/channel/{channelId}/short-links":{"post":{"tags":["Shortlinks"],"summary":"CreateShortLink","description":"Create short link","parameters":[{"schema":{"type":"string"},"in":"path","name":"channelId","description":"The channel id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"_id\": \"123123123\",\n  \"url\": \"https://clpsh.com/12345678\"\n}","schema":{"title":"Success-Response:","type":"object","properties":{"_id":{"type":"string","description":"<p>The ID of the created short link</p>"},"url":{"type":"string","description":"<p>The full short link URL</p>"}},"required":["_id","url"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"url":{"type":"string","description":"<p>The original URL to be shortened</p>"},"notificationId":{"type":"string","description":"<p>The notification id</p>"}},"type":"object","required":["url"]}}}}}},"/channel/{channelId}/short-link/statistics":{"get":{"tags":["Shortlinks"],"summary":"GetShortLinkStatistics","description":"Get shortlink statistics","parameters":[{"schema":{"type":"string"},"in":"path","name":"channelId","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"query","name":"startDate","description":"The start date of the statistics.","required":true},{"schema":{"type":"string"},"in":"query","name":"endDate","description":"The end date of the statistics (max 30 days).","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n  {\n    \"clicked\": 10\n  }","schema":{"title":"Success-Response:","type":"object","properties":{"clicked":{"type":"number","description":"<p>Total clicked count of the shortlink</p>"}},"required":["clicked"]}}},"description":"Success-Response:"}}}},"/channel/{channelId}/short-link/{shortLinkId}":{"post":{"tags":["Shortlinks"],"summary":"UpdateShortLink","description":"Update short link notification","parameters":[{"schema":{"type":"string"},"in":"path","name":"channelId","description":"The channel id","required":true},{"schema":{"type":"string"},"in":"path","name":"shortLinkId","description":"The short link id","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":"<p>Indicates if the update was successful</p>"}},"required":["success"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"notificationId":{"type":"string","description":"<p>The notification id to associate with the short link</p>"}},"type":"object","required":["notificationId"]}}}}}},"/subscription/topic/add":{"post":{"tags":["Subscriptions"],"summary":"AddTopicToSubscription","description":"Add topic to subscription","parameters":[],"responses":{"201":{"content":{"application/json":{"example":"HTTP/1.1 201 Created\n{\n    \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean"}}}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"channelId":{"type":"string","description":"<p>The channel ID.</p>"},"topicId":{"type":"string","description":"<p>The topic ID.</p>"},"subscriptionId":{"type":"string","description":"<p>The subscription ID.</p>"}},"type":"object","required":["channelId","topicId","subscriptionId"]}}}}}},"/subscription/attribute/clear":{"post":{"tags":["Subscriptions"],"summary":"ClearSubscriptionAttribute","description":"Clear a subscription attribute","parameters":[],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"channelId":{"type":"string","description":"<p>The channel ID.</p>"},"attributeId":{"type":"string","description":"<p>The attribute ID.</p>"},"subscriptionId":{"type":"string","description":"<p>The single subscription ID.</p>"},"subscriptionIds":{"items":{"type":"string","description":"<p>Array of subscription IDs (maximum 1000).</p>"},"type":"array","description":"<p>Array of subscription IDs (maximum 1000).</p>"}},"type":"object","required":["channelId","attributeId"]}}}}}},"/subscription/conversion":{"post":{"tags":["Subscriptions"],"summary":"ConversionSubscription","description":"Track conversion event","parameters":[],"responses":{"201":{"content":{"application/json":{"example":"HTTP/1.1 201 Created\n{\n    \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean"}}}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"subscriptionId":{"type":"string","description":"<p>The subscriptionId used to update the subscription's tags. (Either subscriptionId or customAttributes.user_id is required)</p>"},"channelId":{"type":"string","description":"<p>The channel ID.</p>"},"eventId":{"type":"string","description":"<p>The conversion event ID.</p>"},"properties":{"type":"object","properties":{},"description":"<p>The conversion event properties (defined in the conversion event settings in CleverPush). Special properties named <code>amount</code> and <code>currency</code> will be used for the conversion amount.</p>"},"deepLinkId":{"type":"string","description":"<p>The deep link ID associated with this conversion (for deep link statistics tracking).</p>"}},"type":"object","required":["subscriptionId","channelId","eventId"]}}}}}},"/subscription/event":{"post":{"tags":["Subscriptions"],"summary":"EventSubscription","description":"Emit follow-up event","parameters":[],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"subscriptionId":{"type":"string","description":"<p>The subscription ID.</p>"},"campaignId":{"type":"string","description":"<p>The follow-up campaign ID. Either specify this or the channel ID.</p>"},"channelId":{"type":"string","description":"<p>The Channel ID. Either specify this or the follow-up campagn ID.</p>"},"name":{"type":"string","description":"<p>The event name.</p>"},"parameters":{"type":"string","description":"<p>The event parameters.</p>"}},"type":"object","required":["subscriptionId","campaignId","channelId","name","parameters"]}}}}}},"/subscription/start-journey":{"post":{"tags":["Subscriptions"],"summary":"EventSubscription","description":"Emit journey event","parameters":[],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"subscriptionId":{"type":"string","description":"<p>The subscription ID.</p>"},"journeyId":{"type":"string","description":"<p>The Journey ID. Either specify this or the channel ID.</p>"},"channelId":{"type":"string","description":"<p>The Channel ID. Either specify this or the Journey ID.</p>"},"name":{"type":"string","description":"<p>The event name.</p>"},"parameters":{"type":"string","description":"<p>The event parameters.</p>"}},"type":"object","required":["subscriptionId","journeyId","channelId","name","parameters"]}}}}}},"/removed-subscriptions":{"get":{"tags":["Subscriptions"],"summary":"GetRemovedSubscriptions","description":"Get removed subscriptions","parameters":[{"schema":{"type":"string"},"in":"query","name":"channel","description":"The channel ID.","required":true},{"schema":{"type":"string"},"in":"query","name":"since","description":"From UNIX timestamp (in milliseconds)","required":true},{"schema":{"type":"string"},"in":"query","name":"until","description":"To UNIX timestamp (in milliseconds)","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"subscriptions\": [\n    {\n      \"subscription\": \"XXXXXXXXXXXXXXXXX\",\n      \"channel\": \"XXXXXXXXXXXXXXXXX\",\n      \"reason\": \"unsubscribe\",\n      \"removedAt\": \"2018-01-01T12:00:00.000Z\"\n    }\n  ]\n}","schema":{"title":"Success-Response:","type":"object","properties":{"subscriptions":{"type":"array","items":{"type":"object","properties":{"subscription":{"type":"string"},"channel":{"type":"string"},"reason":{"type":"string"},"removedAt":{"type":"string"}}},"description":"<p>Array with data for all removed subscriptions</p>"}},"required":["subscriptions"]}}},"description":"Success-Response:"}}}},"/subscription":{"get":{"tags":["Subscriptions"],"summary":"GetSubscription","description":"Get subscription","parameters":[{"schema":{"type":"string"},"in":"query","name":"channelId","description":"The Channel ID (required).","required":true},{"schema":{"type":"string"},"in":"query","name":"subscriptionId","description":"The subscription ID. Location: query parameter. Use this for direct subscription lookup in the given channel."},{"schema":{"type":"string"},"in":"query","name":"attributeId","description":"Channel attribute ID. Only supports &quot;user_id&quot;. Must be used together with attributeValue."},{"schema":{"type":"string"},"in":"query","name":"attributeValue","description":"Subscription attribute value. Required when using attributeId."},{"schema":{"type":"string"},"in":"query","name":"emailAddress","description":"Subscription email address to search for."},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"fields","description":"Optional query parameter. Provide the subscription fields to include (can contain: customAttributes, tags, topics, segments, country, language, createdAt, clickedDates). If omitted, the full subscription is returned. Wait time until response will increase if more fields will be requested."}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n   \"subscription\": {\n   \"_id\" : \"XXXXXXXXXXXXXX\",\n   \"createdAt\" : \"2022-01-11T10:44:30.866Z\",\n   \"syncedAt\" : \"2022-01-11T11:41:06.181Z\",\n   \"channel\" : \"XXXXXXXXXXXXXX\",\n   \"browserType\" : \"Chrome\",\n   \"browserVersion\" : \"97\",\n   \"platformName\" : \"Mac OS\",\n   \"platformVersion\" : \"10\",\n   \"language\" : \"de\",\n   \"country\" : \"RU\",\n   \"timezone\" : \"Europe/Berlin\",\n   \"inactive\" : false,\n   \"topics\" : [],\n   \"type\" : \"web\",\n   \"segments\" : []}\n}","schema":{"title":"Success-Response:","type":"object","properties":{"subscription":{"type":"object","properties":{"_id":{"type":"string"},"createdAt":{"type":"string"},"syncedAt":{"type":"string"},"channel":{"type":"string"},"browserType":{"type":"string"},"browserVersion":{"type":"string"},"platformName":{"type":"string"},"platformVersion":{"type":"string"},"language":{"type":"string"},"country":{"type":"string"},"timezone":{"type":"string"},"inactive":{"type":"boolean"},"topics":{"type":"array","items":{}},"type":{"type":"string"},"segments":{"type":"array","items":{}}}},"The":{"type":"object","properties":{},"description":"<p>subscription</p>"}},"required":["The"]}}},"description":"Success-Response:"},"400":{"content":{"application/json":{"example":"HTTP/1.1 400 Bad Request\n{\n  \"error\": \"subscriptionId or attributeId/attributeValue or emailAddress required\"\n}","schema":{"title":"Error-Response:","type":"object","properties":{"error":{"type":"string"}}}}},"description":"Error-Response:"}}}},"/channel/{channelId}/subscription/{id}/conversions":{"get":{"tags":["Subscriptions"],"summary":"GetSubscriptionConversions","description":"Get subscription conversions","parameters":[{"schema":{"type":"string"},"in":"header","name":"Authorization","description":"Private API key","required":true},{"schema":{"type":"string"},"in":"path","name":"channelId","description":"The channel ID","required":true},{"schema":{"type":"string"},"in":"path","name":"id","description":"The subscription ID","required":true},{"schema":{"type":"string"},"in":"query","name":"eventId","description":"Optionally filter by conversion event ID"},{"schema":{"type":"string"},"in":"query","name":"limit","description":"Number of conversions per page. Default: 100."},{"schema":{"type":"string"},"in":"query","name":"pageToken","description":"Pagination token from a previous response to fetch the next page"}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"conversions\": [\n    {\n      \"subscription\": \"FGHjbc6txDA8AmT65\",\n      \"channel\": \"ohzZqghh2jxaYaXTi\",\n      \"eventId\": \"ebiZDPPzHtKHbBBrX\",\n      \"notification\": \"XXXXXXXX\",\n      \"date\": \"2026-07-02T11:43:40.913Z\",\n      \"properties\": { \"amount\": \"12.50\", \"currency\": \"EUR\" }\n    }\n  ],\n  \"pageToken\": \"...\"\n}","schema":{"title":"Success-Response:","type":"object","properties":{"conversions":{"type":"array","items":{"type":"object","properties":{"subscription":{"type":"string","description":"<p>The subscription ID</p>"},"channel":{"type":"string","description":"<p>The channel ID</p>"},"eventId":{"type":"string","description":"<p>The conversion event ID</p>"},"notification":{"type":"string","description":"<p>Associated notification ID when present</p>"},"date":{"type":"string","description":"<p>ISO 8601 timestamp of the conversion</p>"},"properties":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"description":"<p>Conversion properties (e.g. amount, currency)</p>"}},"required":["subscription","channel","eventId","date","properties"]},"description":"<p>List of recorded conversions</p>"},"pageToken":{"type":"string","description":"<p>Pagination token for the next page when more results are available</p>"}},"required":["conversions"]}}},"description":"Success-Response:"}}}},"/channel/{channelId}/subscription/notification-events":{"get":{"tags":["Subscriptions"],"summary":"GetSubscriptionNotificationEvents","description":"Get subscription notification events","parameters":[{"schema":{"type":"string"},"in":"path","name":"channelId","description":"The channel ID.","required":true},{"schema":{"type":"string"},"in":"query","name":"subscriptionId","description":"The subscription ID to fetch events for. Location: query parameter. Required.","required":true},{"schema":{"type":"string"},"in":"query","name":"notificationId","description":"Optional. When set, restricts results to this notification ID only. When omitted, events for all notifications of the subscription are returned."},{"schema":{"type":"string"},"in":"query","name":"type","description":"Filter by a specific event type (e.g. 'delivered', 'inAppDelivered', 'clicked', 'opened', 'softBounce', 'hardBounce', 'emailSpamComplained', 'tagAdded', 'tagRemoved', 'topicAdded', 'topicRemoved', 'segmentAdded', 'segmentRemoved', 'voucherCodeSent', 'uniqueClickedLinks'). If omitted, all types are returned."},{"schema":{"type":"string"},"in":"query","name":"limit","description":"Number of events per page. Default: 100."},{"schema":{"type":"string"},"in":"query","name":"pageToken","description":"Pagination token from a previous response to fetch the next page."},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"fields","description":"Optional query parameter. Select response fields for each event. If omitted, the default full event response is returned. Supported event fields: subscriptionId, notificationId, type, payload, date. Additional notification fields available on request: subject, notificationTitle, notificationText, templateId, templateName."}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"events\": [\n    {\n      \"subscriptionId\": \"AGE9LfiSGrfSoKgEk\",\n      \"notificationId\": \"DtA9TAjrH4RqHXSQb\",\n      \"type\": \"delivered\",\n      \"payload\": null,\n      \"date\": \"2026-01-01T14:15:34.629Z\"\n    }\n  ],\n  \"pageToken\": \"nextPageTokenString\"\n}","schema":{"title":"Success-Response:","type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"subscriptionId":{"type":"string","description":"<p>The subscription ID.</p>"},"notificationId":{"type":"string","description":"<p>The notification ID.</p>"},"type":{"type":"string","description":"<p>The event type (e.g. 'delivered', 'clicked').</p>"},"payload":{"type":"string","description":"<p>The event payload (may be null).</p>"},"date":{"type":"string","description":"<p>ISO 8601 timestamp of the event.</p>"}},"required":["subscriptionId","notificationId","type","payload","date"]},"description":"<p>List of notification events.</p>"},"pageToken":{"type":"string","description":"<p>Pagination token for the next page. Only present when more results are available.</p>"}},"required":["events"]}}},"description":"Success-Response:"}}}},"/subscription/mark-as-test":{"post":{"tags":["Subscriptions"],"summary":"MarkSubscriptionAsTest","description":"Mark or Unmark Subscription As Test","parameters":[],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success Response:","type":"object","properties":{"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success Response:"},"400":{"content":{"application/json":{"example":"HTTP/1.1 400 Bad Request\n{\n  \"error\": 400,\n  \"message\": \"missing parameter\"\n}","schema":{"title":"Missing Parameter Response:","type":"object","properties":{"error":{"type":"number"},"message":{"type":"string"}}}}},"description":"Missing Parameter Response:"},"404":{"content":{"application/json":{"example":"HTTP/1.1 404 Not Found\n{\n  \"error\": 404,\n  \"message\": \"subscription not found\"\n}","schema":{"title":"Not Found Response:","type":"object","properties":{"error":{"type":"number"},"message":{"type":"string"}}}}},"description":"Not Found Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"channelId":{"type":"string","description":"<p>The channel ID.</p>"},"subscriptionId":{"type":"string","description":"<p>The subscription ID to mark or unmark as test.</p>"},"isTest":{"type":"boolean","description":"<p>Set to <code>true</code> to mark as test, <code>false</code> to unmark. Defaults to <code>true</code> when omitted for backwards compatibility.</p>"}},"type":"object","required":["channelId","subscriptionId"]}}}}}},"/subscription/attribute/push-value":{"post":{"tags":["Subscriptions"],"summary":"PushSubscriptionAttributeValue","description":"Push value to subscription array attributes","parameters":[],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"channelId":{"type":"string","description":"<p>The channel ID.</p>"},"attributeId":{"type":"string","description":"<p>The attribute ID. Possible array attribute IDs are currently only <code>categories</code> and <code>products</code>.</p>"},"value":{"type":"string","description":"<p>The attribute value. Can be a String (max length: 255 characters) or Number. If the attribute is configured to store arrays, the maximum length of the array should be 1000.</p>"},"subscriptionId":{"type":"string","description":"<p>The subscription ID.</p>"},"subscriptionIds":{"items":{"type":"string","description":"<p>The subscription IDs (max. 1000).</p>"},"type":"array","description":"<p>The subscription IDs (max. 1000).</p>"}},"type":"object","required":["channelId","attributeId","value"]}}}}}},"/subscription/attribute/pull-value":{"post":{"tags":["Subscriptions"],"summary":"PushSubscriptionAttributeValue","description":"Pull value from subscription array attributes","parameters":[],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"channelId":{"type":"string","description":"<p>The channel ID.</p>"},"attributeId":{"type":"string","description":"<p>The attribute ID. Possible array attribute IDs are currently only <code>categories</code> and <code>products</code>.</p>"},"value":{"type":"string","description":"<p>The attribute value. Can be a String (max length: 255 characters) or Number. If the attribute is configured to store arrays, the maximum length of the array should be 1000.</p>"},"subscriptionId":{"type":"string","description":"<p>The subscription ID.</p>"},"subscriptionIds":{"items":{"type":"string","description":"<p>The subscription IDs (max. 1000).</p>"},"type":"array","description":"<p>The subscription IDs (max. 1000).</p>"}},"type":"object","required":["channelId","attributeId","value"]}}}}}},"/subscription/topic/remove":{"post":{"tags":["Subscriptions"],"summary":"RemoveTopicFromSubscription","description":"Remove topic from subscription","parameters":[],"responses":{"201":{"content":{"application/json":{"example":"HTTP/1.1 201 Created\n{\n    \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean"}}}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"channelId":{"type":"string","description":"<p>The channel ID.</p>"},"topicId":{"type":"string","description":"<p>The topic ID to remove.</p>"},"subscriptionId":{"type":"string","description":"<p>The subscription ID from which to remove the topic.</p>"}},"type":"object","required":["channelId","topicId","subscriptionId"]}}}}}},"/subscription/attribute":{"post":{"tags":["Subscriptions"],"summary":"SetSubscriptionAttribute","description":"Set a subscription's attribute","parameters":[],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"channelId":{"type":"string","description":"<p>The channel ID.</p>"},"attributeId":{"type":"string","description":"<p>The attribute ID.</p>"},"value":{"type":"string","description":"<p>The attribute value. Can be a String (max length: 255 characters) or Number. If the attribute is configured to store arrays, the maximum length of the array should be 1000.</p>"},"subscriptionId":{"type":"string","description":"<p>The subscription ID.</p>"},"subscriptionIds":{"items":{"type":"string","description":"<p>The subscription IDs (max. 1000).</p>"},"type":"array","description":"<p>The subscription IDs (max. 1000).</p>"}},"type":"object","required":["channelId","attributeId","value"]}}}}}},"/subscription/sync/{id}":{"post":{"tags":["Subscriptions"],"summary":"SyncSubscription","description":"Sync subscription","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel ID.","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"id\": \"SUBSCRIPTION_ID_HERE\"\n}","schema":{"title":"Success (Updated):","type":"object","properties":{"id":{"type":"string","description":"<p>The Subscription ID</p>"}},"required":["id"]}}},"description":"Success (Updated):"},"201":{"content":{"application/json":{"example":"HTTP/1.1 201 Created\n{\n  \"id\": \"SUBSCRIPTION_ID_HERE\"\n}","schema":{"title":"Success (Created):","type":"object","properties":{"id":{"type":"string"}}}}},"description":"Success (Created):"},"400":{"content":{"application/json":{"example":"HTTP/1.1 400 Bad request\n{\n  \"error\": 400,\n  \"message\": \"channel not found\"\n}","schema":{"title":"Error (Channel not found):","type":"object","properties":{"error":{"type":"number"},"message":{"type":"string"}}}}},"description":"Error (Channel not found):"},"404":{"content":{"application/json":{"example":"HTTP/1.1 404 Not found\n{\n  \"error\": 404,\n  \"message\": \"subscription not found and updateOnly mode is enabled\"\n}","schema":{"title":"Error (Update Only):","type":"object","properties":{"error":{"type":"number"},"message":{"type":"string"}}}}},"description":"Error (Update Only):"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"subscriptionId":{"type":"string","description":"<p>Synchronize/update an existing subscription</p>"},"endpoint":{"type":"string","description":"<p>Web push subscription endpoint (for Web Push)</p>"},"publicKey":{"type":"string","description":"<p>Public key for web push notifications</p>"},"authSecret":{"type":"string","description":"<p>Auth secret for web push notifications</p>"},"apnsToken":{"type":"string","description":"<p>Apple Push Notification Services token (for iOS Apps or Mac OS Safari)</p>"},"fcmToken":{"type":"string","description":"<p>Google / Firebase Cloud Messaging token (for Android Apps)</p>"},"fcmId":{"type":"string","description":"<p>Google / Firebase Cloud Messaging Sender ID (for Android Apps)</p>"},"emailAddress":{"type":"string","description":"<p>Email address (for Email channels). Can be changed by specifying the <code>uniqueIdentifier</code> field.</p>"},"emailOptInFormId":{"type":"string","description":"<p>Email Opt In Form ID (for Email channels)</p>"},"emailOptInConfirmationIgnored":{"type":"boolean","description":"<p>Ignore double opt-in for email subscriptions topics - This lets you assign topics directly even if double opt-in is enabled</p>"},"emailConfirmed":{"type":"boolean","description":"<p>Set to <code>true</code> to directly confirm email contact without having to click the confirmation link in the double-opt-in email</p>"},"phoneNumber":{"type":"string","description":"<p>Phone number (for SMS channels)</p>"},"phoneConfirmed":{"type":"boolean","description":"<p>Set to <code>true</code> to directly confirm phone contact without having to click the confirmation link in the double-opt-in SMS</p>"},"customAttributes":{"type":"object","properties":{},"description":"<p>Object of custom attributes (Object Key = Attribute ID, Object value = Attribute value)</p>"},"topics":{"items":{"type":"string","description":"<p>Array of Topic IDs</p>"},"type":"array","description":"<p>Array of Topic IDs</p>"},"addTopics":{"type":"boolean","description":"<p>Only add specified Topic IDs instead of overriding them</p>"},"isEditTopics":{"type":"boolean","description":"<p>Email only - Necessary to override Topic IDs instead of only adding them</p>"},"browserType":{"type":"string","description":"<p>Browser name (Chrome, Firefox, ... or your app's name e.g. CleverPush)</p>"},"browserVersion":{"type":"string","description":"<p>Browser / Mobile SDK version</p>"},"appVersion":{"type":"string","description":"<p>Mobile app version</p>"},"platformName":{"type":"string","description":"<p>OS name (e.g. Windows, iOS, Android, ...)</p>"},"platformVersion":{"type":"string","description":"<p>OS version</p>"},"iosLiveActivityId":{"type":"string","description":"<p>Live Activity ID (Only for iOS)</p>"},"iosLiveActivityToken":{"type":"string","description":"<p>Live Activity Token (Only for iOS)</p>"},"uniqueIdentifier":{"type":"string","description":"<p>Field to identify existing subscription with. By default, a suitable field will be chosen automatically based on the channel type. Possible values: &quot;customAttributes.user_id&quot;, &quot;customAttributes.member_id&quot;, &quot;subscriptionId&quot;.</p>"},"updateOnly":{"type":"boolean","description":"<p>If used it will not create new subscription it will only update existing subscription</p>"}},"type":"object","required":["browserType","browserVersion","appVersion","platformName","platformVersion"]}}}}}},"/subscription/tag":{"post":{"tags":["Subscriptions"],"summary":"TagSubscription","description":"Tag a subscription","parameters":[],"responses":{"201":{"content":{"application/json":{"example":"HTTP/1.1 201 Created\n{\n    \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean"}}}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"channelId":{"type":"string","description":"<p>The channel ID.</p>"},"tagId":{"type":"string","description":"<p>The tag ID. Either tagId or tagExternalId is required.</p>"},"tagExternalId":{"type":"string","description":"<p>The external tag ID. Either tagId or tagExternalId is required.</p>"},"subscriptionId":{"type":"string","description":"<p>The subscription ID.</p>"},"subscriptionIds":{"items":{"type":"string","description":"<p>The subscription IDs (max. 1000).</p>"},"type":"array","description":"<p>The subscription IDs (max. 1000).</p>"}},"type":"object","required":["channelId"]}}}}}},"/subscription/trigger-product-campaigns":{"post":{"tags":["Subscriptions"],"summary":"TriggerProductCampaigns","description":"Trigger product follow-up campaigns","parameters":[],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"subscriptionId":{"type":"string","description":"<p>The subscription ID.</p>"},"channelId":{"type":"string","description":"<p>The Channel ID.</p>"},"triggerType":{"type":"string","description":"<p>The trigger type.</p>"},"productId":{"type":"string","description":"<p>The product ID.</p>"},"parameters":{"type":"object","properties":{},"description":"<p>The event parameters.</p>"}},"type":"object","required":["subscriptionId","channelId","triggerType","productId","parameters"]}}}}}},"/subscription/unsubscribe":{"post":{"tags":["Subscriptions"],"summary":"UnsubscribeSubscription","description":"Unsubscribe a subscription","parameters":[],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean"},"id":{"type":"string","description":"<p>The Subscription ID</p>"}},"required":["id"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"subscriptionId":{"type":"string","description":"<p>The subscription ID.</p>"},"channelId":{"type":"string","description":"<p>The channel ID.</p>"},"optOutSource":{"type":"string","description":"<p>The opt-out source.</p>"},"markAsUnsubscribed":{"type":"boolean","description":"<p>Set to true to specifically handle email unsubscription (will mark email as blocked instead of removing the subscription).</p>"},"topics":{"items":{"type":"string","description":"<p>Array of topic IDs to unsubscribe from. And it will be used only if <code>markAsUnsubscribed</code> is true.</p>"},"type":"array","description":"<p>Array of topic IDs to unsubscribe from. And it will be used only if <code>markAsUnsubscribed</code> is true.</p>"}},"type":"object","required":["subscriptionId","channelId","optOutSource"]}}}}}},"/subscription/untag":{"post":{"tags":["Subscriptions"],"summary":"UntagSubscription","description":"Untag a subscription","parameters":[],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n  \"success\": true\n}","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean","description":""}},"required":["success"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"channelId":{"type":"string","description":"<p>The channel ID.</p>"},"tagId":{"type":"string","description":"<p>The tag ID. Either tagId or tagExternalId is required.</p>"},"tagExternalId":{"type":"string","description":"<p>The external tag ID. Either tagId or tagExternalId is required.</p>"},"subscriptionId":{"type":"string","description":"<p>The single subscription ID.</p>"},"subscriptionIds":{"items":{"type":"string","description":"<p>Array of subscription IDs (maximum 1000).</p>"},"type":"array","description":"<p>Array of subscription IDs (maximum 1000).</p>"}},"type":"object","required":["channelId"]}}}}}},"/survey/answers/{channelId}/{surveyId}":{"get":{"tags":["Survey"],"summary":"GetSurveyAnswers","description":"Get Survey Answers","parameters":[{"schema":{"type":"string"},"in":"path","name":"channelId","description":"Channel ID","required":true},{"schema":{"type":"string"},"in":"path","name":"surveyId","description":"Survey ID","required":true},{"schema":{"type":"string","default":"50"},"in":"query","name":"limit","description":"Page size (max 200)"},{"schema":{"type":"string","default":"1"},"in":"query","name":"page","description":"Page number (1-based)"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{},"type":"object","required":[]}}}}}}},"/team/{id}/members":{"post":{"tags":["Teams"],"summary":"TeamMemberCreate","description":"Create a team member","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The team id","required":true}],"responses":{"201":{"content":{"application/json":{"example":"HTTP/1.1 201 OK\n{\n  \"user\": { \"_id\": \"XXXXXXXX\", \"profile\": { \"name\": \"John Doe\" }, \"newUser\": true }\n}","schema":{"title":"Success-Response:","type":"object","properties":{"user":{"type":"object","properties":{"_id":{"type":"string"},"profile":{"type":"object","properties":{"name":{"type":"string"}}},"newUser":{"type":"boolean"}}}}}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"email":{"type":"string","description":"<p>The team member email</p>"},"role":{"type":"string","description":"<p>The team member role (default: 'admin')</p>"},"channels":{"items":{"type":"string","description":"<p>Array of channel IDs the team member has access to (default: all channels in team)</p>"},"type":"array","description":"<p>Array of channel IDs the team member has access to (default: all channels in team)</p>"}},"type":"object","required":["email"]}}}}}},"/teams":{"post":{"tags":["Teams"],"summary":"TeamsCreate","description":"Create a team","parameters":[],"responses":{"201":{"content":{"application/json":{"example":"HTTP/1.1 201 OK\n{\n  \"team\": { \"_id\": \"XXXXXXXX\" }\n}","schema":{"title":"Success-Response:","type":"object","properties":{"team":{"type":"object","properties":{"_id":{"type":"string"}}}}}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string","description":"<p>The team name</p>"},"channels":{"items":{"type":"string","description":"<p>Array of channel IDs the team members have access to (unless overridden in specific member settings)</p>"},"type":"array","description":"<p>Array of channel IDs the team members have access to (unless overridden in specific member settings)</p>"}},"type":"object","required":["name","channels"]}}}}}},"/channel/{channelId}/web-banners":{"post":{"tags":["WebBanner"],"summary":"Create_WebBanner","description":"Create WebBanner","parameters":[{"schema":{"type":"string"},"in":"path","name":"channelId","description":"The Channel ID","required":true}],"responses":{"200":{"content":{"application/json":{"example":"    HTTP/1.1 200 OK\n{\n    \"webBannerId\": \"xxxxxxx34xxxx\",\n    \"status\": true\n    }","schema":{"title":"Success-Response:","type":"object","properties":{"webBannerId":{"type":"string"},"status":{"type":"boolean"},"String":{"type":"string","description":"<p>containing webBannerId</p>"},"Boolean":{"type":"boolean","description":"<p>value containing status field</p>"}},"required":["String","Boolean"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string","description":""},"contentState":{"type":"object","properties":{}},"buttonStyle":{"type":"object","properties":{}},"startsAt":{"type":"string","description":""},"endsAt":{"type":"string","description":""},"timeout":{"type":"number","description":""},"status":{"type":"string","description":""},"matchPath":{"type":"string","description":""},"matchDomain":{"type":"string","description":""},"matchQuery":{"type":"object","properties":{}},"noMatchPath":{"type":"string","description":""},"matchFunction":{"type":"string","description":""},"trafficPercentage":{"type":"number","description":""},"scrollPercentage":{"type":"number","description":""},"showOnlySubscribers":{"type":"boolean","description":""},"customCss":{"type":"string","description":""},"darkenBackground":{"type":"boolean","description":""},"exitIntent":{"type":"boolean","description":""},"exitIntentForMobile":{"type":"boolean","description":""},"enableRegularDisplayForMobile":{"type":"boolean","description":""},"minimumVisits":{"type":"number","description":""},"attributes":{"type":"array","items":{"type":"object","properties":{}}},"oncePerClick":{"type":"boolean","description":""},"frequency":{"type":"string","description":""},"frequencyInterval":{"type":"number","description":""},"tags":{"items":{"type":"string","description":""},"type":"array"},"excludeTags":{"items":{"type":"string","description":""},"type":"array"},"topics":{"items":{"type":"string","description":""},"type":"array"},"excludeTopics":{"items":{"type":"string","description":""},"type":"array"},"topicsLogic":{"type":"string","description":""},"tagsLogic":{"type":"string","description":""}},"type":"object","required":["name","contentState","buttonStyle","startsAt","endsAt","timeout","status","matchPath","matchDomain","matchQuery","noMatchPath","matchFunction","trafficPercentage","scrollPercentage","showOnlySubscribers","customCss","darkenBackground","exitIntent","exitIntentForMobile","enableRegularDisplayForMobile","minimumVisits","attributes","oncePerClick","frequency","frequencyInterval","tags","excludeTags","topics","excludeTopics","topicsLogic","tagsLogic"]}}}}},"get":{"tags":["WebBanner"],"summary":"Get_WebBanners","description":"Get All WebBanners of Channel","parameters":[{"schema":{"type":"string"},"in":"path","name":"channelId","description":"The Channel ID","required":true},{"schema":{"type":"string"},"in":"query","name":"limit","description":"How many WebBanners to get. Default: 10."},{"schema":{"type":"string"},"in":"query","name":"offset","description":"How many WebBanners to skip. Default: 0"}],"responses":{"200":{"content":{"application/json":{"example":"    HTTP/1.1 200 OK\n{\n    \"webBanners\": [\n   {\n           \"_id\": \"xxxxxxsdrcxxx\",\n           \"channel\": \"xxxxxxx3xxxx\",\n           \"name\": \"New Banner\",\n           \"contentState\": {\n               \"contentWidth\": 600,\n               \"bodyStyle\": {\n                   \"fontSize\": 14\n               },\n               \"linkStyle\": {\n                   \"textDecoration\": \"none\"\n               },\n               \"rows\": [\n                   {\n                       \"id\": \"KxCvxbJF\",\n                       \"colSize\": [\n                           12\n                       ],\n                       \"cols\": [\n                           {\n                               \"id\": \"Dm2HLS86\",\n                               \"size\": 12,\n                               \"elements\": [\n                                   {\n                                       \"id\": \"34tqLRQd\",\n                                       \"type\": \"text\",\n                                       \"style\": {\n                                           \"paddingTop\": 15,\n                                           \"paddingRight\": 15,\n                                           \"paddingBottom\": 15,\n                                           \"paddingLeft\": 15\n                                       },\n                                       \"focused\": false,\n                                       \"content\": \"<div><strong><span style=\\\"font-size: 22px;\\\">Special offer</span></strong></div>\"\n                                   },\n                                   {\n                                       \"type\": \"text\",\n                                       \"id\": \"maGnKJRT\",\n                                       \"style\": {\n                                           \"paddingTop\": 15,\n                                           \"paddingRight\": 15,\n                                           \"paddingBottom\": 15,\n                                           \"paddingLeft\": 15\n                                       },\n                                       \"focused\": false,\n                                       \"content\": \"<div>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</div>\"\n                                   },\n                                   {\n                                       \"type\": \"button\",\n                                       \"id\": \"w8Q8rFRz\",\n                                       \"content\": \"Button Text\",\n                                       \"url\": \"https://example.com\",\n                                       \"style\": {\n                                           \"textAlign\": \"center\"\n                                       },\n                                       \"buttonStyle\": {\n                                           \"borderRadius\": 50,\n                                           \"fontSize\": 18,\n                                           \"lineHeight\": 1.5,\n                                           \"width\": \"auto\",\n                                           \"display\": \"inline-block\",\n                                           \"backgroundColor\": \"rgb(26, 155, 230)\",\n                                           \"color\": \"#fff\",\n                                           \"paddingTop\": 10,\n                                           \"paddingBottom\": 10,\n                                           \"paddingLeft\": 15,\n                                           \"paddingRight\": 15,\n                                           \"textDecoration\": \"none\"\n                                       }\n                                   }\n                               ]\n                           }\n                       ],\n                       \"style\": {\n                           \"paddingTop\": 15,\n                           \"paddingLeft\": 15,\n                           \"paddingRight\": 15,\n                           \"paddingBottom\": 15,\n                           \"backgroundColor\": \"\"\n                       },\n                       \"contentStyle\": {\n                           \"backgroundColor\": \"\"\n                       }\n                   }\n               ]\n           },\n           \"buttonStyle\": {},\n           \"style\": {\n               \"backgroundColor\": \"#ffffff\"\n           },\n           \"updatedAt\": \"2022-10-05T05:21:57.088Z\",\n           \"status\": \"draft\",\n           \"timeout\": 0,\n           \"darkenBackground\": true,\n           \"matchQuery\": {},\n           \"attributes\": [\n               {\n                   \"id\": \"13\",\n                   \"value\": \"value of 13 id\"\n               },\n               {\n                   \"id\": \"14\",\n                   \"value\": \"value of 14 id\"\n               },\n               {\n                   \"id\": \"15\",\n                   \"value\": \"value of 15 id\"\n               }\n           ],\n           \"oncePerClick\": false,\n           \"createdAt\": \"2022-09-27T06:30:45.229Z\",\n           \"showOnlySubscribers\": false,\n           \"frequency\": \"once\",\n           \"excludeTags\": [],\n           \"content\": \"htmlContentBasedOnContentStateJson\"\n     }\n   ]\n }","schema":{"title":"Success-Response:","type":"object","properties":{"webBanners":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"channel":{"type":"string"},"name":{"type":"string"},"contentState":{"type":"object","properties":{"contentWidth":{"type":"number"},"bodyStyle":{"type":"object","properties":{"fontSize":{"type":"number"}}},"linkStyle":{"type":"object","properties":{"textDecoration":{"type":"string"}}},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"colSize":{"type":"array","items":{"type":"number"}},"cols":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"size":{"type":"number"},"elements":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"style":{"type":"object","properties":{"paddingTop":{"type":"number"},"paddingRight":{"type":"number"},"paddingBottom":{"type":"number"},"paddingLeft":{"type":"number"},"textAlign":{"type":"string"}}},"focused":{"type":"boolean"},"content":{"type":"string"},"url":{"type":"string"},"buttonStyle":{"type":"object","properties":{"borderRadius":{"type":"number"},"fontSize":{"type":"number"},"lineHeight":{"type":"number"},"width":{"type":"string"},"display":{"type":"string"},"backgroundColor":{"type":"string"},"color":{"type":"string"},"paddingTop":{"type":"number"},"paddingBottom":{"type":"number"},"paddingLeft":{"type":"number"},"paddingRight":{"type":"number"},"textDecoration":{"type":"string"}}}},"required":["type","id","style","focused","content"]}}}}},"style":{"type":"object","properties":{"paddingTop":{"type":"number"},"paddingLeft":{"type":"number"},"paddingRight":{"type":"number"},"paddingBottom":{"type":"number"},"backgroundColor":{"type":"string"}}},"contentStyle":{"type":"object","properties":{"backgroundColor":{"type":"string"}}}}}}}},"buttonStyle":{"type":"object","properties":{}},"style":{"type":"object","properties":{"backgroundColor":{"type":"string"}}},"updatedAt":{"type":"string"},"status":{"type":"string"},"timeout":{"type":"number"},"darkenBackground":{"type":"boolean"},"matchQuery":{"type":"object","properties":{}},"attributes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"}},"required":["id","value"]}},"oncePerClick":{"type":"boolean"},"createdAt":{"type":"string"},"showOnlySubscribers":{"type":"boolean"},"frequency":{"type":"string"},"excludeTags":{"type":"array","items":{}},"content":{"type":"string"}}}},"Array":{"type":"array","items":{"type":"object","properties":{}},"description":"<p>of objects containing webbanners</p>"}},"required":["Array"]}}},"description":"Success-Response:"}}}},"/channel/{channelId}/web-banners/{webBannerId}":{"delete":{"tags":["WebBanner"],"summary":"DeleteWebBannerById","description":"Delete WebBanner","parameters":[{"schema":{"type":"string"},"in":"path","name":"channelId","description":"The Channel ID","required":true},{"schema":{"type":"string"},"in":"path","name":"webBannerId","description":"The Web Banner ID","required":true}],"responses":{"200":{"content":{"application/json":{"example":" HTTP/1.1 200 OK\n{\n     \"success\": true\n     }","schema":{"title":"Success-Response:","type":"object","properties":{"success":{"type":"boolean"},"Object":{"type":"object","properties":{},"description":"<p>containing success boolean value</p>"}},"required":["Object"]}}},"description":"Success-Response:"}}},"get":{"tags":["WebBanner"],"summary":"Get_WebBanner_By_Id","description":"Get WebBanner by Id for particular channel","parameters":[{"schema":{"type":"string"},"in":"path","name":"channelId","description":"The Channel ID","required":true},{"schema":{"type":"string"},"in":"path","name":"webBannerId","description":"The webBanner ID","required":true}],"responses":{"200":{"content":{"application/json":{"example":"    HTTP/1.1 200 OK\n{\n   \"webBanner\": {\n           \"_id\": \"xxxxxxsdrcxxx\",\n           \"channel\": \"xxxxxxx3xxxx\",\n           \"name\": \"New Banner\",\n           \"contentState\": {\n               \"contentWidth\": 600,\n               \"bodyStyle\": {\n                   \"fontSize\": 14\n               },\n               \"linkStyle\": {\n                   \"textDecoration\": \"none\"\n               },\n               \"rows\": [\n                   {\n                       \"id\": \"KxCvxbJF\",\n                       \"colSize\": [\n                           12\n                       ],\n                       \"cols\": [\n                           {\n                               \"id\": \"Dm2HLS86\",\n                               \"size\": 12,\n                               \"elements\": [\n                                   {\n                                       \"id\": \"34tqLRQd\",\n                                       \"type\": \"text\",\n                                       \"style\": {\n                                           \"paddingTop\": 15,\n                                           \"paddingRight\": 15,\n                                           \"paddingBottom\": 15,\n                                           \"paddingLeft\": 15\n                                       },\n                                       \"focused\": false,\n                                       \"content\": \"<div><strong><span style=\\\"font-size: 22px;\\\">Special offer</span></strong></div>\"\n                                   },\n                                   {\n                                       \"type\": \"text\",\n                                       \"id\": \"maGnKJRT\",\n                                       \"style\": {\n                                           \"paddingTop\": 15,\n                                           \"paddingRight\": 15,\n                                           \"paddingBottom\": 15,\n                                           \"paddingLeft\": 15\n                                       },\n                                       \"focused\": false,\n                                       \"content\": \"<div>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</div>\"\n                                   },\n                                   {\n                                       \"type\": \"button\",\n                                       \"id\": \"w8Q8rFRz\",\n                                       \"content\": \"Button Text\",\n                                       \"url\": \"https://example.com\",\n                                       \"style\": {\n                                           \"textAlign\": \"center\"\n                                       },\n                                       \"buttonStyle\": {\n                                           \"borderRadius\": 50,\n                                           \"fontSize\": 18,\n                                           \"lineHeight\": 1.5,\n                                           \"width\": \"auto\",\n                                           \"display\": \"inline-block\",\n                                           \"backgroundColor\": \"rgb(26, 155, 230)\",\n                                           \"color\": \"#fff\",\n                                           \"paddingTop\": 10,\n                                           \"paddingBottom\": 10,\n                                           \"paddingLeft\": 15,\n                                           \"paddingRight\": 15,\n                                           \"textDecoration\": \"none\"\n                                       }\n                                   }\n                               ]\n                           }\n                       ],\n                       \"style\": {\n                           \"paddingTop\": 15,\n                           \"paddingLeft\": 15,\n                           \"paddingRight\": 15,\n                           \"paddingBottom\": 15,\n                           \"backgroundColor\": \"\"\n                       },\n                       \"contentStyle\": {\n                           \"backgroundColor\": \"\"\n                       }\n                   }\n               ]\n           },\n           \"buttonStyle\": {},\n           \"style\": {\n               \"backgroundColor\": \"#ffffff\"\n           },\n           \"updatedAt\": \"2022-10-05T05:21:57.088Z\",\n           \"status\": \"draft\",\n           \"timeout\": 0,\n           \"darkenBackground\": true,\n           \"matchQuery\": {},\n           \"attributes\": [\n               {\n                   \"id\": \"13\",\n                   \"value\": \"value of 13 id\"\n               },\n               {\n                   \"id\": \"14\",\n                   \"value\": \"value of 14 id\"\n               },\n               {\n                   \"id\": \"15\",\n                   \"value\": \"value of 15 id\"\n               }\n           ],\n           \"oncePerClick\": false,\n           \"createdAt\": \"2022-09-27T06:30:45.229Z\",\n           \"showOnlySubscribers\": false,\n           \"frequency\": \"once\",\n           \"excludeTags\": [],\n           \"content\": \"htmlContentBasedOnContentStateJson\"\n         }\n }","schema":{"title":"Success-Response:","type":"object","properties":{"webBanner":{"type":"object","properties":{"_id":{"type":"string"},"channel":{"type":"string"},"name":{"type":"string"},"contentState":{"type":"object","properties":{"contentWidth":{"type":"number"},"bodyStyle":{"type":"object","properties":{"fontSize":{"type":"number"}}},"linkStyle":{"type":"object","properties":{"textDecoration":{"type":"string"}}},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"colSize":{"type":"array","items":{"type":"number"}},"cols":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"size":{"type":"number"},"elements":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"style":{"type":"object","properties":{"paddingTop":{"type":"number"},"paddingRight":{"type":"number"},"paddingBottom":{"type":"number"},"paddingLeft":{"type":"number"},"textAlign":{"type":"string"}}},"focused":{"type":"boolean"},"content":{"type":"string"},"url":{"type":"string"},"buttonStyle":{"type":"object","properties":{"borderRadius":{"type":"number"},"fontSize":{"type":"number"},"lineHeight":{"type":"number"},"width":{"type":"string"},"display":{"type":"string"},"backgroundColor":{"type":"string"},"color":{"type":"string"},"paddingTop":{"type":"number"},"paddingBottom":{"type":"number"},"paddingLeft":{"type":"number"},"paddingRight":{"type":"number"},"textDecoration":{"type":"string"}}}},"required":["type","id","style","focused","content"]}}}}},"style":{"type":"object","properties":{"paddingTop":{"type":"number"},"paddingLeft":{"type":"number"},"paddingRight":{"type":"number"},"paddingBottom":{"type":"number"},"backgroundColor":{"type":"string"}}},"contentStyle":{"type":"object","properties":{"backgroundColor":{"type":"string"}}}}}}}},"buttonStyle":{"type":"object","properties":{}},"style":{"type":"object","properties":{"backgroundColor":{"type":"string"}}},"updatedAt":{"type":"string"},"status":{"type":"string"},"timeout":{"type":"number"},"darkenBackground":{"type":"boolean"},"matchQuery":{"type":"object","properties":{}},"attributes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"}},"required":["id","value"]}},"oncePerClick":{"type":"boolean"},"createdAt":{"type":"string"},"showOnlySubscribers":{"type":"boolean"},"frequency":{"type":"string"},"excludeTags":{"type":"array","items":{}},"content":{"type":"string"}}},"Object":{"type":"object","properties":{},"description":"<p>containing the WebBanner for given webBannerId</p>"}},"required":["Object"]}}},"description":"Success-Response:"}}},"post":{"tags":["WebBanner"],"summary":"Update_WebBanner_By_ID","description":"Update WebBanner","parameters":[{"schema":{"type":"string"},"in":"path","name":"channelId","description":"The Channel ID","required":true},{"schema":{"type":"string"},"in":"path","name":"webBannerId","description":"The Web Banner ID","required":true}],"responses":{"200":{"content":{"application/json":{"example":" HTTP/1.1 200 OK\n{\n \"updatedBanner\": {\n     \"attributes\": [\n         {\n             \"id\": \"13\",\n             \"value\": \"value of 13 id\"\n         },\n         {\n             \"id\": \"14\",\n             \"value\": \"value of 14 id\"\n         },\n         {\n             \"id\": \"15\",\n             \"value\": \"value of 15 id\"\n         }\n     ],\n     \"updatedAt\": \"2022-10-05T05:21:57.088Z\"\n },\n \"status\": true\n }","schema":{"title":"Success-Response:","type":"object","properties":{"updatedBanner":{"type":"object","properties":{"attributes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"}},"required":["id","value"]}},"updatedAt":{"type":"string"}}},"status":{"type":"boolean"},"Object":{"type":"object","properties":{},"description":"<p>containing updated values and updatedAt field</p>"},"Boolean":{"type":"boolean","description":"<p>value containing status field</p>"}},"required":["Object","Boolean"]}}},"description":"Success-Response:"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"Object":{"type":"object","properties":{},"description":"<p>containing the values which is to be updated</p>"}},"type":"object","required":["Object"]}}}}}},"/channel/{channelId}/web-banners/{id}/statistics":{"get":{"tags":["WebBanner"],"summary":"GetWebBannerStatistics","description":"Get Web Banner Statistics","parameters":[{"schema":{"type":"string"},"in":"path","name":"channelId","description":"The id of the channel","required":true},{"schema":{"type":"string"},"in":"path","name":"id","description":"The id of the web banner","required":true},{"schema":{"type":"string"},"in":"query","name":"startDate","description":"The start date of the statistics","required":true},{"schema":{"type":"string"},"in":"query","name":"endDate","description":"The end date of the statistics (max 90 days)","required":true}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n    \"statistics\": [\n        {\n            \"date\": \"2024-01-01T00:00:00.000Z\",\n            \"totalClicked\": 10,\n            \"totalDelivered\": 20,\n            \"totalClosed\": 1,\n            \"totalBounces\": 2,\n            \"totalConversions\": 3\n        },\n        {\n            \"date\": \"2024-01-02T00:00:00.000Z\",\n            \"totalClicked\": 15,\n            \"totalDelivered\": 25,\n            \"totalClosed\": 1,\n            \"totalBounces\": 2,\n            \"totalConversions\": 3\n        }\n    ],\n    \"metadata\": {\n        \"query\": {\n            \"startDate\": \"2024-01-01T00:00:00.000Z\",\n            \"endDate\": \"2024-01-02T23:59:59.999Z\"\n        }\n    }\n}","schema":{"title":"Success-Response:","type":"object","properties":{"statistics":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"totalClicked":{"type":"number"},"totalDelivered":{"type":"number"},"totalClosed":{"type":"number"},"totalBounces":{"type":"number"},"totalConversions":{"type":"number"}},"required":["date","totalClicked","totalDelivered","totalClosed","totalBounces","totalConversions"]},"description":"<p>The statistics of the web banner</p>"},"metadata":{"type":"object","properties":{"query":{"type":"object","properties":{"startDate":{"type":"string"},"endDate":{"type":"string"}}}}}},"required":["statistics"]}}},"description":"Success-Response:"}}}},"/channel/{id}/whatsapp-templates":{"get":{"tags":["Whatsapp"],"summary":"GetWhatsAppTemplates","description":"Get WhatsApp templates","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","description":"The channel ID","required":true},{"schema":{"type":"string"},"in":"query","name":"offset","description":"How many templates to skip. Default: 0"},{"schema":{"type":"string"},"in":"query","name":"limit","description":"How many templates to get. Default: 25"}],"responses":{"200":{"content":{"application/json":{"example":"HTTP/1.1 200 OK\n{\n \"templates\": [\n   {\n     \"category\": \"MARKETING\",\n     \"components\": [\n       {\n         \"example\": {\n           \"body_text\": [\n               \"get quotes\",\n               \"business query\",\n               \"normal optioon\"\n           ]\n         },\n         \"text\": \"What do you want to do now? {{1}} {{2}} {{3}}\",\n         \"type\": \"BODY\"\n       },\n       {\n         \"example\": {\n           \"header_handle\": [\n             \"https://images.unsplash.com/photo-1641584495089-5914d85d9bcc?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1170&q=80\"\n           ]\n         },\n         \"format\": \"IMAGE\",\n         \"type\": \"HEADER\"\n       },\n       {\n         \"text\": \"your-footer-text\",\n         \"type\": \"FOOTER\"\n       },\n       {\n         \"buttons\": [\n           {\n             \"phone_number\": \"+1(650) 555-1111\",\n             \"text\": \"your-phone-button-text\",\n             \"type\": \"PHONE_NUMBER\"\n           },\n           {\n             \"example\": [\n               \"de/blog/dynamic-url-example\"\n             ],\n             \"text\": \"your-url-button-text\",\n             \"type\": \"URL\",\n             \"url\": \"https://www.website.com/{{1}}\"\n           }\n         ],\n         \"type\": \"BUTTONS\"\n       }\n     ],\n     \"language\": \"en_US\",\n     \"name\": \"template_name_example\",\n     \"namespace\": \"54************af5\",\n     \"rejected_reason\": \"\",\n     \"status\": \"approved\"\n   }\n ],\n \"count\": 1\n}","schema":{"title":"Success-Response:","type":"object","properties":{"templates":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"components":{"type":"array","items":{"type":"object","properties":{"example":{"type":"object","properties":{"body_text":{"type":"array","items":{"type":"string"}},"header_handle":{"type":"array","items":{"type":"string"}}}},"text":{"type":"string"},"type":{"type":"string"},"format":{"type":"string"},"buttons":{"type":"array","items":{"type":"object","properties":{"phone_number":{"type":"string"},"text":{"type":"string"},"type":{"type":"string"},"example":{"type":"array","items":{"type":"string"}},"url":{"type":"string"}},"required":["text","type"]}}},"required":["example","type","text"]}},"language":{"type":"string"},"name":{"type":"string"},"namespace":{"type":"string"},"rejected_reason":{"type":"string"},"status":{"type":"string"}}},"description":"<p>WhatsApp Templates</p>"},"count":{"type":"number"}},"required":["templates"]}}},"description":"Success-Response:"}}}}}}