Create or update the project's customer portal (PATCH, same as PUT)
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>",
"max_members": 123,
"members": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true
}{
"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>",
"max_members": 123,
"members": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true
}Portals
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.
PATCH
/
admin
/
api
/
projects
/
{project_id}
/
portal
Create or update the project's customer portal (PATCH, same as PUT)
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>",
"max_members": 123,
"members": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true
}{
"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>",
"max_members": 123,
"members": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true
}Body
application/json
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.
Maximum array length:
10An exact https origin, e.g. https://app.example.com: no path, no wildcard. A trailing slash is removed.