Create or update the project's customer portal
curl --request PUT \
--url https://app.hookie.ai/admin/api/projects/{project_id}/portal \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"enabled": true,
"event_types": [
"<string>"
]
}
'const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', enabled: true, event_types: ['<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>"]
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"portal": {
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"event_types": [
"<string>"
],
"branding": {},
"enabled": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}Portals
Create or update the project's customer portal
Creates the portal on the first call and updates it after that. A project has exactly one portal; this is what the console’s Settings → Customer portal pane saves.
PUT
/
admin
/
api
/
projects
/
{project_id}
/
portal
Create or update the project's customer portal
curl --request PUT \
--url https://app.hookie.ai/admin/api/projects/{project_id}/portal \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"enabled": true,
"event_types": [
"<string>"
]
}
'const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', enabled: true, event_types: ['<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>"]
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"portal": {
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"event_types": [
"<string>"
],
"branding": {},
"enabled": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}Path Parameters
Body
application/json
Response
The project's customer portal, or null when none has been set up.
Show child attributes
Show child attributes