Code samples use your device
. Create an API key under API keys.API reference · Account
Business profile
Get the business profile
GET
/v1/profileThe business profile of the calling tenant: where the business operates, its timezone, language, industry and billing currency.
Responses
- 200Profile
Response fields
business_namestring | nullrequiredcountrystringrequiredISO 3166-1 alpha-2 code, e.g.GBtimezonestringrequiredIANA timezone, e.g.Europe/London. Drives business hours, the send window and the dates shown in the dashboardlocalestringrequiredLanguage of the messages the platform sends on the business's behalf (OTP, opt-out confirmations, notices)industrystring | nullrequiredSelects the onboarding starter packcurrencystringrequiredBilling currency (see /v1/billing/options for what can actually be charged)configuredbooleanrequiredtrueonce the owner saved the profile at least oncecalling_codestringrequiredDigits, e.g.44. Local-format numbers (07700 900123) are resolved with this codesuggested_timezonesarray of stringTimezones of the country, for pickersindustriesarray of stringlocalesarray of string
Request
curl "https://api.chatkomodo.com/v1/profile" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY"const res = await fetch('https://api.chatkomodo.com/v1/profile', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.CHATKOMODO_API_KEY}`,
},
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.code}: ${data.error}`);
console.log(data);import os
import requests
res = requests.get(
"https://api.chatkomodo.com/v1/profile",
headers={
"Authorization": f"Bearer {os.environ['CHATKOMODO_API_KEY']}",
},
timeout=30,
)
res.raise_for_status()
print(res.json())<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$res = $client->request('GET', 'https://api.chatkomodo.com/v1/profile', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
]);
print_r(json_decode((string) $res->getBody(), true));Response 200
{
"business_name": "string",
"country": "GB",
"timezone": "Asia/Jakarta",
"locale": "en",
"industry": "ecommerce",
"currency": "IDR",
"configured": true,
"calling_code": "482913",
"suggested_timezones": [
"Asia/Jakarta"
],
"industries": [
"string"
],
"locales": [
"en"
]
}Update the business profile
PUT
/v1/profileDashboard loginUpdate the business profile (partial update). Account owner only.
Request body
business_namestring | nullcountrystringChanging the country also resetstimezoneandcurrencyunless you send them tootimezonestringlocalestringindustrystring | nullcurrencystring
Responses
- 200Updated profile
Response fields
business_namestring | nullrequiredcountrystringrequiredISO 3166-1 alpha-2 code, e.g.GBtimezonestringrequiredIANA timezone, e.g.Europe/London. Drives business hours, the send window and the dates shown in the dashboardlocalestringrequiredLanguage of the messages the platform sends on the business's behalf (OTP, opt-out confirmations, notices)industrystring | nullrequiredSelects the onboarding starter packcurrencystringrequiredBilling currency (see /v1/billing/options for what can actually be charged)configuredbooleanrequiredtrueonce the owner saved the profile at least oncecalling_codestringrequiredDigits, e.g.44. Local-format numbers (07700 900123) are resolved with this codesuggested_timezonesarray of stringTimezones of the country, for pickersindustriesarray of stringlocalesarray of string
- 400Validation error (
VALIDATION_FAILED) - 403Not the account owner (
FORBIDDEN)
Request
curl -X PUT "https://api.chatkomodo.com/v1/profile" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"business_name": "Acme Retail",
"country": "GB",
"timezone": "Europe/London",
"locale": "en",
"currency": "USD"
}'const res = await fetch('https://api.chatkomodo.com/v1/profile', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.CHATKOMODO_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"business_name": "Acme Retail",
"country": "GB",
"timezone": "Europe/London",
"locale": "en",
"currency": "USD"
}),
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.code}: ${data.error}`);
console.log(data);import os
import requests
res = requests.put(
"https://api.chatkomodo.com/v1/profile",
headers={
"Authorization": f"Bearer {os.environ['CHATKOMODO_API_KEY']}",
},
json={
"business_name": "Acme Retail",
"country": "GB",
"timezone": "Europe/London",
"locale": "en",
"currency": "USD",
},
timeout=30,
)
res.raise_for_status()
print(res.json())<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$res = $client->request('PUT', 'https://api.chatkomodo.com/v1/profile', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
'json' => [
'business_name' => 'Acme Retail',
'country' => 'GB',
'timezone' => 'Europe/London',
'locale' => 'en',
'currency' => 'USD',
],
]);
print_r(json_decode((string) $res->getBody(), true));Response 200
{
"business_name": "string",
"country": "GB",
"timezone": "Asia/Jakarta",
"locale": "en",
"industry": "ecommerce",
"currency": "IDR",
"configured": true,
"calling_code": "482913",
"suggested_timezones": [
"Asia/Jakarta"
],
"industries": [
"string"
],
"locales": [
"en"
]
}List countries
GET
/public/countriesNo authenticationPublic, cacheable list of countries with their calling code and default timezone, for country pickers (login, signup, profile). No authentication.
Query parameters
langstringLanguage of the names/summaries (defaulten)
Responses
- 200Countries sorted by name
Response fields
countriesarray of objectrequiredcountries[].isostringrequiredcountries[].namestringrequiredcountries[].calling_codestringrequiredcountries[].timezonestringrequired
Request
curl "https://api.chatkomodo.com/public/countries"const res = await fetch('https://api.chatkomodo.com/public/countries', {
method: 'GET',
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.code}: ${data.error}`);
console.log(data);import os
import requests
res = requests.get(
"https://api.chatkomodo.com/public/countries",
timeout=30,
)
res.raise_for_status()
print(res.json())<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$res = $client->request('GET', 'https://api.chatkomodo.com/public/countries', [
]);
print_r(json_decode((string) $res->getBody(), true));Response 200
{
"countries": [
{
"iso": "string",
"name": "Example",
"calling_code": "482913",
"timezone": "Asia/Jakarta"
}
]
}List industries
GET
/public/industriesNo authenticationPublic list of industries that have an onboarding starter pack. No authentication.
Query parameters
langstringLanguage of the names/summaries (defaulten)
Responses
- 200Industries
Response fields
industriesarray of objectrequiredindustries[].idstringrequiredindustries[].namestringrequiredindustries[].summarystringrequired
Request
curl "https://api.chatkomodo.com/public/industries"const res = await fetch('https://api.chatkomodo.com/public/industries', {
method: 'GET',
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.code}: ${data.error}`);
console.log(data);import os
import requests
res = requests.get(
"https://api.chatkomodo.com/public/industries",
timeout=30,
)
res.raise_for_status()
print(res.json())<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$res = $client->request('GET', 'https://api.chatkomodo.com/public/industries', [
]);
print_r(json_decode((string) $res->getBody(), true));Response 200
{
"industries": [
{
"id": "01JA5V6Q8M2H7G4K9P3T0R1S2X",
"name": "Example",
"summary": "string"
}
]
}