curl --request PATCH \
--url https://api.hightouch.com/api/v1/events/domains/{domainId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"events": [
{
"schema": {},
"version": "<string>",
"slug": "<string>",
"name": "<string>"
}
],
"components": [
{
"name": "<string>",
"schema": {},
"id": "<string>",
"slug": "<string>",
"version": "<string>",
"description": "<string>",
"imports": [
"<string>"
]
}
]
}
'import requests
url = "https://api.hightouch.com/api/v1/events/domains/{domainId}"
payload = {
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"events": [
{
"schema": {},
"version": "<string>",
"slug": "<string>",
"name": "<string>"
}
],
"components": [
{
"name": "<string>",
"schema": {},
"id": "<string>",
"slug": "<string>",
"version": "<string>",
"description": "<string>",
"imports": ["<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({
name: '<string>',
slug: '<string>',
description: '<string>',
events: [{schema: {}, version: '<string>', slug: '<string>', name: '<string>'}],
components: [
{
name: '<string>',
schema: {},
id: '<string>',
slug: '<string>',
version: '<string>',
description: '<string>',
imports: ['<string>']
}
]
})
};
fetch('https://api.hightouch.com/api/v1/events/domains/{domainId}', 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/events/domains/{domainId}",
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([
'name' => '<string>',
'slug' => '<string>',
'description' => '<string>',
'events' => [
[
'schema' => [
],
'version' => '<string>',
'slug' => '<string>',
'name' => '<string>'
]
],
'components' => [
[
'name' => '<string>',
'schema' => [
],
'id' => '<string>',
'slug' => '<string>',
'version' => '<string>',
'description' => '<string>',
'imports' => [
'<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/events/domains/{domainId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"events\": [\n {\n \"schema\": {},\n \"version\": \"<string>\",\n \"slug\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"components\": [\n {\n \"name\": \"<string>\",\n \"schema\": {},\n \"id\": \"<string>\",\n \"slug\": \"<string>\",\n \"version\": \"<string>\",\n \"description\": \"<string>\",\n \"imports\": [\n \"<string>\"\n ]\n }\n ]\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/events/domains/{domainId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"events\": [\n {\n \"schema\": {},\n \"version\": \"<string>\",\n \"slug\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"components\": [\n {\n \"name\": \"<string>\",\n \"schema\": {},\n \"id\": \"<string>\",\n \"slug\": \"<string>\",\n \"version\": \"<string>\",\n \"description\": \"<string>\",\n \"imports\": [\n \"<string>\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hightouch.com/api/v1/events/domains/{domainId}")
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 \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"events\": [\n {\n \"schema\": {},\n \"version\": \"<string>\",\n \"slug\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"components\": [\n {\n \"name\": \"<string>\",\n \"schema\": {},\n \"id\": \"<string>\",\n \"slug\": \"<string>\",\n \"version\": \"<string>\",\n \"description\": \"<string>\",\n \"imports\": [\n \"<string>\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"workspaceId": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"eventSources": [
{
"name": "<string>",
"id": "<string>"
}
],
"slug": "<string>",
"description": "<string>",
"onUndeclaredSchema": "ALLOW_EVENT",
"schemaVersionPath": [
"<string>"
],
"events": [
{
"schema": {},
"type": "track",
"onUndeclaredFields": "ALLOW_EVENT",
"onSchemaViolation": "ALLOW_EVENT",
"version": "<string>",
"slug": "<string>",
"name": "<string>"
}
],
"components": [
{
"name": "<string>",
"schema": {},
"id": "<string>",
"slug": "<string>",
"version": "<string>",
"description": "<string>",
"imports": [
"<string>"
]
}
]
}{
"message": "Validation failed",
"details": {}
}"Internal Server Error"Update an Event Domain
Update an existing event domain, replacing its events and components.
curl --request PATCH \
--url https://api.hightouch.com/api/v1/events/domains/{domainId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"events": [
{
"schema": {},
"version": "<string>",
"slug": "<string>",
"name": "<string>"
}
],
"components": [
{
"name": "<string>",
"schema": {},
"id": "<string>",
"slug": "<string>",
"version": "<string>",
"description": "<string>",
"imports": [
"<string>"
]
}
]
}
'import requests
url = "https://api.hightouch.com/api/v1/events/domains/{domainId}"
payload = {
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"events": [
{
"schema": {},
"version": "<string>",
"slug": "<string>",
"name": "<string>"
}
],
"components": [
{
"name": "<string>",
"schema": {},
"id": "<string>",
"slug": "<string>",
"version": "<string>",
"description": "<string>",
"imports": ["<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({
name: '<string>',
slug: '<string>',
description: '<string>',
events: [{schema: {}, version: '<string>', slug: '<string>', name: '<string>'}],
components: [
{
name: '<string>',
schema: {},
id: '<string>',
slug: '<string>',
version: '<string>',
description: '<string>',
imports: ['<string>']
}
]
})
};
fetch('https://api.hightouch.com/api/v1/events/domains/{domainId}', 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/events/domains/{domainId}",
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([
'name' => '<string>',
'slug' => '<string>',
'description' => '<string>',
'events' => [
[
'schema' => [
],
'version' => '<string>',
'slug' => '<string>',
'name' => '<string>'
]
],
'components' => [
[
'name' => '<string>',
'schema' => [
],
'id' => '<string>',
'slug' => '<string>',
'version' => '<string>',
'description' => '<string>',
'imports' => [
'<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/events/domains/{domainId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"events\": [\n {\n \"schema\": {},\n \"version\": \"<string>\",\n \"slug\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"components\": [\n {\n \"name\": \"<string>\",\n \"schema\": {},\n \"id\": \"<string>\",\n \"slug\": \"<string>\",\n \"version\": \"<string>\",\n \"description\": \"<string>\",\n \"imports\": [\n \"<string>\"\n ]\n }\n ]\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/events/domains/{domainId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"events\": [\n {\n \"schema\": {},\n \"version\": \"<string>\",\n \"slug\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"components\": [\n {\n \"name\": \"<string>\",\n \"schema\": {},\n \"id\": \"<string>\",\n \"slug\": \"<string>\",\n \"version\": \"<string>\",\n \"description\": \"<string>\",\n \"imports\": [\n \"<string>\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hightouch.com/api/v1/events/domains/{domainId}")
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 \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"events\": [\n {\n \"schema\": {},\n \"version\": \"<string>\",\n \"slug\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"components\": [\n {\n \"name\": \"<string>\",\n \"schema\": {},\n \"id\": \"<string>\",\n \"slug\": \"<string>\",\n \"version\": \"<string>\",\n \"description\": \"<string>\",\n \"imports\": [\n \"<string>\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"workspaceId": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"eventSources": [
{
"name": "<string>",
"id": "<string>"
}
],
"slug": "<string>",
"description": "<string>",
"onUndeclaredSchema": "ALLOW_EVENT",
"schemaVersionPath": [
"<string>"
],
"events": [
{
"schema": {},
"type": "track",
"onUndeclaredFields": "ALLOW_EVENT",
"onSchemaViolation": "ALLOW_EVENT",
"version": "<string>",
"slug": "<string>",
"name": "<string>"
}
],
"components": [
{
"name": "<string>",
"schema": {},
"id": "<string>",
"slug": "<string>",
"version": "<string>",
"description": "<string>",
"imports": [
"<string>"
]
}
]
}{
"message": "Validation failed",
"details": {}
}"Internal Server Error"Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The domain's id
Body
The input for updating a Domain
The domain's name
The domain's slug. If not specified, one will be generated.
The domain's description
What happens to events that aren't defined in the domain. One of ALLOW_EVENT or BLOCK_EVENT. Optional, defaults to ALLOW_EVENT.
ALLOW_EVENT, BLOCK_EVENT The definitions for the events in the domain.
Show child attributes
Show child attributes
The reusable components defined in the domain.
Show child attributes
Show child attributes
Response
Ok
A collection of event and component schemas used for validating events.
The domain's id
The domain's name
The id of the workspace that the domain belongs to
The timestamp when the domain was created
The timestamp when the domain was last updated
The Event Sources linked to the Domain.
Show child attributes
Show child attributes
The domain's slug. If not specified, one will be generated.
The domain's description
What happens to events that aren't defined in the domain. One of ALLOW_EVENT or BLOCK_EVENT. Optional, defaults to ALLOW_EVENT.
ALLOW_EVENT, BLOCK_EVENT Path into the event payload where the schema version is read/written. Used by codegen wrappers to inject the version they were generated from.
The definitions for the events in the domain.
Show child attributes
Show child attributes
The reusable components defined in the domain.
Show child attributes
Show child attributes
Was this page helpful?