. Create an API key under API keys.API reference · Customers
Privacy
Export or erase everything held about one person, and how long message content is kept.
Export the data of one person
/v1/privacy/contactExport everything held about one person (data-subject access request): consent and its history, contacts, messages (up to 5 000, plus up to 5 000 from the message archive), inbox, assignments, blast participation, scheduled and recurring messages, satisfaction answers. Account owner or API key only.
Query parameters
phonestringrequiredInternational format+<country code><number>
Responses
- 200Everything held for that number
Response fields
exported_atstringrequiredphonestringrequiredconsentanyconsent_historyarray of anyrequiredcontactsarray of anyrequiredmessagesarray of anyrequiredmessages_truncatedbooleanrequiredarchived_messagesarray of anyMessages of this person in the message archive (up to 5 000)inboxarray of anyrequiredchat_metadataarray of anyrequiredassignmentsarray of anyrequiredblast_participationarray of anyrequiredscheduled_messagesarray of anyrequiredrecurring_messagesarray of anyrequiredcsat_responsesarray of anyrequiredlead_notesarray of anyrequiredlabel_historyarray of anyrequiredlink_clicksarray of anyrequiredVisits through your click-to-WhatsApp links that led to a chat with this personinvoicesarray of anyrequiredQRIS invoices sent to this person (on erasure they are kept without the number)
- 400
INVALID_NUMBER
curl "https://api.chatkomodo.com/v1/privacy/contact?phone=%2B447700900123" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY"const res = await fetch('https://api.chatkomodo.com/v1/privacy/contact?phone=%2B447700900123', {
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/privacy/contact?phone=%2B447700900123",
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/privacy/contact?phone=%2B447700900123', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
]);
print_r(json_decode((string) $res->getBody(), true));package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://api.chatkomodo.com/v1/privacy/contact?phone=%2B447700900123", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CHATKOMODO_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
if res.StatusCode >= 400 {
panic(fmt.Sprintf("%d: %s", res.StatusCode, data))
}
fmt.Println(string(data))
}{
"exported_at": "string",
"phone": "+447700900123",
"consent": "string",
"consent_history": [
"string"
],
"contacts": [
"string"
],
"messages": [
"Hi Sam, your order has shipped."
],
"messages_truncated": true,
"archived_messages": [
"Hi Sam, your order has shipped."
],
"inbox": [
"string"
],
"chat_metadata": [
"string"
],
"assignments": [
"string"
],
"blast_participation": [
"string"
],
"scheduled_messages": [
"Hi Sam, your order has shipped."
],
"recurring_messages": [
"Hi Sam, your order has shipped."
],
"csat_responses": [
"string"
],
"lead_notes": [
"Prefers delivery after 5 pm"
],
"label_history": [
"string"
],
"link_clicks": [
"https://example.com/file.jpg"
]
}Erase the data of one person
/v1/privacy/contactErase everything held about one person (right to erasure), including the message archive. Irreversible. confirm must repeat the phone number, otherwise the call fails with 400 CONFIRMATION_REQUIRED. By default an opt-out record is kept so the person is not messaged again (keep_suppression: false removes it too). Account owner or API key only.
Request body
phonestringrequiredconfirmstringrequiredThe same phone number againkeep_suppressionbooleanDefaulttrue
Responses
- 200Erased
Response fields
okbooleanrequireddeletedobjectrequiredRows removed per data typesuppression_keptbooleanrequiredfailedarray of stringrequiredData types that could not be erased; empty when the erasure is complete
- 400
INVALID_NUMBERorCONFIRMATION_REQUIRED - 500
ERASURE_INCOMPLETE: some records could not be deleted (failedlists them); repeat the request or contact support
curl -X DELETE "https://api.chatkomodo.com/v1/privacy/contact" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "+447700900123",
"confirm": "+447700900123",
"keep_suppression": true
}'const res = await fetch('https://api.chatkomodo.com/v1/privacy/contact', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.CHATKOMODO_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"phone": "+447700900123",
"confirm": "+447700900123",
"keep_suppression": true
}),
});
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/privacy/contact",
headers={
"Authorization": f"Bearer {os.environ['CHATKOMODO_API_KEY']}",
},
json={
"phone": "+447700900123",
"confirm": "+447700900123",
"keep_suppression": True,
},
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/privacy/contact', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
'json' => [
'phone' => '+447700900123',
'confirm' => '+447700900123',
'keep_suppression' => true,
],
]);
print_r(json_decode((string) $res->getBody(), true));package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{
"phone": "+447700900123",
"confirm": "+447700900123",
"keep_suppression": true
}`)
req, err := http.NewRequest("DELETE", "https://api.chatkomodo.com/v1/privacy/contact", body)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CHATKOMODO_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
if res.StatusCode >= 400 {
panic(fmt.Sprintf("%d: %s", res.StatusCode, data))
}
fmt.Println(string(data))
}{
"ok": true,
"deleted": {},
"suppression_kept": true,
"failed": [
"string"
]
}Get the message retention
/v1/privacy/retentionHow long message content is kept.
Responses
- 200Retention
Response fields
message_daysinteger | nullrequiredYour own setting;null= platform defaulteffective_daysintegerrequireddefault_daysintegerrequiredmin_daysintegerrequiredmax_daysintegerrequired
curl "https://api.chatkomodo.com/v1/privacy/retention" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY"const res = await fetch('https://api.chatkomodo.com/v1/privacy/retention', {
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/privacy/retention",
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/privacy/retention', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
]);
print_r(json_decode((string) $res->getBody(), true));package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://api.chatkomodo.com/v1/privacy/retention", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CHATKOMODO_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
if res.StatusCode >= 400 {
panic(fmt.Sprintf("%d: %s", res.StatusCode, data))
}
fmt.Println(string(data))
}{
"message_days": 1,
"effective_days": 1,
"default_days": 1,
"min_days": 1,
"max_days": 1
}Set the message retention
/v1/privacy/retentionDashboard loginSet the message retention period in days (between min_days and max_days), or null for the platform default. Account owner only.
Request body
message_daysinteger | nullrequired
Responses
- 200Saved
Response fields
message_daysinteger | nullrequiredeffective_daysintegerrequired
- 400Out of range (
VALIDATION_FAILED)
curl -X PUT "https://api.chatkomodo.com/v1/privacy/retention" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message_days": 90
}'const res = await fetch('https://api.chatkomodo.com/v1/privacy/retention', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.CHATKOMODO_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"message_days": 90
}),
});
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/privacy/retention",
headers={
"Authorization": f"Bearer {os.environ['CHATKOMODO_API_KEY']}",
},
json={
"message_days": 90,
},
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/privacy/retention', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
'json' => [
'message_days' => 90,
],
]);
print_r(json_decode((string) $res->getBody(), true));package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{
"message_days": 90
}`)
req, err := http.NewRequest("PUT", "https://api.chatkomodo.com/v1/privacy/retention", body)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CHATKOMODO_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
if res.StatusCode >= 400 {
panic(fmt.Sprintf("%d: %s", res.StatusCode, data))
}
fmt.Println(string(data))
}{
"message_days": 1,
"effective_days": 1
}Get the message archive
/v1/privacy/archiveThe message archive: when it is on, messages past the retention period are moved out of the database into encrypted monthly files instead of being deleted, and kept for keep_days. Lists the archived months. Account owner or API key only.
Responses
- 200Archive
Response fields
enabledbooleanrequiredkeep_daysintegerrequiredkeep_minintegerrequiredkeep_maxintegerrequiredmonthsarray of objectrequiredmonths[].monthstringrequiredYYYY-MM(UTC)months[].messagesintegerrequiredmonths[].bytesintegerrequiredCompressed size on diskmonths[].filesintegerrequired
curl "https://api.chatkomodo.com/v1/privacy/archive" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY"const res = await fetch('https://api.chatkomodo.com/v1/privacy/archive', {
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/privacy/archive",
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/privacy/archive', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
]);
print_r(json_decode((string) $res->getBody(), true));package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://api.chatkomodo.com/v1/privacy/archive", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CHATKOMODO_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
if res.StatusCode >= 400 {
panic(fmt.Sprintf("%d: %s", res.StatusCode, data))
}
fmt.Println(string(data))
}{
"enabled": true,
"keep_days": 1,
"keep_min": 1,
"keep_max": 1,
"months": [
{
"month": "string",
"messages": 1,
"bytes": 1,
"files": 12
}
]
}Set up the message archive
/v1/privacy/archiveDashboard loginSwitch the archive on or off and choose how long archived months are kept (30-1 825 days after the month ends). Switching it off keeps what is already archived until its keep period ends; delete months to remove them sooner. Account owner only. Recorded as privacy.archive.
Request body
enabledbooleankeep_daysinteger
Responses
- 200Saved
Response fields
enabledbooleanrequiredkeep_daysintegerrequiredkeep_minintegerrequiredkeep_maxintegerrequiredmonthsarray of objectrequiredmonths[].monthstringrequiredYYYY-MM(UTC)months[].messagesintegerrequiredmonths[].bytesintegerrequiredCompressed size on diskmonths[].filesintegerrequired
- 400
VALIDATION_FAILED
curl -X PUT "https://api.chatkomodo.com/v1/privacy/archive" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"enabled": true,
"keep_days": 30
}'const res = await fetch('https://api.chatkomodo.com/v1/privacy/archive', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.CHATKOMODO_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"enabled": true,
"keep_days": 30
}),
});
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/privacy/archive",
headers={
"Authorization": f"Bearer {os.environ['CHATKOMODO_API_KEY']}",
},
json={
"enabled": True,
"keep_days": 30,
},
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/privacy/archive', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
'json' => [
'enabled' => true,
'keep_days' => 30,
],
]);
print_r(json_decode((string) $res->getBody(), true));package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{
"enabled": true,
"keep_days": 30
}`)
req, err := http.NewRequest("PUT", "https://api.chatkomodo.com/v1/privacy/archive", body)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CHATKOMODO_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
if res.StatusCode >= 400 {
panic(fmt.Sprintf("%d: %s", res.StatusCode, data))
}
fmt.Println(string(data))
}{
"enabled": true,
"keep_days": 1,
"keep_min": 1,
"keep_max": 1,
"months": [
{
"month": "string",
"messages": 1,
"bytes": 1,
"files": 12
}
]
}Download an archived month
/v1/privacy/archive/{month}Download one archived month, oldest message first: JSON lines (default, one message per line with every stored field) or CSV (format=csv; created_at, direction, device, chat, phone, type, text, status, error, sent_at, ids). Recorded as privacy.archive_download.
Path parameters
monthstringrequired
Query parameters
formatstring
Responses
- 200The messages (
application/x-ndjsonortext/csv, as an attachment) - 404No archive for that month
curl "https://api.chatkomodo.com/v1/privacy/archive/MONTH" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY"const res = await fetch('https://api.chatkomodo.com/v1/privacy/archive/MONTH', {
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/privacy/archive/MONTH",
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/privacy/archive/MONTH', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
]);
print_r(json_decode((string) $res->getBody(), true));package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://api.chatkomodo.com/v1/privacy/archive/MONTH", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CHATKOMODO_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
if res.StatusCode >= 400 {
panic(fmt.Sprintf("%d: %s", res.StatusCode, data))
}
fmt.Println(string(data))
}application/x-ndjson, text/csv — the file itself.
Delete an archived month
/v1/privacy/archive/{month}Dashboard loginDelete one archived month for good. Account owner only. Recorded as privacy.archive_delete.
Path parameters
monthstringrequired
Responses
- 200Deleted
Response fields
okbooleanrequired
- 404No archive for that month
curl -X DELETE "https://api.chatkomodo.com/v1/privacy/archive/MONTH" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY"const res = await fetch('https://api.chatkomodo.com/v1/privacy/archive/MONTH', {
method: 'DELETE',
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.delete(
"https://api.chatkomodo.com/v1/privacy/archive/MONTH",
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('DELETE', 'https://api.chatkomodo.com/v1/privacy/archive/MONTH', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
]);
print_r(json_decode((string) $res->getBody(), true));package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("DELETE", "https://api.chatkomodo.com/v1/privacy/archive/MONTH", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CHATKOMODO_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
if res.StatusCode >= 400 {
panic(fmt.Sprintf("%d: %s", res.StatusCode, data))
}
fmt.Println(string(data))
}{
"ok": true
}Export all business data
/v1/account/exportDashboard loginDownload every record of your business as NDJSON: a header line, then one {"table", "row"} per line (contacts, chats, messages, labels, leads, links, invoices, settings…). Secrets such as key hashes, tokens and encrypted credentials are left out. Account owner only; 3 per hour.
Responses
- 200NDJSON file (
Content-Disposition: attachment) - 403Not the account owner
- 429Rate limited
curl "https://api.chatkomodo.com/v1/account/export" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY"const res = await fetch('https://api.chatkomodo.com/v1/account/export', {
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/account/export",
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/account/export', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
]);
print_r(json_decode((string) $res->getBody(), true));package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://api.chatkomodo.com/v1/account/export", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CHATKOMODO_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
if res.StatusCode >= 400 {
panic(fmt.Sprintf("%d: %s", res.StatusCode, data))
}
fmt.Println(string(data))
}application/x-ndjson — the file itself.
Get the account deletion status
/v1/account/deletionDashboard loginWhether the deletion of this business is scheduled. Account owner only.
Responses
- 200Status
Response fields
scheduledobject | nullrequiredscheduled.requested_atintegerrequiredscheduled.due_atintegerrequiredWhen the business and all its data are deleted (ms)
curl "https://api.chatkomodo.com/v1/account/deletion" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY"const res = await fetch('https://api.chatkomodo.com/v1/account/deletion', {
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/account/deletion",
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/account/deletion', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
]);
print_r(json_decode((string) $res->getBody(), true));package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://api.chatkomodo.com/v1/account/deletion", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CHATKOMODO_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
if res.StatusCode >= 400 {
panic(fmt.Sprintf("%d: %s", res.StatusCode, data))
}
fmt.Println(string(data))
}{
"scheduled": {
"requested_at": 1767225600000,
"due_at": 1767225600000
}
}Schedule account deletion
/v1/account/deletionDashboard loginSchedule the deletion of this business and all its data after a 7-day grace period. confirm must be the business name. Cancel with DELETE before the date. Not available to an agency's client (MANAGED_BY_AGENCY) or to an agency that still has clients (HAS_CLIENTS). Account owner only.
Request body
confirmstringrequiredThe business name, typed exactly
Responses
- 200Scheduled
Response fields
scheduledobject | nullrequiredscheduled.requested_atintegerrequiredscheduled.due_atintegerrequiredWhen the business and all its data are deleted (ms)
- 400Name does not match
- 409Managed by an agency, or has clients
curl -X POST "https://api.chatkomodo.com/v1/account/deletion" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"confirm": "string"
}'const res = await fetch('https://api.chatkomodo.com/v1/account/deletion', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.CHATKOMODO_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"confirm": "string"
}),
});
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/account/deletion",
headers={
"Authorization": f"Bearer {os.environ['CHATKOMODO_API_KEY']}",
},
json={
"confirm": "string",
},
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/account/deletion', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
'json' => [
'confirm' => 'string',
],
]);
print_r(json_decode((string) $res->getBody(), true));package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{
"confirm": "string"
}`)
req, err := http.NewRequest("POST", "https://api.chatkomodo.com/v1/account/deletion", body)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CHATKOMODO_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
if res.StatusCode >= 400 {
panic(fmt.Sprintf("%d: %s", res.StatusCode, data))
}
fmt.Println(string(data))
}{
"scheduled": {
"requested_at": 1767225600000,
"due_at": 1767225600000
}
}Cancel account deletion
/v1/account/deletionDashboard loginCancel a scheduled deletion. Account owner only.
Responses
- 200Cancelled
Response fields
scheduledobject | nullrequiredscheduled.requested_atintegerrequiredscheduled.due_atintegerrequiredWhen the business and all its data are deleted (ms)
curl -X DELETE "https://api.chatkomodo.com/v1/account/deletion" \
-H "Authorization: Bearer $CHATKOMODO_API_KEY"const res = await fetch('https://api.chatkomodo.com/v1/account/deletion', {
method: 'DELETE',
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.delete(
"https://api.chatkomodo.com/v1/account/deletion",
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('DELETE', 'https://api.chatkomodo.com/v1/account/deletion', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('CHATKOMODO_API_KEY'),
],
]);
print_r(json_decode((string) $res->getBody(), true));package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("DELETE", "https://api.chatkomodo.com/v1/account/deletion", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CHATKOMODO_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
if res.StatusCode >= 400 {
panic(fmt.Sprintf("%d: %s", res.StatusCode, data))
}
fmt.Println(string(data))
}{
"scheduled": {
"requested_at": 1767225600000,
"due_at": 1767225600000
}
}