. Create an API key under API keys.API reference · WhatsApp features
WhatsApp Business
Update the business profile
/v1/sessions/{sessionId}/business/profileNot available yet: the WhatsApp library version in use (Baileys 6.7.23) has no updateBussinesProfile method, so this answers 501 NOT_SUPPORTED. The handler would pass the JSON body to the library unchanged and does not validate it.
Path parameters
sessionIdstringrequiredSession (device) id
Request body
Any JSON object. Business profile fields, passed unchanged to the WhatsApp library
Responses
- 200Updated
Response fields
okbooleanrequired
- 400The body is not valid JSON
- 401Missing or invalid credentials
- 403The API key is restricted to other sessions, or the operation is not available to CS-agent logins
- 404Unknown session, or a session of another tenant
- 409The session is not connected
- 500
WhatsApp operation failed: WhatsApp or the library rejected the call. The gateway does not validate this body, so missing or malformed fields end up here too - 501
NOT_SUPPORTED: the WhatsApp library version in use (Baileys 6.7.x) has no such operation, so the call is not available yet
curl -X PUT "https://api.chatkomodo.com/v1/sessions/YOUR_DEVICE_ID/business/profile" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'const res = await fetch('https://api.chatkomodo.com/v1/sessions/YOUR_DEVICE_ID/business/profile', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.CHATKOMODO_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({}),
});
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/sessions/YOUR_DEVICE_ID/business/profile",
headers={
"Authorization": f"Bearer {os.environ['CHATKOMODO_API_KEY']}",
},
json={},
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/sessions/YOUR_DEVICE_ID/business/profile', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
'json' => [],
]);
print_r(json_decode((string) $res->getBody(), true));{
"ok": true
}List catalog products
/v1/sessions/{sessionId}/business/catalogFetches up to 100 products of a business catalog from WhatsApp. There is no paging parameter, so nextPageCursor cannot be followed.
Path parameters
sessionIdstringrequiredSession (device) id
Query parameters
jidstringBusiness whose catalog to read; defaults to the account of the session
Responses
- 200Catalog
Response fields
productsarray of objectrequiredproducts[].idstringrequiredproducts[].namestringrequiredproducts[].descriptionstringproducts[].pricenumberproducts[].currencystringproducts[].retailerIdstringproducts[].urlstringproducts[].isHiddenbooleanproducts[].imageUrlsobjectproducts[].availabilitystringproducts[].reviewStatusobjectnextPageCursorstring
- 401Missing or invalid credentials
- 403The API key is restricted to other sessions
- 404Unknown session, or a session of another tenant
- 409The session is not connected
- 500
WhatsApp operation failed: WhatsApp or the library rejected the call. The gateway does not validate this body, so missing or malformed fields end up here too
curl "https://api.chatkomodo.com/v1/sessions/YOUR_DEVICE_ID/business/catalog" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY"const res = await fetch('https://api.chatkomodo.com/v1/sessions/YOUR_DEVICE_ID/business/catalog', {
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/sessions/YOUR_DEVICE_ID/business/catalog",
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/sessions/YOUR_DEVICE_ID/business/catalog', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
]);
print_r(json_decode((string) $res->getBody(), true));{
"products": [
{
"id": "01JA5V6Q8M2H7G4K9P3T0R1S2X",
"name": "Iced coffee 250 ml",
"description": "Short description",
"price": 150000,
"currency": "IDR",
"retailerId": "SKU-1042",
"url": "https://example.com/file.jpg",
"isHidden": true,
"imageUrls": {},
"availability": "string",
"reviewStatus": {}
}
],
"nextPageCursor": "string"
}Create a catalog product
/v1/sessions/{sessionId}/business/catalog/productsCreates a product in the catalog of the account. Each image is downloaded by the gateway through the outbound-URL guard (http/https only, max 5 MB, no private or local addresses) and uploaded as bytes; anything else in images is a 400. The remaining fields are passed unchanged to the WhatsApp library and not validated by the gateway; they follow the library's product type.
Path parameters
sessionIdstringrequiredSession (device) id
Request body
namestringrequiredProduct namedescriptionstringrequiredProduct descriptionpricenumberrequiredPrice as the WhatsApp library expects itcurrencystringrequiredCurrency codeimagesarray of objectrequiredProduct images, each given as{ "url": "https://…" }(at most 10)images[].urlstringrequiredPublic http(s) URL of the image (max 5 MB). The gateway downloads it itself; private and local addresses are refusedretailerIdstringYour own product idurlstringLink to the product pageisHiddenbooleanoriginCountryCodestringISO country code of origin
Responses
- 200Product created
Response fields
idstringrequirednamestringrequireddescriptionstringpricenumbercurrencystringretailerIdstringurlstringisHiddenbooleanimageUrlsobjectavailabilitystringreviewStatusobject
- 400The body is not valid JSON, or
image_urlis missing, is not an http(s) URL, answers with an HTTP error, is larger than 5 MB, or points at a private/local address (errorstarts withimage_url) - 401Missing or invalid credentials
- 403The API key is restricted to other sessions, or the operation is not available to CS-agent logins
- 404Unknown session, or a session of another tenant
- 409The session is not connected
- 500
WhatsApp operation failed: WhatsApp or the library rejected the call. The gateway does not validate this body, so missing or malformed fields end up here too
curl -X POST "https://api.chatkomodo.com/v1/sessions/YOUR_DEVICE_ID/business/catalog/products" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Iced coffee 250 ml",
"description": "Short description",
"price": 150000,
"currency": "IDR",
"images": [
{
"url": "https://example.com/file.jpg"
}
],
"retailerId": "SKU-1042",
"url": "https://example.com/file.jpg"
}'const res = await fetch('https://api.chatkomodo.com/v1/sessions/YOUR_DEVICE_ID/business/catalog/products', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.CHATKOMODO_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Iced coffee 250 ml",
"description": "Short description",
"price": 150000,
"currency": "IDR",
"images": [
{
"url": "https://example.com/file.jpg"
}
],
"retailerId": "SKU-1042",
"url": "https://example.com/file.jpg"
}),
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.code}: ${data.error}`);
console.log(data);import os
import requests
res = requests.post(
"https://api.chatkomodo.com/v1/sessions/YOUR_DEVICE_ID/business/catalog/products",
headers={
"Authorization": f"Bearer {os.environ['CHATKOMODO_API_KEY']}",
},
json={
"name": "Iced coffee 250 ml",
"description": "Short description",
"price": 150000,
"currency": "IDR",
"images": [
{
"url": "https://example.com/file.jpg",
},
],
"retailerId": "SKU-1042",
"url": "https://example.com/file.jpg",
},
timeout=30,
)
res.raise_for_status()
print(res.json())<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$res = $client->request('POST', 'https://api.chatkomodo.com/v1/sessions/YOUR_DEVICE_ID/business/catalog/products', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
'json' => [
'name' => 'Iced coffee 250 ml',
'description' => 'Short description',
'price' => 150000,
'currency' => 'IDR',
'images' => [
[
'url' => 'https://example.com/file.jpg',
],
],
'retailerId' => 'SKU-1042',
'url' => 'https://example.com/file.jpg',
],
]);
print_r(json_decode((string) $res->getBody(), true));{
"id": "01JA5V6Q8M2H7G4K9P3T0R1S2X",
"name": "Iced coffee 250 ml",
"description": "Short description",
"price": 150000,
"currency": "IDR",
"retailerId": "SKU-1042",
"url": "https://example.com/file.jpg",
"isHidden": true,
"imageUrls": {},
"availability": "string",
"reviewStatus": {}
}Delete catalog products
/v1/sessions/{sessionId}/business/catalog/productsDeletes products from the catalog; the ids travel in the JSON body of this DELETE request.
Path parameters
sessionIdstringrequiredSession (device) id
Request body
product_idsarray of stringrequiredProduct ids
Responses
- 200Result
Response fields
deletedintegerrequiredProducts deleted
- 400The body is not valid JSON
- 401Missing or invalid credentials
- 403The API key is restricted to other sessions, or the operation is not available to CS-agent logins
- 404Unknown session, or a session of another tenant
- 409The session is not connected
- 500
WhatsApp operation failed: WhatsApp or the library rejected the call. The gateway does not validate this body, so missing or malformed fields end up here too
curl -X DELETE "https://api.chatkomodo.com/v1/sessions/YOUR_DEVICE_ID/business/catalog/products" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"product_ids": [
"01JA5V6Q8M2H7G4K9P3T0R1S2X"
]
}'const res = await fetch('https://api.chatkomodo.com/v1/sessions/YOUR_DEVICE_ID/business/catalog/products', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.CHATKOMODO_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"product_ids": [
"01JA5V6Q8M2H7G4K9P3T0R1S2X"
]
}),
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.code}: ${data.error}`);
console.log(data);import os
import requests
res = requests.delete(
"https://api.chatkomodo.com/v1/sessions/YOUR_DEVICE_ID/business/catalog/products",
headers={
"Authorization": f"Bearer {os.environ['CHATKOMODO_API_KEY']}",
},
json={
"product_ids": [
"01JA5V6Q8M2H7G4K9P3T0R1S2X",
],
},
timeout=30,
)
res.raise_for_status()
print(res.json())<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$res = $client->request('DELETE', 'https://api.chatkomodo.com/v1/sessions/YOUR_DEVICE_ID/business/catalog/products', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
'json' => [
'product_ids' => [
'01JA5V6Q8M2H7G4K9P3T0R1S2X',
],
],
]);
print_r(json_decode((string) $res->getBody(), true));{
"deleted": 1
}Update a catalog product
/v1/sessions/{sessionId}/business/catalog/products/{pid}Updates a catalog product. Images are handled as in POST …/business/catalog/products (downloaded by the gateway, never fetched from a URL by the library). The remaining fields are passed unchanged to the WhatsApp library and not validated by the gateway.
Path parameters
sessionIdstringrequiredSession (device) idpidstringrequiredProduct id
Request body
namestringrequiredProduct namedescriptionstringrequiredProduct descriptionpricenumberrequiredPrice as the WhatsApp library expects itcurrencystringrequiredCurrency codeimagesarray of objectrequiredProduct images, each given as{ "url": "https://…" }(at most 10)images[].urlstringrequiredPublic http(s) URL of the image (max 5 MB). The gateway downloads it itself; private and local addresses are refusedretailerIdstringYour own product idurlstringLink to the product pageisHiddenboolean
Responses
- 200Product updated
Response fields
idstringrequirednamestringrequireddescriptionstringpricenumbercurrencystringretailerIdstringurlstringisHiddenbooleanimageUrlsobjectavailabilitystringreviewStatusobject
- 400The body is not valid JSON, or
image_urlis missing, is not an http(s) URL, answers with an HTTP error, is larger than 5 MB, or points at a private/local address (errorstarts withimage_url) - 401Missing or invalid credentials
- 403The API key is restricted to other sessions, or the operation is not available to CS-agent logins
- 404Unknown session, or a session of another tenant
- 409The session is not connected
- 500
WhatsApp operation failed: WhatsApp or the library rejected the call. The gateway does not validate this body, so missing or malformed fields end up here too
curl -X PUT "https://api.chatkomodo.com/v1/sessions/YOUR_DEVICE_ID/business/catalog/products/7012345678901234" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Iced coffee 250 ml",
"description": "Short description",
"price": 150000,
"currency": "IDR",
"images": [
{
"url": "https://example.com/file.jpg"
}
],
"retailerId": "SKU-1042",
"url": "https://example.com/file.jpg"
}'const res = await fetch('https://api.chatkomodo.com/v1/sessions/YOUR_DEVICE_ID/business/catalog/products/7012345678901234', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.CHATKOMODO_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Iced coffee 250 ml",
"description": "Short description",
"price": 150000,
"currency": "IDR",
"images": [
{
"url": "https://example.com/file.jpg"
}
],
"retailerId": "SKU-1042",
"url": "https://example.com/file.jpg"
}),
});
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/sessions/YOUR_DEVICE_ID/business/catalog/products/7012345678901234",
headers={
"Authorization": f"Bearer {os.environ['CHATKOMODO_API_KEY']}",
},
json={
"name": "Iced coffee 250 ml",
"description": "Short description",
"price": 150000,
"currency": "IDR",
"images": [
{
"url": "https://example.com/file.jpg",
},
],
"retailerId": "SKU-1042",
"url": "https://example.com/file.jpg",
},
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/sessions/YOUR_DEVICE_ID/business/catalog/products/7012345678901234', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
'json' => [
'name' => 'Iced coffee 250 ml',
'description' => 'Short description',
'price' => 150000,
'currency' => 'IDR',
'images' => [
[
'url' => 'https://example.com/file.jpg',
],
],
'retailerId' => 'SKU-1042',
'url' => 'https://example.com/file.jpg',
],
]);
print_r(json_decode((string) $res->getBody(), true));{
"id": "01JA5V6Q8M2H7G4K9P3T0R1S2X",
"name": "Iced coffee 250 ml",
"description": "Short description",
"price": 150000,
"currency": "IDR",
"retailerId": "SKU-1042",
"url": "https://example.com/file.jpg",
"isHidden": true,
"imageUrls": {},
"availability": "string",
"reviewStatus": {}
}List WhatsApp Business labels
/v1/sessions/{sessionId}/labelsNot available yet: the WhatsApp library version in use (Baileys 6.7.23) has no getLabels method, so this answers 501 NOT_SUPPORTED. The handler would return { "labels": [...] }.
Path parameters
sessionIdstringrequiredSession (device) id
Responses
- 200Labels
Response fields
labelsarray of objectrequiredlabels[].idstringrequiredlabels[].namestringrequired
- 401Missing or invalid credentials
- 403The API key is restricted to other sessions
- 404Unknown session, or a session of another tenant
- 409The session is not connected
- 500
WhatsApp operation failed: WhatsApp or the library rejected the call. The gateway does not validate this body, so missing or malformed fields end up here too - 501
NOT_SUPPORTED: the WhatsApp library version in use (Baileys 6.7.x) has no such operation, so the call is not available yet
curl "https://api.chatkomodo.com/v1/sessions/YOUR_DEVICE_ID/labels" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY"const res = await fetch('https://api.chatkomodo.com/v1/sessions/YOUR_DEVICE_ID/labels', {
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/sessions/YOUR_DEVICE_ID/labels",
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/sessions/YOUR_DEVICE_ID/labels', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
]);
print_r(json_decode((string) $res->getBody(), true));{
"labels": [
{
"id": "01JA5V6Q8M2H7G4K9P3T0R1S2X",
"name": "Example"
}
]
}