Add a new portal
curl --request POST \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/portals \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"color": "#FFFFFF",
"custom_domain": "yampi.ai.help",
"header_text": "Handbook",
"homepage_link": "https://yampi.ai/",
"name": "Handbook",
"page_title": "Handbook",
"slug": "handbook",
"archived": false,
"config": {
"allowed_locales": [
"en",
"es"
],
"default_locale": "en"
}
}
'const options = {
method: 'POST',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
color: '#FFFFFF',
custom_domain: 'yampi.ai.help',
header_text: 'Handbook',
homepage_link: 'https://yampi.ai/',
name: 'Handbook',
page_title: 'Handbook',
slug: 'handbook',
archived: false,
config: {allowed_locales: ['en', 'es'], default_locale: 'en'}
})
};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/portals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v1/accounts/{account_id}/portals"
payload = {
"color": "#FFFFFF",
"custom_domain": "yampi.ai.help",
"header_text": "Handbook",
"homepage_link": "https://yampi.ai/",
"name": "Handbook",
"page_title": "Handbook",
"slug": "handbook",
"archived": False,
"config": {
"allowed_locales": ["en", "es"],
"default_locale": "en"
}
}
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"payload": [
{
"id": 123,
"archived": true,
"color": "<string>",
"config": {
"allowed_locales": [
{
"code": "<string>",
"articles_count": 123,
"categories_count": 123
}
]
},
"custom_domain": "<string>",
"header_text": "<string>",
"homepage_link": "<string>",
"name": "<string>",
"slug": "<string>",
"page_title": "<string>",
"account_id": 123,
"inbox": {
"id": 123,
"name": "<string>",
"website_url": "<string>",
"channel_type": "<string>",
"avatar_url": "<string>",
"widget_color": "<string>",
"website_token": "<string>",
"enable_auto_assignment": true,
"web_widget_script": "<string>",
"welcome_title": "<string>",
"welcome_tagline": "<string>",
"greeting_enabled": true,
"greeting_message": "<string>",
"channel_id": 123,
"working_hours_enabled": true,
"enable_email_collect": true,
"csat_survey_enabled": true,
"auto_assignment_config": {},
"out_of_office_message": "<string>",
"working_hours": [
{
"day_of_week": 123,
"closed_all_day": true,
"open_hour": 123,
"open_minutes": 123,
"close_hour": 123,
"close_minutes": 123,
"open_all_day": true
}
],
"timezone": "<string>",
"callback_webhook_url": "<string>",
"allow_messages_after_resolved": true,
"lock_to_single_conversation": true,
"sender_name_type": "<string>",
"business_name": "<string>",
"hmac_mandatory": true,
"selected_feature_flags": {},
"reply_time": "<string>",
"messaging_service_sid": "<string>",
"phone_number": "<string>",
"medium": "<string>",
"provider": "<string>"
},
"logo": {
"id": 123,
"portal_id": 123,
"file_type": "<string>",
"account_id": 123,
"file_url": "<string>",
"blob_id": 123,
"filename": "<string>"
},
"meta": {
"all_articles_count": 123,
"archived_articles_count": 123,
"published_count": 123,
"draft_articles_count": 123,
"categories_count": 123,
"default_locale": "<string>"
}
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Help Center
Add a new portal
Add a new portal to account
POST
/
api
/
v1
/
accounts
/
{account_id}
/
portals
Add a new portal
curl --request POST \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/portals \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"color": "#FFFFFF",
"custom_domain": "yampi.ai.help",
"header_text": "Handbook",
"homepage_link": "https://yampi.ai/",
"name": "Handbook",
"page_title": "Handbook",
"slug": "handbook",
"archived": false,
"config": {
"allowed_locales": [
"en",
"es"
],
"default_locale": "en"
}
}
'const options = {
method: 'POST',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
color: '#FFFFFF',
custom_domain: 'yampi.ai.help',
header_text: 'Handbook',
homepage_link: 'https://yampi.ai/',
name: 'Handbook',
page_title: 'Handbook',
slug: 'handbook',
archived: false,
config: {allowed_locales: ['en', 'es'], default_locale: 'en'}
})
};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/portals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v1/accounts/{account_id}/portals"
payload = {
"color": "#FFFFFF",
"custom_domain": "yampi.ai.help",
"header_text": "Handbook",
"homepage_link": "https://yampi.ai/",
"name": "Handbook",
"page_title": "Handbook",
"slug": "handbook",
"archived": False,
"config": {
"allowed_locales": ["en", "es"],
"default_locale": "en"
}
}
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"payload": [
{
"id": 123,
"archived": true,
"color": "<string>",
"config": {
"allowed_locales": [
{
"code": "<string>",
"articles_count": 123,
"categories_count": 123
}
]
},
"custom_domain": "<string>",
"header_text": "<string>",
"homepage_link": "<string>",
"name": "<string>",
"slug": "<string>",
"page_title": "<string>",
"account_id": 123,
"inbox": {
"id": 123,
"name": "<string>",
"website_url": "<string>",
"channel_type": "<string>",
"avatar_url": "<string>",
"widget_color": "<string>",
"website_token": "<string>",
"enable_auto_assignment": true,
"web_widget_script": "<string>",
"welcome_title": "<string>",
"welcome_tagline": "<string>",
"greeting_enabled": true,
"greeting_message": "<string>",
"channel_id": 123,
"working_hours_enabled": true,
"enable_email_collect": true,
"csat_survey_enabled": true,
"auto_assignment_config": {},
"out_of_office_message": "<string>",
"working_hours": [
{
"day_of_week": 123,
"closed_all_day": true,
"open_hour": 123,
"open_minutes": 123,
"close_hour": 123,
"close_minutes": 123,
"open_all_day": true
}
],
"timezone": "<string>",
"callback_webhook_url": "<string>",
"allow_messages_after_resolved": true,
"lock_to_single_conversation": true,
"sender_name_type": "<string>",
"business_name": "<string>",
"hmac_mandatory": true,
"selected_feature_flags": {},
"reply_time": "<string>",
"messaging_service_sid": "<string>",
"phone_number": "<string>",
"medium": "<string>",
"provider": "<string>"
},
"logo": {
"id": 123,
"portal_id": 123,
"file_type": "<string>",
"account_id": 123,
"file_url": "<string>",
"blob_id": 123,
"filename": "<string>"
},
"meta": {
"all_articles_count": 123,
"archived_articles_count": 123,
"published_count": 123,
"draft_articles_count": 123,
"categories_count": 123,
"default_locale": "<string>"
}
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Authorizations
Token de usuario. Envía el valor en el header api_access_token. Lo obtienes en el perfil (GET /api/v1/profile) o al regenerarlo.
Path Parameters
The numeric ID of the account
Body
application/json
Header color for help-center in hex format
Example:
"#FFFFFF"
Custom domain to display help center.
Example:
"yampi.ai.help"
Help center header
Example:
"Handbook"
link to main dashboard
Example:
"https://yampi.ai/"
Name for the portal
Example:
"Handbook"
Page title for the portal
Example:
"Handbook"
Slug for the portal to display in link
Example:
"handbook"
Status to check if portal is live
Example:
false
Configuration about supporting locales
Example:
{
"allowed_locales": ["en", "es"],
"default_locale": "en"
}
Response
Success
Show child attributes
Show child attributes