Update Decision Engine Channel
curl --request PATCH \
--url https://api.hightouch.com/api/v1/decision-engine/channels/{channelId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"parentModelId": 123,
"destinationId": 123,
"externalId": "<string>",
"enabled": true,
"guardrails": {
"userAudienceFilter": {},
"quietPeriod": {
"enabled": true,
"days": [],
"times": []
}
},
"tags": {},
"destinationConfig": {
"type": "<string>",
"recipientType": "<string>",
"userColumns": [
{
"column": "<string>",
"type": "<string>",
"overridePropertyName": "<string>"
}
],
"channelDataColumn": "<string>",
"customResourceName": "<string>",
"sendFrom": "<string>",
"businessUnit": "<string>",
"sendClassificationId": "<string>",
"syncMode": "<string>",
"collectionName": "<string>",
"mongoIdField": "<string>"
},
"sendEventId": "<string>"
}
'import requests
url = "https://api.hightouch.com/api/v1/decision-engine/channels/{channelId}"
payload = {
"label": "<string>",
"parentModelId": 123,
"destinationId": 123,
"externalId": "<string>",
"enabled": True,
"guardrails": {
"userAudienceFilter": {},
"quietPeriod": {
"enabled": True,
"days": [],
"times": []
}
},
"tags": {},
"destinationConfig": {
"type": "<string>",
"recipientType": "<string>",
"userColumns": [
{
"column": "<string>",
"type": "<string>",
"overridePropertyName": "<string>"
}
],
"channelDataColumn": "<string>",
"customResourceName": "<string>",
"sendFrom": "<string>",
"businessUnit": "<string>",
"sendClassificationId": "<string>",
"syncMode": "<string>",
"collectionName": "<string>",
"mongoIdField": "<string>"
},
"sendEventId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: '<string>',
parentModelId: 123,
destinationId: 123,
externalId: '<string>',
enabled: true,
guardrails: {userAudienceFilter: {}, quietPeriod: {enabled: true, days: [], times: []}},
tags: {},
destinationConfig: {
type: '<string>',
recipientType: '<string>',
userColumns: [{column: '<string>', type: '<string>', overridePropertyName: '<string>'}],
channelDataColumn: '<string>',
customResourceName: '<string>',
sendFrom: '<string>',
businessUnit: '<string>',
sendClassificationId: '<string>',
syncMode: '<string>',
collectionName: '<string>',
mongoIdField: '<string>'
},
sendEventId: '<string>'
})
};
fetch('https://api.hightouch.com/api/v1/decision-engine/channels/{channelId}', 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://api.hightouch.com/api/v1/decision-engine/channels/{channelId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'label' => '<string>',
'parentModelId' => 123,
'destinationId' => 123,
'externalId' => '<string>',
'enabled' => true,
'guardrails' => [
'userAudienceFilter' => [
],
'quietPeriod' => [
'enabled' => true,
'days' => [
],
'times' => [
]
]
],
'tags' => [
],
'destinationConfig' => [
'type' => '<string>',
'recipientType' => '<string>',
'userColumns' => [
[
'column' => '<string>',
'type' => '<string>',
'overridePropertyName' => '<string>'
]
],
'channelDataColumn' => '<string>',
'customResourceName' => '<string>',
'sendFrom' => '<string>',
'businessUnit' => '<string>',
'sendClassificationId' => '<string>',
'syncMode' => '<string>',
'collectionName' => '<string>',
'mongoIdField' => '<string>'
],
'sendEventId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.hightouch.com/api/v1/decision-engine/channels/{channelId}"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"parentModelId\": 123,\n \"destinationId\": 123,\n \"externalId\": \"<string>\",\n \"enabled\": true,\n \"guardrails\": {\n \"userAudienceFilter\": {},\n \"quietPeriod\": {\n \"enabled\": true,\n \"days\": [],\n \"times\": []\n }\n },\n \"tags\": {},\n \"destinationConfig\": {\n \"type\": \"<string>\",\n \"recipientType\": \"<string>\",\n \"userColumns\": [\n {\n \"column\": \"<string>\",\n \"type\": \"<string>\",\n \"overridePropertyName\": \"<string>\"\n }\n ],\n \"channelDataColumn\": \"<string>\",\n \"customResourceName\": \"<string>\",\n \"sendFrom\": \"<string>\",\n \"businessUnit\": \"<string>\",\n \"sendClassificationId\": \"<string>\",\n \"syncMode\": \"<string>\",\n \"collectionName\": \"<string>\",\n \"mongoIdField\": \"<string>\"\n },\n \"sendEventId\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.hightouch.com/api/v1/decision-engine/channels/{channelId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\",\n \"parentModelId\": 123,\n \"destinationId\": 123,\n \"externalId\": \"<string>\",\n \"enabled\": true,\n \"guardrails\": {\n \"userAudienceFilter\": {},\n \"quietPeriod\": {\n \"enabled\": true,\n \"days\": [],\n \"times\": []\n }\n },\n \"tags\": {},\n \"destinationConfig\": {\n \"type\": \"<string>\",\n \"recipientType\": \"<string>\",\n \"userColumns\": [\n {\n \"column\": \"<string>\",\n \"type\": \"<string>\",\n \"overridePropertyName\": \"<string>\"\n }\n ],\n \"channelDataColumn\": \"<string>\",\n \"customResourceName\": \"<string>\",\n \"sendFrom\": \"<string>\",\n \"businessUnit\": \"<string>\",\n \"sendClassificationId\": \"<string>\",\n \"syncMode\": \"<string>\",\n \"collectionName\": \"<string>\",\n \"mongoIdField\": \"<string>\"\n },\n \"sendEventId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hightouch.com/api/v1/decision-engine/channels/{channelId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"<string>\",\n \"parentModelId\": 123,\n \"destinationId\": 123,\n \"externalId\": \"<string>\",\n \"enabled\": true,\n \"guardrails\": {\n \"userAudienceFilter\": {},\n \"quietPeriod\": {\n \"enabled\": true,\n \"days\": [],\n \"times\": []\n }\n },\n \"tags\": {},\n \"destinationConfig\": {\n \"type\": \"<string>\",\n \"recipientType\": \"<string>\",\n \"userColumns\": [\n {\n \"column\": \"<string>\",\n \"type\": \"<string>\",\n \"overridePropertyName\": \"<string>\"\n }\n ],\n \"channelDataColumn\": \"<string>\",\n \"customResourceName\": \"<string>\",\n \"sendFrom\": \"<string>\",\n \"businessUnit\": \"<string>\",\n \"sendClassificationId\": \"<string>\",\n \"syncMode\": \"<string>\",\n \"collectionName\": \"<string>\",\n \"mongoIdField\": \"<string>\"\n },\n \"sendEventId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"label": "<string>",
"type": "<string>",
"parentModelId": 123,
"destinationId": 123,
"enabled": true,
"externalId": "<string>",
"guardrails": {
"userAudienceFilter": {},
"quietPeriod": {
"enabled": true,
"days": [
"sunday"
],
"times": [
"midnight"
]
}
},
"tags": {},
"destinationConfig": {
"type": "<string>",
"recipientType": "<string>",
"userColumns": [
{
"column": "<string>",
"type": "<string>",
"overridePropertyName": "<string>"
}
],
"channelDataType": "emailAddress",
"channelDataColumn": "<string>",
"customResourceName": "<string>",
"sendFrom": "<string>",
"businessUnit": "<string>",
"sendClassificationId": "<string>",
"syncMode": "<string>",
"collectionName": "<string>",
"mongoIdField": "<string>"
},
"sendEventId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"message": "<string>"
}{
"message": "<string>"
}AI Decisioning
Update Decision Engine Channel
Update a channel. Fields that are not in the request stay as they are. Each tag key and value must be in the channel tag configuration.
PATCH
/
decision-engine
/
channels
/
{channelId}
Update Decision Engine Channel
curl --request PATCH \
--url https://api.hightouch.com/api/v1/decision-engine/channels/{channelId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"parentModelId": 123,
"destinationId": 123,
"externalId": "<string>",
"enabled": true,
"guardrails": {
"userAudienceFilter": {},
"quietPeriod": {
"enabled": true,
"days": [],
"times": []
}
},
"tags": {},
"destinationConfig": {
"type": "<string>",
"recipientType": "<string>",
"userColumns": [
{
"column": "<string>",
"type": "<string>",
"overridePropertyName": "<string>"
}
],
"channelDataColumn": "<string>",
"customResourceName": "<string>",
"sendFrom": "<string>",
"businessUnit": "<string>",
"sendClassificationId": "<string>",
"syncMode": "<string>",
"collectionName": "<string>",
"mongoIdField": "<string>"
},
"sendEventId": "<string>"
}
'import requests
url = "https://api.hightouch.com/api/v1/decision-engine/channels/{channelId}"
payload = {
"label": "<string>",
"parentModelId": 123,
"destinationId": 123,
"externalId": "<string>",
"enabled": True,
"guardrails": {
"userAudienceFilter": {},
"quietPeriod": {
"enabled": True,
"days": [],
"times": []
}
},
"tags": {},
"destinationConfig": {
"type": "<string>",
"recipientType": "<string>",
"userColumns": [
{
"column": "<string>",
"type": "<string>",
"overridePropertyName": "<string>"
}
],
"channelDataColumn": "<string>",
"customResourceName": "<string>",
"sendFrom": "<string>",
"businessUnit": "<string>",
"sendClassificationId": "<string>",
"syncMode": "<string>",
"collectionName": "<string>",
"mongoIdField": "<string>"
},
"sendEventId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: '<string>',
parentModelId: 123,
destinationId: 123,
externalId: '<string>',
enabled: true,
guardrails: {userAudienceFilter: {}, quietPeriod: {enabled: true, days: [], times: []}},
tags: {},
destinationConfig: {
type: '<string>',
recipientType: '<string>',
userColumns: [{column: '<string>', type: '<string>', overridePropertyName: '<string>'}],
channelDataColumn: '<string>',
customResourceName: '<string>',
sendFrom: '<string>',
businessUnit: '<string>',
sendClassificationId: '<string>',
syncMode: '<string>',
collectionName: '<string>',
mongoIdField: '<string>'
},
sendEventId: '<string>'
})
};
fetch('https://api.hightouch.com/api/v1/decision-engine/channels/{channelId}', 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://api.hightouch.com/api/v1/decision-engine/channels/{channelId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'label' => '<string>',
'parentModelId' => 123,
'destinationId' => 123,
'externalId' => '<string>',
'enabled' => true,
'guardrails' => [
'userAudienceFilter' => [
],
'quietPeriod' => [
'enabled' => true,
'days' => [
],
'times' => [
]
]
],
'tags' => [
],
'destinationConfig' => [
'type' => '<string>',
'recipientType' => '<string>',
'userColumns' => [
[
'column' => '<string>',
'type' => '<string>',
'overridePropertyName' => '<string>'
]
],
'channelDataColumn' => '<string>',
'customResourceName' => '<string>',
'sendFrom' => '<string>',
'businessUnit' => '<string>',
'sendClassificationId' => '<string>',
'syncMode' => '<string>',
'collectionName' => '<string>',
'mongoIdField' => '<string>'
],
'sendEventId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.hightouch.com/api/v1/decision-engine/channels/{channelId}"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"parentModelId\": 123,\n \"destinationId\": 123,\n \"externalId\": \"<string>\",\n \"enabled\": true,\n \"guardrails\": {\n \"userAudienceFilter\": {},\n \"quietPeriod\": {\n \"enabled\": true,\n \"days\": [],\n \"times\": []\n }\n },\n \"tags\": {},\n \"destinationConfig\": {\n \"type\": \"<string>\",\n \"recipientType\": \"<string>\",\n \"userColumns\": [\n {\n \"column\": \"<string>\",\n \"type\": \"<string>\",\n \"overridePropertyName\": \"<string>\"\n }\n ],\n \"channelDataColumn\": \"<string>\",\n \"customResourceName\": \"<string>\",\n \"sendFrom\": \"<string>\",\n \"businessUnit\": \"<string>\",\n \"sendClassificationId\": \"<string>\",\n \"syncMode\": \"<string>\",\n \"collectionName\": \"<string>\",\n \"mongoIdField\": \"<string>\"\n },\n \"sendEventId\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.hightouch.com/api/v1/decision-engine/channels/{channelId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\",\n \"parentModelId\": 123,\n \"destinationId\": 123,\n \"externalId\": \"<string>\",\n \"enabled\": true,\n \"guardrails\": {\n \"userAudienceFilter\": {},\n \"quietPeriod\": {\n \"enabled\": true,\n \"days\": [],\n \"times\": []\n }\n },\n \"tags\": {},\n \"destinationConfig\": {\n \"type\": \"<string>\",\n \"recipientType\": \"<string>\",\n \"userColumns\": [\n {\n \"column\": \"<string>\",\n \"type\": \"<string>\",\n \"overridePropertyName\": \"<string>\"\n }\n ],\n \"channelDataColumn\": \"<string>\",\n \"customResourceName\": \"<string>\",\n \"sendFrom\": \"<string>\",\n \"businessUnit\": \"<string>\",\n \"sendClassificationId\": \"<string>\",\n \"syncMode\": \"<string>\",\n \"collectionName\": \"<string>\",\n \"mongoIdField\": \"<string>\"\n },\n \"sendEventId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hightouch.com/api/v1/decision-engine/channels/{channelId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"<string>\",\n \"parentModelId\": 123,\n \"destinationId\": 123,\n \"externalId\": \"<string>\",\n \"enabled\": true,\n \"guardrails\": {\n \"userAudienceFilter\": {},\n \"quietPeriod\": {\n \"enabled\": true,\n \"days\": [],\n \"times\": []\n }\n },\n \"tags\": {},\n \"destinationConfig\": {\n \"type\": \"<string>\",\n \"recipientType\": \"<string>\",\n \"userColumns\": [\n {\n \"column\": \"<string>\",\n \"type\": \"<string>\",\n \"overridePropertyName\": \"<string>\"\n }\n ],\n \"channelDataColumn\": \"<string>\",\n \"customResourceName\": \"<string>\",\n \"sendFrom\": \"<string>\",\n \"businessUnit\": \"<string>\",\n \"sendClassificationId\": \"<string>\",\n \"syncMode\": \"<string>\",\n \"collectionName\": \"<string>\",\n \"mongoIdField\": \"<string>\"\n },\n \"sendEventId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"label": "<string>",
"type": "<string>",
"parentModelId": 123,
"destinationId": 123,
"enabled": true,
"externalId": "<string>",
"guardrails": {
"userAudienceFilter": {},
"quietPeriod": {
"enabled": true,
"days": [
"sunday"
],
"times": [
"midnight"
]
}
},
"tags": {},
"destinationConfig": {
"type": "<string>",
"recipientType": "<string>",
"userColumns": [
{
"column": "<string>",
"type": "<string>",
"overridePropertyName": "<string>"
}
],
"channelDataType": "emailAddress",
"channelDataColumn": "<string>",
"customResourceName": "<string>",
"sendFrom": "<string>",
"businessUnit": "<string>",
"sendClassificationId": "<string>",
"syncMode": "<string>",
"collectionName": "<string>",
"mongoIdField": "<string>"
},
"sendEventId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Body
application/json
Request body for updating a Decision Engine channel. Fields that are not in the request stay as they are. The type cannot change. A parent model cannot change after it is set.
Response
Ok
A Decision Engine channel
Was this page helpful?