Replace an existing subscription (full PUT)
curl --request PUT \
--url https://{host}/subscriptions/{platformType}/{subscriptionRef} \
--header 'Content-Type: application/json' \
--data '
{
"subscriptionName": "<string>",
"owner": "<string>",
"description": "<string>",
"outputType": "application/json",
"active": "false",
"propertyReferences": [
{
"propertyID": "<string>",
"operator": "<string>",
"values": [
"<string>"
]
}
],
"tagReferences": [
{
"tagID": "<string>",
"operator": "<string>",
"values": [
"<string>"
]
}
],
"suppressionReferences": [
{
"suppressionID": "<string>",
"operator": "<string>",
"values": [
"<string>"
],
"revokeBy": "<string>"
}
],
"returnStructure": {
"showAliases": false,
"fields": [
"<string>"
]
},
"schedule": {
"frequency": "<string>",
"at": "<string>"
}
}
'import requests
url = "https://{host}/subscriptions/{platformType}/{subscriptionRef}"
payload = {
"subscriptionName": "<string>",
"owner": "<string>",
"description": "<string>",
"outputType": "application/json",
"active": "false",
"propertyReferences": [
{
"propertyID": "<string>",
"operator": "<string>",
"values": ["<string>"]
}
],
"tagReferences": [
{
"tagID": "<string>",
"operator": "<string>",
"values": ["<string>"]
}
],
"suppressionReferences": [
{
"suppressionID": "<string>",
"operator": "<string>",
"values": ["<string>"],
"revokeBy": "<string>"
}
],
"returnStructure": {
"showAliases": False,
"fields": ["<string>"]
},
"schedule": {
"frequency": "<string>",
"at": "<string>"
}
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
subscriptionName: '<string>',
owner: '<string>',
description: '<string>',
outputType: 'application/json',
active: 'false',
propertyReferences: [{propertyID: '<string>', operator: '<string>', values: ['<string>']}],
tagReferences: [{tagID: '<string>', operator: '<string>', values: ['<string>']}],
suppressionReferences: [
{
suppressionID: '<string>',
operator: '<string>',
values: ['<string>'],
revokeBy: '<string>'
}
],
returnStructure: {showAliases: false, fields: ['<string>']},
schedule: {frequency: '<string>', at: '<string>'}
})
};
fetch('https://{host}/subscriptions/{platformType}/{subscriptionRef}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/subscriptions/{platformType}/{subscriptionRef}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'subscriptionName' => '<string>',
'owner' => '<string>',
'description' => '<string>',
'outputType' => 'application/json',
'active' => 'false',
'propertyReferences' => [
[
'propertyID' => '<string>',
'operator' => '<string>',
'values' => [
'<string>'
]
]
],
'tagReferences' => [
[
'tagID' => '<string>',
'operator' => '<string>',
'values' => [
'<string>'
]
]
],
'suppressionReferences' => [
[
'suppressionID' => '<string>',
'operator' => '<string>',
'values' => [
'<string>'
],
'revokeBy' => '<string>'
]
],
'returnStructure' => [
'showAliases' => false,
'fields' => [
'<string>'
]
],
'schedule' => [
'frequency' => '<string>',
'at' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/subscriptions/{platformType}/{subscriptionRef}"
payload := strings.NewReader("{\n \"subscriptionName\": \"<string>\",\n \"owner\": \"<string>\",\n \"description\": \"<string>\",\n \"outputType\": \"application/json\",\n \"active\": \"false\",\n \"propertyReferences\": [\n {\n \"propertyID\": \"<string>\",\n \"operator\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"tagReferences\": [\n {\n \"tagID\": \"<string>\",\n \"operator\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"suppressionReferences\": [\n {\n \"suppressionID\": \"<string>\",\n \"operator\": \"<string>\",\n \"values\": [\n \"<string>\"\n ],\n \"revokeBy\": \"<string>\"\n }\n ],\n \"returnStructure\": {\n \"showAliases\": false,\n \"fields\": [\n \"<string>\"\n ]\n },\n \"schedule\": {\n \"frequency\": \"<string>\",\n \"at\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{host}/subscriptions/{platformType}/{subscriptionRef}")
.header("Content-Type", "application/json")
.body("{\n \"subscriptionName\": \"<string>\",\n \"owner\": \"<string>\",\n \"description\": \"<string>\",\n \"outputType\": \"application/json\",\n \"active\": \"false\",\n \"propertyReferences\": [\n {\n \"propertyID\": \"<string>\",\n \"operator\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"tagReferences\": [\n {\n \"tagID\": \"<string>\",\n \"operator\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"suppressionReferences\": [\n {\n \"suppressionID\": \"<string>\",\n \"operator\": \"<string>\",\n \"values\": [\n \"<string>\"\n ],\n \"revokeBy\": \"<string>\"\n }\n ],\n \"returnStructure\": {\n \"showAliases\": false,\n \"fields\": [\n \"<string>\"\n ]\n },\n \"schedule\": {\n \"frequency\": \"<string>\",\n \"at\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/subscriptions/{platformType}/{subscriptionRef}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"subscriptionName\": \"<string>\",\n \"owner\": \"<string>\",\n \"description\": \"<string>\",\n \"outputType\": \"application/json\",\n \"active\": \"false\",\n \"propertyReferences\": [\n {\n \"propertyID\": \"<string>\",\n \"operator\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"tagReferences\": [\n {\n \"tagID\": \"<string>\",\n \"operator\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"suppressionReferences\": [\n {\n \"suppressionID\": \"<string>\",\n \"operator\": \"<string>\",\n \"values\": [\n \"<string>\"\n ],\n \"revokeBy\": \"<string>\"\n }\n ],\n \"returnStructure\": {\n \"showAliases\": false,\n \"fields\": [\n \"<string>\"\n ]\n },\n \"schedule\": {\n \"frequency\": \"<string>\",\n \"at\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"subscriptionRef": "<string>",
"subscriptionName": "<string>",
"description": "<string>",
"owner": "<string>",
"outputType": "<string>",
"active": "true",
"webhook": {
"uri": "<string>",
"authType": "<string>",
"authValue": "<string>"
},
"propertyReferences": [
{
"propertyID": "<string>",
"operator": "<string>",
"values": [
"<string>"
]
}
],
"tagReferences": [
{
"tagID": "<string>",
"operator": "<string>",
"values": [
"<string>"
]
}
],
"suppressionReferences": [
{
"suppressionID": "<string>",
"operator": "<string>",
"values": [
"<string>"
],
"revokeBy": "<string>"
}
],
"returnStructure": {
"showAliases": false,
"fields": [
"<string>"
]
},
"schedule": {
"frequency": "<string>",
"at": "<string>"
},
"webhookStatus": "<string>",
"lastTriggered": "<string>",
"message": "<string>",
"status": 123
}Subscriptions
Replace an existing subscription (full PUT)
Replaces all parameters of an existing subscription. You must supply all body parameters
required by the existing subscription. Non-admin users can only modify their own private subs;
admins can also promote private→global by setting owner: "".
PUT
/
subscriptions
/
{platformType}
/
{subscriptionRef}
Replace an existing subscription (full PUT)
curl --request PUT \
--url https://{host}/subscriptions/{platformType}/{subscriptionRef} \
--header 'Content-Type: application/json' \
--data '
{
"subscriptionName": "<string>",
"owner": "<string>",
"description": "<string>",
"outputType": "application/json",
"active": "false",
"propertyReferences": [
{
"propertyID": "<string>",
"operator": "<string>",
"values": [
"<string>"
]
}
],
"tagReferences": [
{
"tagID": "<string>",
"operator": "<string>",
"values": [
"<string>"
]
}
],
"suppressionReferences": [
{
"suppressionID": "<string>",
"operator": "<string>",
"values": [
"<string>"
],
"revokeBy": "<string>"
}
],
"returnStructure": {
"showAliases": false,
"fields": [
"<string>"
]
},
"schedule": {
"frequency": "<string>",
"at": "<string>"
}
}
'import requests
url = "https://{host}/subscriptions/{platformType}/{subscriptionRef}"
payload = {
"subscriptionName": "<string>",
"owner": "<string>",
"description": "<string>",
"outputType": "application/json",
"active": "false",
"propertyReferences": [
{
"propertyID": "<string>",
"operator": "<string>",
"values": ["<string>"]
}
],
"tagReferences": [
{
"tagID": "<string>",
"operator": "<string>",
"values": ["<string>"]
}
],
"suppressionReferences": [
{
"suppressionID": "<string>",
"operator": "<string>",
"values": ["<string>"],
"revokeBy": "<string>"
}
],
"returnStructure": {
"showAliases": False,
"fields": ["<string>"]
},
"schedule": {
"frequency": "<string>",
"at": "<string>"
}
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
subscriptionName: '<string>',
owner: '<string>',
description: '<string>',
outputType: 'application/json',
active: 'false',
propertyReferences: [{propertyID: '<string>', operator: '<string>', values: ['<string>']}],
tagReferences: [{tagID: '<string>', operator: '<string>', values: ['<string>']}],
suppressionReferences: [
{
suppressionID: '<string>',
operator: '<string>',
values: ['<string>'],
revokeBy: '<string>'
}
],
returnStructure: {showAliases: false, fields: ['<string>']},
schedule: {frequency: '<string>', at: '<string>'}
})
};
fetch('https://{host}/subscriptions/{platformType}/{subscriptionRef}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/subscriptions/{platformType}/{subscriptionRef}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'subscriptionName' => '<string>',
'owner' => '<string>',
'description' => '<string>',
'outputType' => 'application/json',
'active' => 'false',
'propertyReferences' => [
[
'propertyID' => '<string>',
'operator' => '<string>',
'values' => [
'<string>'
]
]
],
'tagReferences' => [
[
'tagID' => '<string>',
'operator' => '<string>',
'values' => [
'<string>'
]
]
],
'suppressionReferences' => [
[
'suppressionID' => '<string>',
'operator' => '<string>',
'values' => [
'<string>'
],
'revokeBy' => '<string>'
]
],
'returnStructure' => [
'showAliases' => false,
'fields' => [
'<string>'
]
],
'schedule' => [
'frequency' => '<string>',
'at' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/subscriptions/{platformType}/{subscriptionRef}"
payload := strings.NewReader("{\n \"subscriptionName\": \"<string>\",\n \"owner\": \"<string>\",\n \"description\": \"<string>\",\n \"outputType\": \"application/json\",\n \"active\": \"false\",\n \"propertyReferences\": [\n {\n \"propertyID\": \"<string>\",\n \"operator\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"tagReferences\": [\n {\n \"tagID\": \"<string>\",\n \"operator\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"suppressionReferences\": [\n {\n \"suppressionID\": \"<string>\",\n \"operator\": \"<string>\",\n \"values\": [\n \"<string>\"\n ],\n \"revokeBy\": \"<string>\"\n }\n ],\n \"returnStructure\": {\n \"showAliases\": false,\n \"fields\": [\n \"<string>\"\n ]\n },\n \"schedule\": {\n \"frequency\": \"<string>\",\n \"at\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{host}/subscriptions/{platformType}/{subscriptionRef}")
.header("Content-Type", "application/json")
.body("{\n \"subscriptionName\": \"<string>\",\n \"owner\": \"<string>\",\n \"description\": \"<string>\",\n \"outputType\": \"application/json\",\n \"active\": \"false\",\n \"propertyReferences\": [\n {\n \"propertyID\": \"<string>\",\n \"operator\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"tagReferences\": [\n {\n \"tagID\": \"<string>\",\n \"operator\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"suppressionReferences\": [\n {\n \"suppressionID\": \"<string>\",\n \"operator\": \"<string>\",\n \"values\": [\n \"<string>\"\n ],\n \"revokeBy\": \"<string>\"\n }\n ],\n \"returnStructure\": {\n \"showAliases\": false,\n \"fields\": [\n \"<string>\"\n ]\n },\n \"schedule\": {\n \"frequency\": \"<string>\",\n \"at\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/subscriptions/{platformType}/{subscriptionRef}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"subscriptionName\": \"<string>\",\n \"owner\": \"<string>\",\n \"description\": \"<string>\",\n \"outputType\": \"application/json\",\n \"active\": \"false\",\n \"propertyReferences\": [\n {\n \"propertyID\": \"<string>\",\n \"operator\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"tagReferences\": [\n {\n \"tagID\": \"<string>\",\n \"operator\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"suppressionReferences\": [\n {\n \"suppressionID\": \"<string>\",\n \"operator\": \"<string>\",\n \"values\": [\n \"<string>\"\n ],\n \"revokeBy\": \"<string>\"\n }\n ],\n \"returnStructure\": {\n \"showAliases\": false,\n \"fields\": [\n \"<string>\"\n ]\n },\n \"schedule\": {\n \"frequency\": \"<string>\",\n \"at\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"subscriptionRef": "<string>",
"subscriptionName": "<string>",
"description": "<string>",
"owner": "<string>",
"outputType": "<string>",
"active": "true",
"webhook": {
"uri": "<string>",
"authType": "<string>",
"authValue": "<string>"
},
"propertyReferences": [
{
"propertyID": "<string>",
"operator": "<string>",
"values": [
"<string>"
]
}
],
"tagReferences": [
{
"tagID": "<string>",
"operator": "<string>",
"values": [
"<string>"
]
}
],
"suppressionReferences": [
{
"suppressionID": "<string>",
"operator": "<string>",
"values": [
"<string>"
],
"revokeBy": "<string>"
}
],
"returnStructure": {
"showAliases": false,
"fields": [
"<string>"
]
},
"schedule": {
"frequency": "<string>",
"at": "<string>"
},
"webhookStatus": "<string>",
"lastTriggered": "<string>",
"message": "<string>",
"status": 123
}Path Parameters
Body
application/json
Provide at least one of: propertyReferences, tagReferences, or suppressionReferences.
Response
Updated subscription

