Create a customer portal
curl --request POST \
--url https://app.hookie.ai/admin/api/projects/{project_id}/portals \
--header 'Content-Type: application/json' \
--cookie hookie_session= \
--data '
{
"name": "<string>",
"slug": "<string>",
"event_types": [],
"branding": {}
}
'const options = {
method: 'POST',
headers: {cookie: 'hookie_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', slug: '<string>', event_types: [], branding: {}})
};
fetch('https://app.hookie.ai/admin/api/projects/{project_id}/portals', 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}/portals"
payload = {
"name": "<string>",
"slug": "<string>",
"event_types": [],
"branding": {}
}
headers = {
"cookie": "hookie_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"slug": "<string>",
"ok": true
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}Portals
Create a customer portal
POST
/
admin
/
api
/
projects
/
{project_id}
/
portals
Create a customer portal
curl --request POST \
--url https://app.hookie.ai/admin/api/projects/{project_id}/portals \
--header 'Content-Type: application/json' \
--cookie hookie_session= \
--data '
{
"name": "<string>",
"slug": "<string>",
"event_types": [],
"branding": {}
}
'const options = {
method: 'POST',
headers: {cookie: 'hookie_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', slug: '<string>', event_types: [], branding: {}})
};
fetch('https://app.hookie.ai/admin/api/projects/{project_id}/portals', 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}/portals"
payload = {
"name": "<string>",
"slug": "<string>",
"event_types": [],
"branding": {}
}
headers = {
"cookie": "hookie_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"slug": "<string>",
"ok": true
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}Authorizations
sessionbearerAuth
The console's sealed session cookie, set by WorkOS AuthKit. Mutating requests also require the X-Requested-With CSRF header.
Path Parameters
Body
application/json
Trimmed; must be non-empty.
Minimum string length:
1Slugified server-side (lowercase, [a-z0-9-], max 48, falling back to 'portal'). Defaults to a slug of name. Unique per workspace.
Dataset names the portal exposes. Non-string entries are dropped. This also bounds what a portal customer may filter their own destinations to.
Stored verbatim as JSON; shape not validated.