curl --request PATCH \
--url https://app.hookie.ai/admin/api/projects/{project_id}/portal \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"enabled": true,
"event_types": [
"<string>"
],
"branding": {
"logo_url": "<string>",
"primary_color": "<string>"
},
"embed_origins": [
"<string>"
]
}
'const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
enabled: true,
event_types: ['<string>'],
branding: {logo_url: '<string>', primary_color: '<string>'},
embed_origins: ['<string>']
})
};
fetch('https://app.hookie.ai/admin/api/projects/{project_id}/portal', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/projects/{project_id}/portal"
payload = {
"name": "<string>",
"enabled": True,
"event_types": ["<string>"],
"branding": {
"logo_url": "<string>",
"primary_color": "<string>"
},
"embed_origins": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"portal": {
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"event_types": [
"<string>"
],
"branding": {
"logo_url": "<string>",
"primary_color": "<string>"
},
"enabled": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"embed_origins": [
"<string>"
]
}
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>"
}Create or update the project's customer portal (PATCH, same as PUT)
PATCH is accepted on this path and behaves exactly as PUT does: it creates the portal on the first call and updates it after that.
curl --request PATCH \
--url https://app.hookie.ai/admin/api/projects/{project_id}/portal \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"enabled": true,
"event_types": [
"<string>"
],
"branding": {
"logo_url": "<string>",
"primary_color": "<string>"
},
"embed_origins": [
"<string>"
]
}
'const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
enabled: true,
event_types: ['<string>'],
branding: {logo_url: '<string>', primary_color: '<string>'},
embed_origins: ['<string>']
})
};
fetch('https://app.hookie.ai/admin/api/projects/{project_id}/portal', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/projects/{project_id}/portal"
payload = {
"name": "<string>",
"enabled": True,
"event_types": ["<string>"],
"branding": {
"logo_url": "<string>",
"primary_color": "<string>"
},
"embed_origins": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"portal": {
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"event_types": [
"<string>"
],
"branding": {
"logo_url": "<string>",
"primary_color": "<string>"
},
"enabled": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"embed_origins": [
"<string>"
]
}
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>"
}Path Parameters
Body
Required when creating.
1 - 80A switched-off portal refuses its tokens and sessions and delivers nothing to its customers' destinations.
The project's datasets the portal exposes. Each must be a valid dataset name. An empty list exposes nothing: customers cannot add a destination, and existing ones receive nothing. Changes apply to every delivery from then on, including destinations created earlier.
What the portal page applies (#198, PORT-12). Only these two keys; anything else is a 400. Omit to keep what is stored; {} clears it.
Show child attributes
Show child attributes
The sites allowed to frame the portal page (#198, PORT-13): its CSP frame-ancestors. Empty (the default) means no site may. Omit to keep what is stored.
10An exact https origin, e.g. https://app.example.com: no path, no wildcard. A trailing slash is removed.
Response
The project's customer portal, or null when none has been set up.
Show child attributes
Show child attributes