klct /developers
Sign in
API reference

API reference

Base URL https://app.klctai.com/api. Send Authorization: Bearer <token> on every request. The scope on each endpoint is the OAuth scope an access token needs; an account API key passes them all. See Authentication and Errors and limits.

API reference

Account

Identify the account a token belongs to and keep its brand in step with your product.

2 endpoints identitybranding:write
View as Markdown
Endpoints
Base URLhttps://app.klctai.com/apiAuthAuthorization: Bearer $KLCT_API_KEY
Needs identity or branding:writeGet a key
GET /platform/account identity

Get the connected account

Returns which KLCT account the token belongs to and whether billing is active. Call this first after connecting to confirm you hold the right account.

Response fields

FieldDescription
account_idinteger The KLCT account id.
namestring Account name.
billing_activeboolean False when the account has no active plan yet.
setup_urlstring Where a person can finish setup when billing is not active, otherwise null.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "identity" scope (error: insufficient_scope).
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id getAccount

curl "https://app.klctai.com/api/platform/account" \
  -H "Authorization: Bearer $KLCT_API_KEY"
{
  "account_id": 4821,
  "name": "Acme Dental",
  "billing_active": true,
  "setup_url": null
}
PUT /platform/branding branding:write

Set the account brand

Updates the logo, colors, website and typeface KLCT uses in emails, pages and social images. Send only the fields you want to change. Never reads or deletes anything else.

Body (JSON)

FieldDescription
primary_colorstring Hex color, for example #1D4ED8.
secondary_colorstring Hex color.
accent_colorstring Hex color.
button_colorstring Hex color for buttons.
button_text_colorstring Hex color for button text.
logo_urlstring HTTPS URL of the logo.
email_logo_urlstring HTTPS URL of the logo used in email headers.
square_logo_urlstring HTTPS URL of a square logo.
favicon_urlstring HTTPS URL of the favicon.
website_urlstring HTTPS URL of the main website.
from_namestring Sender name on emails, up to 120 characters.
brand_voicestring How the brand should sound, up to 2000 characters. Used by the AI writers.
font_familystring One of the typefaces KLCT offers.
socialsobject Social profile URLs keyed by network (HTTPS only).

Response fields

FieldDescription
okboolean True when saved.
updatedarray The fields that were changed.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "branding:write" scope (error: insufficient_scope).
  • 422Validation failed.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id updateBranding

curl -X PUT "https://app.klctai.com/api/platform/branding" \
  -H "Authorization: Bearer $KLCT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"primary_color":"#1D4ED8","logo_url":"https://acme.example/logo.png"}'
{
  "ok": true,
  "updated": [
    "primary_color",
    "logo_url"
  ]
}
API reference

Contacts

The people your account talks to. Contacts are shared by calls, chat, tickets, campaigns and sequences.

7 endpoints contacts:readcontacts:write
View as Markdown
Endpoints
Base URLhttps://app.klctai.com/apiAuthAuthorization: Bearer $KLCT_API_KEY
Needs contacts:read or contacts:writeGet a key
GET /contacts contacts:read

List contacts

Newest first. Page through with page and per_page.

Query parameters

NameDescription
pageinteger Page number, starting at 1. Default 1
per_pageinteger Rows per page, 1 to 100. Default 50

Response fields

FieldDescription
contactsarray The page of contacts.
contacts[].contact_idinteger Contact id.
contacts[].namestring First name.
contacts[].last_namestring Last name.
contacts[].emailstring Email address.
contacts[].phonestring Phone number in E.164 form (+15551234567).
contacts[].companystring Company name.
contacts[].websitestring Website.
contacts[].countrystring Country.
contacts[].tagsarray Free-form tags.
contacts[].metadataobject Your own key/value data. Merged on update, never replaced.
contacts[].lead_statusstring Pipeline stage KLCT assigned.
contacts[].lead_sourcestring Where the lead came from: meta_ads, google_ads, tiktok_ads, website, social_organic, referral, outbound, event, partner, other, or null when unknown. A verdict on a meta_ads / google_ads lead is reported back to that ad platform.
contacts[].is_qualifiedboolean The team's verdict on the lead: true = qualified, false = not qualified, null = not reviewed yet.
contacts[].qualified_atstring When the verdict was last given; null when not reviewed.
contacts[].created_atstring When the contact was created.
metaobject Pagination state.
meta.current_pageinteger Page just returned, starting at 1.
meta.last_pageinteger Last page available for this query.
meta.totalinteger Total rows matching the query.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "contacts:read" scope (error: insufficient_scope).
  • 422Validation failed.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id listContacts

curl "https://app.klctai.com/api/contacts" \
  -H "Authorization: Bearer $KLCT_API_KEY"
{
  "contacts": [
    {
      "contact_id": 90412,
      "name": "Dana",
      "last_name": "Cole",
      "email": "[email protected]",
      "phone": "+15551234567",
      "company": "Acme Dental",
      "website": null,
      "country": "US",
      "tags": [
        "vip"
      ],
      "metadata": {
        "crm_id": "c_77"
      },
      "lead_status": "new",
      "lead_source": "meta_ads",
      "is_qualified": false,
      "qualified_at": "2026-10-02T09:15:00Z",
      "created_at": "2026-10-01T14:03:22Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "last_page": 1,
    "total": 1
  }
}
GET /contacts/{id} contacts:read

Get a contact

Path parameters

NameDescription
idinteger · requiredContact id.

Response fields

FieldDescription
contactobject
contact.contact_idinteger Contact id.
contact.namestring First name.
contact.last_namestring Last name.
contact.emailstring Email address.
contact.phonestring Phone number in E.164 form (+15551234567).
contact.companystring Company name.
contact.websitestring Website.
contact.countrystring Country.
contact.tagsarray Free-form tags.
contact.metadataobject Your own key/value data. Merged on update, never replaced.
contact.lead_statusstring Pipeline stage KLCT assigned.
contact.lead_sourcestring Where the lead came from: meta_ads, google_ads, tiktok_ads, website, social_organic, referral, outbound, event, partner, other, or null when unknown. A verdict on a meta_ads / google_ads lead is reported back to that ad platform.
contact.is_qualifiedboolean The team's verdict on the lead: true = qualified, false = not qualified, null = not reviewed yet.
contact.qualified_atstring When the verdict was last given; null when not reviewed.
contact.created_atstring When the contact was created.
contact.updated_atstring Last changed.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "contacts:read" scope (error: insufficient_scope).
  • 404No such record in this account.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id getContact

curl "https://app.klctai.com/api/contacts/123" \
  -H "Authorization: Bearer $KLCT_API_KEY"
{
  "contact": {
    "contact_id": 90412,
    "name": "Dana",
    "last_name": "Cole",
    "email": "[email protected]",
    "phone": "+15551234567",
    "company": "Acme Dental",
    "website": null,
    "country": "US",
    "tags": [
      "vip"
    ],
    "metadata": {
      "crm_id": "c_77"
    },
    "lead_status": "new",
    "lead_source": "meta_ads",
    "is_qualified": false,
    "qualified_at": "2026-10-02T09:15:00Z",
    "created_at": "2026-10-01T14:03:22Z",
    "updated_at": "2026-10-02T09:00:00Z"
  }
}
PATCH /contacts/{id} contacts:write

Update a contact

Send only the fields to change. metadata is merged key by key, so you can add one key without resending the rest. Contacts are never deleted through the API.

Path parameters

NameDescription
idinteger · requiredContact id.

Body (JSON)

FieldDescription
namestring First name. Cannot be blank.
last_namestring Last name.
emailstring Email address.
phonestring Phone in any common format; stored as E.164. An unparseable value is rejected.
companystring Company.
websitestring Website.
countrystring Country.
lead_sourcestringmeta_ads, google_ads, tiktok_ads, website, social_organic, referral, outbound, event, partner, other Where the lead came from. A verdict on a meta_ads or google_ads lead is reported back to that ad platform.
is_qualifiedboolean Your verdict on the lead: true = qualified, false = not qualified, null = withdraw the verdict. For a Meta ads lead this is sent to the Conversions API as QualifiedLead or LeadDisqualified so Meta learns which leads you want.
metadataobject Merged into the existing metadata.

Response fields

FieldDescription
contactobject
contact.contact_idinteger Contact id.
contact.namestring First name.
contact.last_namestring Last name.
contact.emailstring Email address.
contact.phonestring Phone number in E.164 form (+15551234567).
contact.companystring Company name.
contact.websitestring Website.
contact.countrystring Country.
contact.tagsarray Free-form tags.
contact.metadataobject Your own key/value data. Merged on update, never replaced.
contact.lead_statusstring Pipeline stage KLCT assigned.
contact.lead_sourcestring Where the lead came from: meta_ads, google_ads, tiktok_ads, website, social_organic, referral, outbound, event, partner, other, or null when unknown. A verdict on a meta_ads / google_ads lead is reported back to that ad platform.
contact.is_qualifiedboolean The team's verdict on the lead: true = qualified, false = not qualified, null = not reviewed yet.
contact.qualified_atstring When the verdict was last given; null when not reviewed.
contact.created_atstring When the contact was created.
contact.updated_atstring Last changed.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "contacts:write" scope (error: insufficient_scope).
  • 404No such record in this account.
  • 422Validation failed.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id updateContact

curl -X PATCH "https://app.klctai.com/api/contacts/123" \
  -H "Authorization: Bearer $KLCT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Dana","phone":"+15551234567","lead_source":"meta_ads","is_qualified":true}'
{
  "contact": {
    "contact_id": 90412,
    "name": "Dana",
    "last_name": "Cole",
    "email": "[email protected]",
    "phone": "+15551234567",
    "company": "Acme Dental",
    "website": null,
    "country": "US",
    "tags": [
      "vip"
    ],
    "metadata": {
      "crm_id": "c_77"
    },
    "lead_status": "new",
    "lead_source": "meta_ads",
    "is_qualified": false,
    "qualified_at": "2026-10-02T09:15:00Z",
    "created_at": "2026-10-01T14:03:22Z",
    "updated_at": "2026-10-02T09:00:00Z"
  }
}
POST /contacts/create contacts:write

Create one or many contacts

Send one contact's fields at the top level, or a contacts array to create several in one transaction (any invalid row rejects the whole batch). Phone must be +1 plus ten digits. Creating the same email twice creates two contacts; use POST /platform/contacts/sync when you want create-or-update by email.

Body (JSON)

FieldDescription
namestring · required First name.
last_namestring · required Last name.
emailstring · required Email address.
phonestring · required +1 followed by ten digits.
companystring Company.
websitestring Website.
countrystring Country.
metadataobject Your own key/value data.
contactsarray Alternative to the top-level fields: several contacts at once.

Response fields

FieldDescription
contactsobject One object for a single contact, an array of them for a batch.
contacts.contact_idinteger New contact id.
contacts.namestring First name.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "contacts:write" scope (error: insufficient_scope).
  • 422Validation failed.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id createContacts

curl -X POST "https://app.klctai.com/api/contacts/create" \
  -H "Authorization: Bearer $KLCT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Dana","last_name":"Cole","email":"[email protected]","phone":"+15551234567","contacts":[]}'
{
  "contacts": {
    "contact_id": 90412,
    "name": "Dana"
  }
}
POST /leads/ingest contacts:write

Push leads into the account

The endpoint for lead vendors, form tools and scripts. Send up to 200 leads per call; each is matched to an existing contact by email, then phone, and created when new. Every lead is stamped with where it came from (lead_source, plus your vendor name and the lead's own external_id in its metadata) and can be put on a list in the same call. Existing contacts only gain what they are missing: names, status, verdicts and the lead source a person already set are never overwritten, tags are added and metadata is merged. Rows that fail validation are listed in errors without stopping the rest; if every row fails the call returns 422. A strict contract. Send only the fields listed below. A field we do not define is refused, not ignored: on a lead it is reported in that lead's errors entry as unknown_field (the lead is not saved), and on the call it rejects the whole request with 422 and an issues list. Your own data goes in metadata, which is the only free-form field: flat keys of at most 40 characters (letters, digits, spaces, dots, dashes, underscores), at most 30 keys, text/number/boolean values of at most 500 characters, and not a key KLCT uses itself (source, ad_attribution, anything starting ad_, ig_, fb_, wa_, meta_, support_, system_, social_, and the names lead_vendor, external_id, ingested_via). Dry run. Send dry_run: true to check a payload: it is validated and matched exactly as for real, the response says what would be created or updated, and nothing is saved, listed or started. Errors. A refused request returns 422 with error (the first problem) and issues, a list of {field, code, message}. Each entry in errors has the same list under issues. Codes: unknown_field, invalid, missing_contact_point, list_not_found, reserved_key, invalid_key, too_many_keys, too_long, save_failed. Other statuses: 401 no or bad key, 403 the key lacks contacts:write, 409 the same Idempotency-Key is still being processed, 429 too many calls (honour Retry-After). Arrival record and consent. Every call adds a record to the contact (metadata.lead_touches): vendor, external_id, lead_source, campaign, source_url, utm_*, submitted_at, the consent you sent and the time KLCT received it. A person sent by a second supplier gets a second record instead of losing the first; the same lead sent twice in a row is recorded once. The last 20 are kept. Every call is also logged: read it back with GET /leads/ingests. Lists. Give list_id (a list from GET /contactslists/list) or list_name, which is found or created. Both can be set once for the whole call and overridden on a single lead. A lead that is newly added to a list starts any sequence whose trigger is contact added to this list; send trigger_automations: false to file leads without starting anything. A lead also joins any of the account's smart (filtered) lists it matches. One call can create at most 5 new lists by name (too_many_lists); create the list first and send its list_id for more. A lead that matches only a hidden system contact is created as a new contact. Retries. Send an Idempotency-Key header (any unique string, for example a batch id). Repeating the same request with the same key within 24 hours returns the first answer with Idempotent-Replay: true and does nothing else. Reusing a key with a different body is refused (idempotency_key_reused, 422). Only a successful answer is remembered, so a call that returned 422 can be corrected and sent again with the same key. Limited to 30 calls per minute. Sending a single lead? Put its fields at the top level instead of leads.

Headers

NameDescription
Idempotency-KeyOptional. A unique string for this batch; a repeat within 24 hours is answered from the first call.

Body (JSON)

FieldDescription
vendorstring Who is sending these leads. Stored on each contact and added as a tag, so the account can filter by supplier.
lead_sourcestringmeta_ads, google_ads, tiktok_ads, website, social_organic, referral, outbound, event, partner, other Where these leads came from. Defaults to `partner`. Use `meta_ads` or `google_ads` only for leads that truly came from those ads: a verdict on them is reported back to that platform.
list_idinteger Put every lead on this list. Must belong to the account.
list_namestring Put every lead on the list with this name, creating it if it does not exist.
tagsarray Tags added to every lead. Up to 10, 50 characters each.
campaignstring The campaign these leads belong to. Kept with each lead's arrival record; a lead's own `campaign` overrides it.
trigger_automationsboolean Whether newly listed leads start the list's sequences. Default true.
dry_runboolean Validate and match without saving, listing or starting anything. The response shows what would happen.
leadsarray · required Between 1 and 200 leads. A lead may carry only the fields listed here.
leads[].emailstring Email, the first match key. Email or phone is required.
leads[].phonestring Any common phone format, stored as E.164. The second match key.
leads[].namestring First name.
leads[].last_namestring Last name.
leads[].companystring Company.
leads[].websitestring Website.
leads[].countrystring Country.
leads[].external_idstring The lead's id in your system. Kept in metadata so you can match KLCT contacts back to yours.
leads[].campaignstring The campaign this lead came from. Overrides the call-level `campaign`.
leads[].source_urlstring The page or form the lead was captured on (a full URL).
leads[].submitted_atstring When the lead signed up on your side, if earlier than this call (ISO 8601).
leads[].utm_sourcestring UTM source.
leads[].utm_mediumstring UTM medium.
leads[].utm_campaignstring UTM campaign.
leads[].utm_termstring UTM term.
leads[].utm_contentstring UTM content.
leads[].consentobject The proof of permission that came with the lead. KLCT keeps it with the arrival record; it does not decide anything from it.
leads[].consent.givenboolean · required Whether the person agreed to be contacted. Required when `consent` is sent; send `false` if they were asked and declined.
leads[].consent.atstring When they agreed (ISO 8601).
leads[].consent.textstring The exact wording they agreed to (up to 1,000 characters).
leads[].consent.source_urlstring Where they agreed (a full URL).
leads[].consent.ipstring The IP address they agreed from.
leads[].lead_sourcestringmeta_ads, google_ads, tiktok_ads, website, social_organic, referral, outbound, event, partner, other Overrides the call-level source for this lead.
leads[].list_idinteger Overrides the call-level list for this lead.
leads[].list_namestring Overrides the call-level list name for this lead.
leads[].tagsarray Extra tags for this lead.
leads[].metadataobject Anything else worth keeping: interest, budget, form answers. Flat key/value pairs (up to 30 keys, text, number or boolean values of at most 500 characters), no reserved keys. Merged; existing keys win.

Response fields

FieldDescription
createdinteger Contacts created.
updatedinteger Existing contacts that were matched and topped up.
resultsarray One entry per lead that was saved.
results[].indexinteger Position of the lead in the request.
results[].statusstringcreated, updated What happened to it.
results[].contact_idinteger The KLCT contact id.
results[].list_idinteger The list it was put on, null when none.
errorsarray Leads that were skipped.
errors[].indexinteger Position in the request.
errors[].errorstring The first reason the lead was skipped.
errors[].issuesarray Everything wrong with the lead.
errors[].issues[].fieldstring The field at fault.
errors[].issues[].codestring A stable code such as `unknown_field`.
errors[].issues[].messagestring What is wrong.
dry_runboolean Present and true when the call was a dry run. `contact_id` is then null for a lead that would be created, and `list_id` is null for a list that would be created.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "contacts:write" scope (error: insufficient_scope).
  • 422Validation failed.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id ingestLeads

curl -X POST "https://app.klctai.com/api/leads/ingest" \
  -H "Authorization: Bearer $KLCT_API_KEY" \
  -H "Idempotency-Key: my-batch-001" \
  -H "Content-Type: application/json" \
  -d '{"vendor":"Acme Leads","lead_source":"partner","list_name":"Acme Leads — October","tags":["roofing"],"campaign":"oct-roofing","leads":[{"email":"[email protected]","phone":"+15551234567","name":"Dana","last_name":"Cole","external_id":"L-88213","source_url":"https://acme.example/roofing","submitted_at":"2026-10-29T14:00:00Z","metadata":{"budget":"10-20k"}}]}'
{
  "created": 1,
  "updated": 1,
  "results": [
    {
      "index": 0,
      "status": "created",
      "contact_id": 90412,
      "list_id": 12
    },
    {
      "index": 1,
      "status": "updated",
      "contact_id": 90177,
      "list_id": 12
    }
  ],
  "errors": [
    {
      "index": 2,
      "error": "Each lead needs an email or a phone number.",
      "issues": [
        {
          "field": "email",
          "code": "missing_contact_point",
          "message": "Each lead needs an email or a phone number."
        }
      ]
    }
  ]
}
GET /leads/ingests contacts:read

See the calls made to the lead API

The log of calls to POST /leads/ingest for this account, newest first (dry runs are not logged, and entries are kept 90 days). Use it to confirm a supplier's batch arrived and to see why leads were refused: each entry carries the counts, the HTTP status, the key that made the call and up to 20 of the errors.

Query parameters

NameDescription
pageinteger Page number, from 1.
per_pageinteger Entries per page, 1 to 100. Default 25.

Response fields

FieldDescription
dataarray Calls, newest first.
data[].idinteger Log entry id.
data[].received_atstring When the call arrived.
data[].vendorstring The `vendor` the call named, if any.
data[].keystring The name of the API key that made the call.
data[].statusinteger The HTTP status the call got.
data[].leadsinteger Leads in the call.
data[].createdinteger Contacts created.
data[].updatedinteger Existing contacts topped up.
data[].failedinteger Leads refused.
data[].idempotency_keystring The Idempotency-Key header, if one was sent.
data[].errorsarray Up to 20 of them.
metaobject
meta.pageinteger Current page.
meta.per_pageinteger Entries per page.
meta.totalinteger Entries in all.
meta.last_pageinteger Last page.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "contacts:read" scope (error: insufficient_scope).
  • 422Validation failed.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id listLeadIngests

curl "https://app.klctai.com/api/leads/ingests?page=1&per_page=25" \
  -H "Authorization: Bearer $KLCT_API_KEY"
{
  "data": [
    {
      "id": 412,
      "received_at": "2026-10-30T15:02:11+00:00",
      "vendor": "Acme Leads",
      "key": "api_key",
      "status": 200,
      "leads": 120,
      "created": 98,
      "updated": 20,
      "failed": 2,
      "idempotency_key": "acme-2026-10-30-batch-1",
      "errors": [
        {
          "index": 7,
          "error": "Each lead needs an email or a phone number.",
          "issues": [
            {
              "field": "email",
              "code": "missing_contact_point",
              "message": "Each lead needs an email or a phone number."
            }
          ]
        }
      ]
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total": 1,
    "last_page": 1
  }
}
POST /platform/contacts/sync contacts:write

Create or update contacts by email

Up to 200 contacts per call. A contact whose email already exists is updated: blank fields are filled, existing values are kept, tags are unioned and metadata is merged. Rows that fail validation are reported in errors without stopping the rest. Limited to 30 calls per minute.

Body (JSON)

FieldDescription
contactsarray · required Between 1 and 200 contacts.
contacts[].emailstring · required Email, the match key.
contacts[].namestring First name.
contacts[].last_namestring Last name.
contacts[].phonestring Any common phone format; ignored if it cannot be parsed.
contacts[].companystring Company.
contacts[].tagsarray Up to 10 tags, 50 characters each.
contacts[].metadataobject Key/value data, merged.

Response fields

FieldDescription
createdinteger Contacts created.
updatedinteger Contacts updated.
errorsarray Rows that were skipped.
errors[].indexinteger Position in the request.
errors[].errorstring Why the row was skipped.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "contacts:write" scope (error: insufficient_scope).
  • 422Validation failed.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id syncContacts

curl -X POST "https://app.klctai.com/api/platform/contacts/sync" \
  -H "Authorization: Bearer $KLCT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contacts":[{"email":"[email protected]","name":"Dana","tags":[]}]}'
{
  "created": 1,
  "updated": 0,
  "errors": []
}
API reference

Contact lists

Groups of contacts used as audiences for campaigns and AI call batches. Reading lists needs contacts:read; creating, editing and filling them needs contacts:write.

8 endpoints contacts:readcontacts:write
View as Markdown
GET /contactslists/list contacts:read

List contact lists

Response fields

FieldDescription
dataarray All lists in the account.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "contacts:read" scope (error: insufficient_scope).
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id listContactLists

curl "https://app.klctai.com/api/contactslists/list" \
  -H "Authorization: Bearer $KLCT_API_KEY"
{
  "data": [
    {
      "contacts_list_id": 12,
      "name": "Spring leads",
      "target_industry": "Dental"
    }
  ]
}
POST /contactslists/create contacts:write

Create a contact list

Body (JSON)

FieldDescription
namestring · required List name.
target_industrystring · required Industry the list targets.
notesstring · required Notes about the list.
metadataobject Your own key/value data.

Response fields

FieldDescription
contact_list_idinteger New list id.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "contacts:write" scope (error: insufficient_scope).
  • 422Validation failed.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id createContactList

curl -X POST "https://app.klctai.com/api/contactslists/create" \
  -H "Authorization: Bearer $KLCT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Spring leads","target_industry":"Dental","notes":"Imported from the open house"}'
{
  "contact_list_id": 12
}
POST /contactslists/{contactList}/update contacts:write

Rename or edit a contact list

Path parameters

NameDescription
contactListinteger · requiredContact list id.

Body (JSON)

FieldDescription
namestring · required List name.
target_industrystring Industry.
metadataobject Merged into existing metadata.

Response fields

FieldDescription
contact_list_idinteger List id.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "contacts:write" scope (error: insufficient_scope).
  • 404No such record in this account.
  • 422Validation failed.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id updateContactList

curl -X POST "https://app.klctai.com/api/contactslists/123/update" \
  -H "Authorization: Bearer $KLCT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Spring leads 2026"}'
{
  "contact_list_id": 12
}
POST /contactslists/{contactList}/delete contacts:write

Delete a contact list

Deletes the list, not the contacts in it.

Path parameters

NameDescription
contactListinteger · requiredContact list id.

Response fields

FieldDescription
successstring Confirmation sentence.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "contacts:write" scope (error: insufficient_scope).
  • 404No such record in this account.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id deleteContactList

curl -X POST "https://app.klctai.com/api/contactslists/123/delete" \
  -H "Authorization: Bearer $KLCT_API_KEY"
{
  "success": "Contact list deleted with success!"
}
GET /contactslists/{contactList}/get_contacts contacts:read

List the contacts in a list

Path parameters

NameDescription
contactListinteger · requiredContact list id.

Response fields

FieldDescription
dataarray Members of the list.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "contacts:read" scope (error: insufficient_scope).
  • 404No such record in this account.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id listContactListMembers

curl "https://app.klctai.com/api/contactslists/123/get_contacts" \
  -H "Authorization: Bearer $KLCT_API_KEY"
{
  "data": [
    {
      "contact_id": 90412,
      "name": "Dana"
    }
  ]
}
POST /contactslists/{contactList}/create_sync_contacts contacts:write

Create contacts and put them in a list

Creates each contact (or updates the existing one with the same phone or email) and adds it to the list.

Path parameters

NameDescription
contactListinteger · requiredContact list id.

Body (JSON)

FieldDescription
contactsarray · required Contacts to create and add.
contacts[].namestring · required First name.
contacts[].emailstring · required Email.
contacts[].last_namestring Last name.
contacts[].phonestring Phone.
contacts[].companystring Company.
contacts[].websitestring Website.
contacts[].countrystring Country.
contacts[].metadataobject Key/value data.

Response fields

FieldDescription
successstring Confirmation sentence.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "contacts:write" scope (error: insufficient_scope).
  • 404No such record in this account.
  • 422Validation failed.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id createAndSyncListContacts

curl -X POST "https://app.klctai.com/api/contactslists/123/create_sync_contacts" \
  -H "Authorization: Bearer $KLCT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contacts":[{"name":"Dana","email":"[email protected]","phone":"+15551234567"}]}'
{
  "success": "The contacts where synced with success!"
}
POST /contactslists/{contactList}/sync_contacts contacts:write

Set the members of a list

Sets the list membership from contacts_ids.

Path parameters

NameDescription
contactListinteger · requiredContact list id.

Body (JSON)

FieldDescription
namestring · required List name (this endpoint requires it).
contacts_idsarray Contact ids that should be in the list.

Response fields

FieldDescription
successstring Confirmation sentence.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "contacts:write" scope (error: insufficient_scope).
  • 404No such record in this account.
  • 422Validation failed.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id syncListContacts

curl -X POST "https://app.klctai.com/api/contactslists/123/sync_contacts" \
  -H "Authorization: Bearer $KLCT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Spring leads","contacts_ids":[90412]}'
{
  "success": "The contacts where synced with success!"
}
POST /contactslists/{contactList}/remove_contacts contacts:write

Remove contacts from a list

Removes membership only. The contacts themselves are kept.

Path parameters

NameDescription
contactListinteger · requiredContact list id.

Body (JSON)

FieldDescription
contacts_idsarray · required Contact ids to remove.

Response fields

FieldDescription
successstring Confirmation sentence.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "contacts:write" scope (error: insufficient_scope).
  • 404No such record in this account.
  • 422Validation failed.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id removeListContacts

curl -X POST "https://app.klctai.com/api/contactslists/123/remove_contacts" \
  -H "Authorization: Bearer $KLCT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contacts_ids":[90412]}'
{
  "success": "Contacts removed"
}
API reference

Calls

Calls the AI agents and your team made or received.

1 endpoint calls:read
View as Markdown
Endpoints
Base URLhttps://app.klctai.com/apiAuthAuthorization: Bearer $KLCT_API_KEY
Needs calls:readGet a key
GET /calls calls:read

List calls

Newest first, with outcome and duration.

Query parameters

NameDescription
pageinteger Page number, starting at 1. Default 1
per_pageinteger Rows per page, 1 to 100. Default 50

Response fields

FieldDescription
callsarray The page of calls.
calls[].phone_call_idinteger Call id.
calls[].contact_idinteger The contact on the call.
calls[].fromstring Caller number.
calls[].tostring Dialed number.
calls[].statusstring Call status.
calls[].durationinteger Seconds.
calls[].interest_levelstring How interested the AI graded the contact.
calls[].start_timestring When the call started.
calls[].created_atstring When the record was created.
metaobject Pagination state.
meta.current_pageinteger Page just returned, starting at 1.
meta.last_pageinteger Last page available for this query.
meta.totalinteger Total rows matching the query.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "calls:read" scope (error: insufficient_scope).
  • 422Validation failed.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id listCalls

curl "https://app.klctai.com/api/calls" \
  -H "Authorization: Bearer $KLCT_API_KEY"
{
  "calls": [
    {
      "phone_call_id": 55120,
      "contact_id": 90412,
      "from": "+15559876543",
      "to": "+15551234567",
      "status": "completed",
      "duration": 142,
      "interest_level": "high",
      "start_time": "2026-10-02T15:10:00Z",
      "created_at": "2026-10-02T15:09:41Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "last_page": 1,
    "total": 1
  }
}
API reference

Tickets

Helpdesk tickets from email, chat, forms and the API. Replies go to the customer by email, or into the chat when the ticket came from chat. Tickets are never deleted through the API. Needs the Support module on the account.

6 endpoints tickets:readtickets:write
View as Markdown
Endpoints
Base URLhttps://app.klctai.com/apiAuthAuthorization: Bearer $KLCT_API_KEY
Needs tickets:read or tickets:writeGet a key
GET /tickets tickets:read

List tickets

Newest first. Filter by status, contact, search text, or what changed since a time (handy for incremental sync).

Query parameters

NameDescription
pageinteger Page number, starting at 1. Default 1
per_pageinteger Rows per page, 1 to 100. Default 50
statusstring One exact status, or `unresolved` for every status that still needs work.
qstring Matches the subject or ticket number.
contact_idinteger Only tickets for this contact.
updated_sincestring Only tickets changed at or after this time.

Response fields

FieldDescription
ticketsarray The page of tickets.
tickets[].idinteger Ticket id.
tickets[].ticket_numberstring Human reference such as SUP-1042.
tickets[].subjectstring Subject line.
tickets[].statusstring Current status.
tickets[].priorityinteger 0 (lowest) to 4 (highest).
tickets[].sourcestring How it arrived: email, chat, form, api and others.
tickets[].contactobject The requester, or null.
tickets[].contact.contact_idinteger Contact id.
tickets[].contact.namestring First name.
tickets[].contact.last_namestring Last name.
tickets[].contact.emailstring Email.
tickets[].contact.phonestring Phone.
tickets[].due_atstring Due date, or null.
tickets[].first_response_atstring When a person first replied, or null.
tickets[].resolved_atstring When it was resolved, or null.
tickets[].created_atstring Created.
tickets[].updated_atstring Last changed.
metaobject Pagination state.
meta.current_pageinteger Page just returned, starting at 1.
meta.last_pageinteger Last page available for this query.
meta.totalinteger Total rows matching the query.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "tickets:read" scope (error: insufficient_scope).
  • 422Validation failed.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id listTickets

curl "https://app.klctai.com/api/tickets?status=unresolved" \
  -H "Authorization: Bearer $KLCT_API_KEY"
{
  "tickets": [
    {
      "id": 1042,
      "ticket_number": "SUP-1042",
      "subject": "Cannot log in on mobile",
      "status": "open",
      "priority": 2,
      "source": "email",
      "contact": {
        "contact_id": 90412,
        "name": "Dana",
        "last_name": "Cole",
        "email": "[email protected]",
        "phone": "+15551234567"
      },
      "due_at": null,
      "first_response_at": null,
      "resolved_at": null,
      "created_at": "2026-10-14T09:12:00Z",
      "updated_at": "2026-10-14T09:12:00Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "last_page": 1,
    "total": 1
  }
}
GET /tickets/{id} tickets:read

Get a ticket with its conversation

Includes the customer-visible message thread. Internal notes and staff details beyond a display name are left out.

Path parameters

NameDescription
idinteger · requiredTicket id.

Response fields

FieldDescription
ticketobject
ticket.idinteger Ticket id.
ticket.ticket_numberstring Human reference such as SUP-1042.
ticket.subjectstring Subject line.
ticket.statusstring Current status.
ticket.priorityinteger 0 (lowest) to 4 (highest).
ticket.sourcestring How it arrived: email, chat, form, api and others.
ticket.contactobject The requester, or null.
ticket.contact.contact_idinteger Contact id.
ticket.contact.namestring First name.
ticket.contact.last_namestring Last name.
ticket.contact.emailstring Email.
ticket.contact.phonestring Phone.
ticket.due_atstring Due date, or null.
ticket.first_response_atstring When a person first replied, or null.
ticket.resolved_atstring When it was resolved, or null.
ticket.created_atstring Created.
ticket.updated_atstring Last changed.
ticket.descriptionstring The original request text.
ticket.reply_channelstringchat, email How a reply reaches the customer.
ticket.conversation_idinteger The chat conversation behind the ticket, or null.
ticket.messagesarray The customer-visible thread. Internal notes are never included.
ticket.messages[].idinteger Message id.
ticket.messages[].directionstringin, out in is from the customer, out is from your team.
ticket.messages[].sender_typestring Who wrote it.
ticket.messages[].sender_namestring Display name only.
ticket.messages[].bodystring Message text.
ticket.messages[].attachmentsarray Attachment details. Files themselves are not downloadable through the API.
ticket.messages[].attachments[].namestring File name.
ticket.messages[].attachments[].mimestring Content type.
ticket.messages[].attachments[].sizeinteger Bytes.
ticket.messages[].created_atstring Sent.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "tickets:read" scope (error: insufficient_scope).
  • 404No such record in this account.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id getTicket

curl "https://app.klctai.com/api/tickets/123" \
  -H "Authorization: Bearer $KLCT_API_KEY"
{
  "ticket": {
    "id": 1042,
    "ticket_number": "SUP-1042",
    "subject": "Cannot log in on mobile",
    "status": "open",
    "priority": 2,
    "source": "email",
    "contact": {
      "contact_id": 90412,
      "name": "Dana",
      "last_name": "Cole",
      "email": "[email protected]",
      "phone": "+15551234567"
    },
    "due_at": null,
    "first_response_at": null,
    "resolved_at": null,
    "created_at": "2026-10-14T09:12:00Z",
    "updated_at": "2026-10-14T09:12:00Z",
    "description": "The app says my password is wrong but the website accepts it.",
    "reply_channel": "email",
    "conversation_id": null,
    "messages": [
      {
        "id": 3301,
        "direction": "in",
        "sender_type": "contact",
        "sender_name": "Dana Cole",
        "body": "The app says my password is wrong but the website accepts it.",
        "attachments": [],
        "created_at": "2026-10-14T09:12:00Z"
      }
    ]
  }
}
POST /tickets tickets:write

Create a ticket

Creates an open ticket with source api. This records the ticket and fires the ticket.created webhook; it does not send an acknowledgement email to the requester.

Body (JSON)

FieldDescription
subjectstring · required Subject line, up to 255 characters.
descriptionstring What happened, up to 20000 characters.
priorityinteger 0 to 4. Defaults to 0.
contact_idinteger Requester. Must be a contact in this account.
due_atstring When it should be handled by.

Response fields

FieldDescription
ticketobject
ticket.idinteger Ticket id.
ticket.ticket_numberstring Human reference such as SUP-1042.
ticket.subjectstring Subject line.
ticket.statusstring Current status.
ticket.priorityinteger 0 (lowest) to 4 (highest).
ticket.sourcestring How it arrived: email, chat, form, api and others.
ticket.contactobject The requester, or null.
ticket.contact.contact_idinteger Contact id.
ticket.contact.namestring First name.
ticket.contact.last_namestring Last name.
ticket.contact.emailstring Email.
ticket.contact.phonestring Phone.
ticket.due_atstring Due date, or null.
ticket.first_response_atstring When a person first replied, or null.
ticket.resolved_atstring When it was resolved, or null.
ticket.created_atstring Created.
ticket.updated_atstring Last changed.
ticket.descriptionstring The original request text.
ticket.reply_channelstringchat, email How a reply reaches the customer.
ticket.conversation_idinteger The chat conversation behind the ticket, or null.
ticket.messagesarray The customer-visible thread. Internal notes are never included.
ticket.messages[].idinteger Message id.
ticket.messages[].directionstringin, out in is from the customer, out is from your team.
ticket.messages[].sender_typestring Who wrote it.
ticket.messages[].sender_namestring Display name only.
ticket.messages[].bodystring Message text.
ticket.messages[].attachmentsarray Attachment details. Files themselves are not downloadable through the API.
ticket.messages[].attachments[].namestring File name.
ticket.messages[].attachments[].mimestring Content type.
ticket.messages[].attachments[].sizeinteger Bytes.
ticket.messages[].created_atstring Sent.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "tickets:write" scope (error: insufficient_scope).
  • 422Validation failed.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id createTicket

curl -X POST "https://app.klctai.com/api/tickets" \
  -H "Authorization: Bearer $KLCT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"subject":"Cannot log in on mobile","description":"The app says my password is wrong.","priority":2,"contact_id":90412}'
{
  "ticket": {
    "id": 1042,
    "ticket_number": "SUP-1042",
    "subject": "Cannot log in on mobile",
    "status": "open",
    "priority": 2,
    "source": "email",
    "contact": {
      "contact_id": 90412,
      "name": "Dana",
      "last_name": "Cole",
      "email": "[email protected]",
      "phone": "+15551234567"
    },
    "due_at": null,
    "first_response_at": null,
    "resolved_at": null,
    "created_at": "2026-10-14T09:12:00Z",
    "updated_at": "2026-10-14T09:12:00Z",
    "description": "The app says my password is wrong but the website accepts it.",
    "reply_channel": "email",
    "conversation_id": null,
    "messages": [
      {
        "id": 3301,
        "direction": "in",
        "sender_type": "contact",
        "sender_name": "Dana Cole",
        "body": "The app says my password is wrong but the website accepts it.",
        "attachments": [],
        "created_at": "2026-10-14T09:12:00Z"
      }
    ]
  }
}
PATCH /tickets/{id} tickets:write

Update a ticket

Send only the fields to change. Moving to resolved or closed stamps resolved_at; moving a resolved ticket back to an open status counts as a reopen. Each change is written to the ticket history.

Path parameters

NameDescription
idinteger · requiredTicket id.

Body (JSON)

FieldDescription
subjectstring New subject.
descriptionstring New description.
priorityinteger 0 to 4.
statusstring A valid ticket status, for example open, pending, resolved, closed.
due_atstring New due date.

Response fields

FieldDescription
ticketobject
ticket.idinteger Ticket id.
ticket.ticket_numberstring Human reference such as SUP-1042.
ticket.subjectstring Subject line.
ticket.statusstring Current status.
ticket.priorityinteger 0 (lowest) to 4 (highest).
ticket.sourcestring How it arrived: email, chat, form, api and others.
ticket.contactobject The requester, or null.
ticket.contact.contact_idinteger Contact id.
ticket.contact.namestring First name.
ticket.contact.last_namestring Last name.
ticket.contact.emailstring Email.
ticket.contact.phonestring Phone.
ticket.due_atstring Due date, or null.
ticket.first_response_atstring When a person first replied, or null.
ticket.resolved_atstring When it was resolved, or null.
ticket.created_atstring Created.
ticket.updated_atstring Last changed.
ticket.descriptionstring The original request text.
ticket.reply_channelstringchat, email How a reply reaches the customer.
ticket.conversation_idinteger The chat conversation behind the ticket, or null.
ticket.messagesarray The customer-visible thread. Internal notes are never included.
ticket.messages[].idinteger Message id.
ticket.messages[].directionstringin, out in is from the customer, out is from your team.
ticket.messages[].sender_typestring Who wrote it.
ticket.messages[].sender_namestring Display name only.
ticket.messages[].bodystring Message text.
ticket.messages[].attachmentsarray Attachment details. Files themselves are not downloadable through the API.
ticket.messages[].attachments[].namestring File name.
ticket.messages[].attachments[].mimestring Content type.
ticket.messages[].attachments[].sizeinteger Bytes.
ticket.messages[].created_atstring Sent.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "tickets:write" scope (error: insufficient_scope).
  • 404No such record in this account.
  • 422Validation failed.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id updateTicket

curl -X PATCH "https://app.klctai.com/api/tickets/123" \
  -H "Authorization: Bearer $KLCT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"priority":1,"status":"resolved"}'
{
  "ticket": {
    "status": "resolved",
    "id": 1042,
    "ticket_number": "SUP-1042",
    "subject": "Cannot log in on mobile",
    "priority": 2,
    "source": "email",
    "contact": {
      "contact_id": 90412,
      "name": "Dana",
      "last_name": "Cole",
      "email": "[email protected]",
      "phone": "+15551234567"
    },
    "due_at": null,
    "first_response_at": null,
    "resolved_at": null,
    "created_at": "2026-10-14T09:12:00Z",
    "updated_at": "2026-10-14T09:12:00Z",
    "description": "The app says my password is wrong but the website accepts it.",
    "reply_channel": "email",
    "conversation_id": null,
    "messages": [
      {
        "id": 3301,
        "direction": "in",
        "sender_type": "contact",
        "sender_name": "Dana Cole",
        "body": "The app says my password is wrong but the website accepts it.",
        "attachments": [],
        "created_at": "2026-10-14T09:12:00Z"
      }
    ]
  }
}
POST /tickets/{id}/notes tickets:write

Add an internal note

A note for your team. It is recorded in the ticket history and is never shown to or sent to the customer.

Path parameters

NameDescription
idinteger · requiredTicket id.

Body (JSON)

FieldDescription
bodystring · required Note text, up to 10000 characters.

Response fields

FieldDescription
noteobject
note.idinteger Note id.
note.bodystring Note text.
note.created_atstring Created.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "tickets:write" scope (error: insufficient_scope).
  • 404No such record in this account.
  • 422Validation failed.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id addTicketNote

curl -X POST "https://app.klctai.com/api/tickets/123/notes" \
  -H "Authorization: Bearer $KLCT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"body":"Reproduced on iOS 19. Passing to engineering."}'
{
  "note": {
    "id": 5521,
    "body": "Reproduced on iOS 19. Passing to engineering.",
    "created_at": "2026-10-14T10:02:00Z"
  }
}
POST /tickets/{id}/replies tickets:write

Reply to the customer

Sends a real, customer-visible reply: by email, or into the chat if the ticket came from chat (which also takes the chat over from the AI). Records the first response time. Answers 422 if the requester has no email address or the send fails, and nothing is stored in that case.

Path parameters

NameDescription
idinteger · requiredTicket id.

Body (JSON)

FieldDescription
bodystring · required Reply text, up to 16000 characters.

Response fields

FieldDescription
messageobject
message.idinteger Message id.
message.channelstringchat, email How it was sent.
message.directionstring Always out.
message.bodystring Text sent.
message.created_atstring Sent.

Errors

  • 401Missing, invalid or expired token.
  • 403Insufficient scope, or the Support module is switched off for the account.
  • 404No such record in this account.
  • 422Validation failed, or the reply could not be delivered (for example the requester has no email).
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id replyToTicket

curl -X POST "https://app.klctai.com/api/tickets/123/replies" \
  -H "Authorization: Bearer $KLCT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"body":"Thanks Dana, we found the cause and a fix is rolling out today."}'
{
  "message": {
    "id": 3302,
    "channel": "email",
    "direction": "out",
    "body": "Thanks Dana, we found the cause and a fix is rolling out today.",
    "created_at": "2026-10-14T10:05:00Z"
  }
}
API reference

Chat conversations

Live chat and messaging threads (web chat, WhatsApp, Instagram, email). Needs the Support module on the account.

5 endpoints identityconversations:readconversations:write
View as Markdown
Endpoints
Base URLhttps://app.klctai.com/apiAuthAuthorization: Bearer $KLCT_API_KEY
Needs identity or conversations:read or conversations:writeGet a key
GET /platform/support-widgets identity

List the chat widgets

Returns the account's live chat widgets, active ones first, so you can put one on your site without copying the embed snippet out of KLCT. Load a widget with <script src="{embed_url}" async></script>. An inactive widget's embed_url answers 404 until it is turned on in KLCT. Everything here is already public in the snippet itself. Returns 403 when the account has Support switched off.

Response fields

FieldDescription
widgetsarray The widgets.
widgets[].idinteger Widget id.
widgets[].namestring Widget name.
widgets[].slugstring Public identifier, part of the embed URL.
widgets[].is_activeboolean False while the widget is switched off in KLCT.
widgets[].embed_urlstring The embed.js URL to load on your site.
widgets[].allowed_originsarray Sites allowed to load it. Empty means any site.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "identity" scope (error: insufficient_scope).
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id listSupportWidgets

curl "https://app.klctai.com/api/platform/support-widgets" \
  -H "Authorization: Bearer $KLCT_API_KEY"
{
  "widgets": [
    {
      "id": 12,
      "name": "Website chat",
      "slug": "acme-dental",
      "is_active": true,
      "embed_url": "https://app.klctai.com/support/acme-dental/embed.js",
      "allowed_origins": [
        "https://acme.example"
      ]
    }
  ]
}
GET /conversations conversations:read

List chat conversations

Most recently active first.

Query parameters

NameDescription
pageinteger Page number, starting at 1. Default 1
per_pageinteger Rows per page, 1 to 100. Default 50
statusstring One exact status, or `unresolved` for everything not resolved or closed.
contact_idinteger Only conversations with this contact.
updated_sincestring Only conversations changed at or after this time.

Response fields

FieldDescription
conversationsarray The page of conversations.
conversations[].idinteger Conversation id.
conversations[].statusstring open, pending, resolved, closed and others.
conversations[].handling_modestringai, human Who is answering: the AI assistant or a person.
conversations[].channelstring web, email, whatsapp, instagram and others.
conversations[].subjectstring Short title, if any.
conversations[].prioritystring Priority label.
conversations[].contactobject The person chatting, or null if anonymous.
conversations[].contact.contact_idinteger Contact id.
conversations[].contact.namestring First name.
conversations[].contact.last_namestring Last name.
conversations[].contact.emailstring Email.
conversations[].contact.phonestring Phone.
conversations[].ticket_idinteger Linked ticket, or null.
conversations[].last_message_atstring Most recent customer-visible message.
conversations[].resolved_atstring When it was resolved, or null.
conversations[].csat_ratinginteger The customer satisfaction rating, or null.
conversations[].created_atstring Started.
conversations[].updated_atstring Last changed.
metaobject Pagination state.
meta.current_pageinteger Page just returned, starting at 1.
meta.last_pageinteger Last page available for this query.
meta.totalinteger Total rows matching the query.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "conversations:read" scope (error: insufficient_scope).
  • 422Validation failed.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id listConversations

curl "https://app.klctai.com/api/conversations?status=unresolved" \
  -H "Authorization: Bearer $KLCT_API_KEY"
{
  "conversations": [
    {
      "id": 7781,
      "status": "open",
      "handling_mode": "ai",
      "channel": "web",
      "subject": null,
      "priority": "normal",
      "contact": {
        "contact_id": 90412,
        "name": "Dana",
        "last_name": "Cole",
        "email": "[email protected]",
        "phone": null
      },
      "ticket_id": null,
      "last_message_at": "2026-10-14T09:20:00Z",
      "resolved_at": null,
      "csat_rating": null,
      "created_at": "2026-10-14T09:18:00Z",
      "updated_at": "2026-10-14T09:20:00Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "last_page": 1,
    "total": 1
  }
}
GET /conversations/{id} conversations:read

Get a conversation with its messages

Reading a conversation does not mark it read for your team.

Path parameters

NameDescription
idinteger · requiredConversation id.

Response fields

FieldDescription
conversationobject
conversation.idinteger Conversation id.
conversation.statusstring open, pending, resolved, closed and others.
conversation.handling_modestringai, human Who is answering: the AI assistant or a person.
conversation.channelstring web, email, whatsapp, instagram and others.
conversation.subjectstring Short title, if any.
conversation.prioritystring Priority label.
conversation.contactobject The person chatting, or null if anonymous.
conversation.contact.contact_idinteger Contact id.
conversation.contact.namestring First name.
conversation.contact.last_namestring Last name.
conversation.contact.emailstring Email.
conversation.contact.phonestring Phone.
conversation.ticket_idinteger Linked ticket, or null.
conversation.last_message_atstring Most recent customer-visible message.
conversation.resolved_atstring When it was resolved, or null.
conversation.csat_ratinginteger The customer satisfaction rating, or null.
conversation.created_atstring Started.
conversation.updated_atstring Last changed.
conversation.messagesarray Customer-visible messages, oldest first. Internal notes are never included.
conversation.messages[].idinteger Message id.
conversation.messages[].sender_typestringvisitor, operator, ai Who wrote it.
conversation.messages[].sender_namestring Display name only.
conversation.messages[].bodystring Message text.
conversation.messages[].attachmentsarray Attachment details only.
conversation.messages[].attachments[].namestring File name.
conversation.messages[].attachments[].mimestring Content type.
conversation.messages[].attachments[].sizeinteger Bytes.
conversation.messages[].created_atstring Sent.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "conversations:read" scope (error: insufficient_scope).
  • 404No such record in this account.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id getConversation

curl "https://app.klctai.com/api/conversations/123" \
  -H "Authorization: Bearer $KLCT_API_KEY"
{
  "conversation": {
    "id": 7781,
    "status": "open",
    "handling_mode": "ai",
    "channel": "web",
    "subject": null,
    "priority": "normal",
    "contact": {
      "contact_id": 90412,
      "name": "Dana",
      "last_name": "Cole",
      "email": "[email protected]",
      "phone": null
    },
    "ticket_id": null,
    "last_message_at": "2026-10-14T09:20:00Z",
    "resolved_at": null,
    "csat_rating": null,
    "created_at": "2026-10-14T09:18:00Z",
    "updated_at": "2026-10-14T09:20:00Z",
    "messages": [
      {
        "id": 1,
        "sender_type": "visitor",
        "sender_name": "Dana Cole",
        "body": "Do you open on Sundays?",
        "attachments": [],
        "created_at": "2026-10-14T09:18:00Z"
      },
      {
        "id": 2,
        "sender_type": "ai",
        "sender_name": "Assistant",
        "body": "Yes, 10am to 4pm.",
        "attachments": [],
        "created_at": "2026-10-14T09:18:05Z"
      }
    ]
  }
}
POST /conversations/{id}/messages conversations:write

Send a reply in a conversation

Sends a real message to the customer on the conversation's channel, and takes the conversation over from the AI (handling_mode becomes human).

Path parameters

NameDescription
idinteger · requiredConversation id.

Body (JSON)

FieldDescription
bodystring · required Message text, up to 16000 characters.

Response fields

FieldDescription
messageobject
message.idinteger Message id.
message.sender_typestring Always operator.
message.bodystring Text sent.
message.created_atstring Sent.
handling_modestring Now human.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "conversations:write" scope (error: insufficient_scope).
  • 404No such record in this account.
  • 422Validation failed.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id replyToConversation

curl -X POST "https://app.klctai.com/api/conversations/123/messages" \
  -H "Authorization: Bearer $KLCT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"body":"Yes, we are open 10am to 4pm on Sundays."}'
{
  "message": {
    "id": 3,
    "sender_type": "operator",
    "body": "Yes, we are open 10am to 4pm on Sundays.",
    "created_at": "2026-10-14T09:25:00Z"
  },
  "handling_mode": "human"
}
POST /conversations/{id}/resolve conversations:write

Resolve a conversation

Marks the conversation resolved. The customer may be asked for a rating, depending on the widget settings.

Path parameters

NameDescription
idinteger · requiredConversation id.

Response fields

FieldDescription
conversationobject
conversation.idinteger Conversation id.
conversation.statusstring open, pending, resolved, closed and others.
conversation.handling_modestringai, human Who is answering: the AI assistant or a person.
conversation.channelstring web, email, whatsapp, instagram and others.
conversation.subjectstring Short title, if any.
conversation.prioritystring Priority label.
conversation.contactobject The person chatting, or null if anonymous.
conversation.contact.contact_idinteger Contact id.
conversation.contact.namestring First name.
conversation.contact.last_namestring Last name.
conversation.contact.emailstring Email.
conversation.contact.phonestring Phone.
conversation.ticket_idinteger Linked ticket, or null.
conversation.last_message_atstring Most recent customer-visible message.
conversation.resolved_atstring When it was resolved, or null.
conversation.csat_ratinginteger The customer satisfaction rating, or null.
conversation.created_atstring Started.
conversation.updated_atstring Last changed.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "conversations:write" scope (error: insufficient_scope).
  • 404No such record in this account.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id resolveConversation

curl -X POST "https://app.klctai.com/api/conversations/123/resolve" \
  -H "Authorization: Bearer $KLCT_API_KEY"
{
  "conversation": {
    "status": "resolved",
    "id": 7781,
    "handling_mode": "ai",
    "channel": "web",
    "subject": null,
    "priority": "normal",
    "contact": {
      "contact_id": 90412,
      "name": "Dana",
      "last_name": "Cole",
      "email": "[email protected]",
      "phone": null
    },
    "ticket_id": null,
    "last_message_at": "2026-10-14T09:20:00Z",
    "resolved_at": null,
    "csat_rating": null,
    "created_at": "2026-10-14T09:18:00Z",
    "updated_at": "2026-10-14T09:20:00Z"
  }
}
API reference

Changelog

The release notes on your customer portal. Use this to publish from a release pipeline. Publishing through the API never emails subscribers; entries are never deleted. Needs the Changelog module on the account.

4 endpoints changelog:readchangelog:write
View as Markdown
Endpoints
Base URLhttps://app.klctai.com/apiAuthAuthorization: Bearer $KLCT_API_KEY
Needs changelog:read or changelog:writeGet a key
GET /changelog changelog:read

List changelog entries

Query parameters

NameDescription
pageinteger Page number, starting at 1. Default 1
per_pageinteger Rows per page, 1 to 100. Default 50
statusstringdraft, published Only drafts or only published entries.

Response fields

FieldDescription
entriesarray The page of entries.
entries[].idinteger Entry id.
entries[].titlestring Title.
entries[].slugstring URL slug, unique in the portal.
entries[].versionstring Version label such as v2.4.0, or null.
entries[].categoryobject Category, or null.
entries[].category.idinteger Category id.
entries[].category.namestring Category name.
entries[].labelsarray Free-form labels such as New or Fix.
entries[].statusstringdraft, published draft is private, published is public once its date arrives.
entries[].is_liveboolean True when published and its date has passed, so visitors can see it.
entries[].published_atstring Publish time, or null for a draft.
entries[].created_atstring Created.
entries[].updated_atstring Last changed.
metaobject Pagination state.
meta.current_pageinteger Page just returned, starting at 1.
meta.last_pageinteger Last page available for this query.
meta.totalinteger Total rows matching the query.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "changelog:read" scope (error: insufficient_scope).
  • 422Validation failed.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id listChangelog

curl "https://app.klctai.com/api/changelog" \
  -H "Authorization: Bearer $KLCT_API_KEY"
{
  "entries": [
    {
      "id": 214,
      "title": "Faster ticket search",
      "slug": "faster-ticket-search",
      "version": "v2.4.0",
      "category": {
        "id": 3,
        "name": "Improvements"
      },
      "labels": [
        "New"
      ],
      "status": "published",
      "is_live": true,
      "published_at": "2026-10-14T12:00:00Z",
      "created_at": "2026-10-14T11:40:00Z",
      "updated_at": "2026-10-14T11:40:00Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "last_page": 1,
    "total": 1
  }
}
GET /changelog/{id} changelog:read

Get a changelog entry

Path parameters

NameDescription
idinteger · requiredEntry id.

Response fields

FieldDescription
entryobject
entry.idinteger Entry id.
entry.titlestring Title.
entry.slugstring URL slug, unique in the portal.
entry.versionstring Version label such as v2.4.0, or null.
entry.categoryobject Category, or null.
entry.category.idinteger Category id.
entry.category.namestring Category name.
entry.labelsarray Free-form labels such as New or Fix.
entry.statusstringdraft, published draft is private, published is public once its date arrives.
entry.is_liveboolean True when published and its date has passed, so visitors can see it.
entry.published_atstring Publish time, or null for a draft.
entry.created_atstring Created.
entry.updated_atstring Last changed.
entry.content_htmlstring The body as sanitized HTML.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "changelog:read" scope (error: insufficient_scope).
  • 404No such record in this account.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id getChangelogEntry

curl "https://app.klctai.com/api/changelog/123" \
  -H "Authorization: Bearer $KLCT_API_KEY"
{
  "entry": {
    "id": 214,
    "title": "Faster ticket search",
    "slug": "faster-ticket-search",
    "version": "v2.4.0",
    "category": {
      "id": 3,
      "name": "Improvements"
    },
    "labels": [
      "New"
    ],
    "status": "published",
    "is_live": true,
    "published_at": "2026-10-14T12:00:00Z",
    "created_at": "2026-10-14T11:40:00Z",
    "updated_at": "2026-10-14T11:40:00Z",
    "content_html": "<p>Searching tickets is now twice as fast.</p>"
  }
}
POST /changelog changelog:write

Create a changelog entry

Saved as a draft unless you send status: published. The slug is generated from the title. Publishing fires the changelog.published webhook. Subscribers are not emailed.

Body (JSON)

FieldDescription
titlestring · required Title, 3 to 255 characters.
contentstring · required Body up to 60000 characters. Plain text, Markdown or HTML; HTML is sanitized.
versionstring Version label, up to 50 characters.
category_idinteger One of this portal's categories.
labelsarray Up to 10 labels, 40 characters each.
statusstringdraft, published Defaults to draft on create.
published_atstring When it goes live. Defaults to now when publishing.

Response fields

FieldDescription
entryobject
entry.idinteger Entry id.
entry.titlestring Title.
entry.slugstring URL slug, unique in the portal.
entry.versionstring Version label such as v2.4.0, or null.
entry.categoryobject Category, or null.
entry.category.idinteger Category id.
entry.category.namestring Category name.
entry.labelsarray Free-form labels such as New or Fix.
entry.statusstringdraft, published draft is private, published is public once its date arrives.
entry.is_liveboolean True when published and its date has passed, so visitors can see it.
entry.published_atstring Publish time, or null for a draft.
entry.created_atstring Created.
entry.updated_atstring Last changed.
entry.content_htmlstring The body as sanitized HTML.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "changelog:write" scope (error: insufficient_scope).
  • 422Validation failed.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id createChangelogEntry

curl -X POST "https://app.klctai.com/api/changelog" \
  -H "Authorization: Bearer $KLCT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"Faster ticket search","content":"Searching tickets is now **twice as fast**.","version":"v2.4.0","category_id":1,"labels":["New"],"status":"draft"}'
{
  "entry": {
    "id": 214,
    "title": "Faster ticket search",
    "slug": "faster-ticket-search",
    "version": "v2.4.0",
    "category": {
      "id": 3,
      "name": "Improvements"
    },
    "labels": [
      "New"
    ],
    "status": "published",
    "is_live": true,
    "published_at": "2026-10-14T12:00:00Z",
    "created_at": "2026-10-14T11:40:00Z",
    "updated_at": "2026-10-14T11:40:00Z",
    "content_html": "<p>Searching tickets is now twice as fast.</p>"
  }
}
PATCH /changelog/{id} changelog:write

Update a changelog entry

Send only the fields to change; an empty body is rejected. Published entries can be edited. Moving a draft to published fires changelog.published once.

Path parameters

NameDescription
idinteger · requiredEntry id.

Body (JSON)

FieldDescription
titlestring Title, 3 to 255 characters.
contentstring Body up to 60000 characters. Plain text, Markdown or HTML; HTML is sanitized.
versionstring Version label, up to 50 characters.
category_idinteger One of this portal's categories.
labelsarray Up to 10 labels, 40 characters each.
statusstringdraft, published Defaults to draft on create.
published_atstring When it goes live. Defaults to now when publishing.

Response fields

FieldDescription
entryobject
entry.idinteger Entry id.
entry.titlestring Title.
entry.slugstring URL slug, unique in the portal.
entry.versionstring Version label such as v2.4.0, or null.
entry.categoryobject Category, or null.
entry.category.idinteger Category id.
entry.category.namestring Category name.
entry.labelsarray Free-form labels such as New or Fix.
entry.statusstringdraft, published draft is private, published is public once its date arrives.
entry.is_liveboolean True when published and its date has passed, so visitors can see it.
entry.published_atstring Publish time, or null for a draft.
entry.created_atstring Created.
entry.updated_atstring Last changed.
entry.content_htmlstring The body as sanitized HTML.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "changelog:write" scope (error: insufficient_scope).
  • 404No such record in this account.
  • 422Validation failed.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id updateChangelogEntry

curl -X PATCH "https://app.klctai.com/api/changelog/123" \
  -H "Authorization: Bearer $KLCT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"Faster ticket search","content":"Searching tickets is now **twice as fast**.","version":"v2.4.0","category_id":1,"labels":["New"],"status":"draft"}'
{
  "entry": {
    "id": 214,
    "title": "Faster ticket search",
    "slug": "faster-ticket-search",
    "version": "v2.4.0",
    "category": {
      "id": 3,
      "name": "Improvements"
    },
    "labels": [
      "New"
    ],
    "status": "published",
    "is_live": true,
    "published_at": "2026-10-14T12:00:00Z",
    "created_at": "2026-10-14T11:40:00Z",
    "updated_at": "2026-10-14T11:40:00Z",
    "content_html": "<p>Searching tickets is now twice as fast.</p>"
  }
}
API reference

Feedback and roadmap

The feature requests and roadmap from your customer portal. Read-only. Author names and emails are never returned. Needs the Feedback board and Roadmap modules on the account.

2 endpoints feedback:read
View as Markdown
Endpoints
Base URLhttps://app.klctai.com/apiAuthAuthorization: Bearer $KLCT_API_KEY
Needs feedback:readGet a key
GET /feedback feedback:read

List feedback posts

Most voted first.

Query parameters

NameDescription
pageinteger Page number, starting at 1. Default 1
per_pageinteger Rows per page, 1 to 100. Default 50
statusstring Board status slug.
category_idinteger Only posts in this category.
qstring Matches the title or text.

Response fields

FieldDescription
postsarray The page of posts.
posts[].idinteger Post id.
posts[].titlestring Title.
posts[].contentstring What the customer wrote.
posts[].statusstring Board status slug.
posts[].categoryobject Category, or null.
posts[].category.idinteger Category id.
posts[].category.namestring Name.
posts[].vote_countinteger Votes.
posts[].comments_countinteger Comments.
posts[].on_roadmapboolean Whether the post sits on a roadmap column.
posts[].created_atstring Posted.
posts[].updated_atstring Last changed.
metaobject Pagination state.
meta.current_pageinteger Page just returned, starting at 1.
meta.last_pageinteger Last page available for this query.
meta.totalinteger Total rows matching the query.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "feedback:read" scope (error: insufficient_scope).
  • 422Validation failed.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id listFeedback

curl "https://app.klctai.com/api/feedback?status=planned" \
  -H "Authorization: Bearer $KLCT_API_KEY"
{
  "posts": [
    {
      "id": 88,
      "title": "Dark mode",
      "content": "Please add a dark theme to the dashboard.",
      "status": "planned",
      "category": {
        "id": 2,
        "name": "Feature request"
      },
      "vote_count": 41,
      "comments_count": 6,
      "on_roadmap": true,
      "created_at": "2026-09-02T08:30:00Z",
      "updated_at": "2026-10-01T10:00:00Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "last_page": 1,
    "total": 1
  }
}
GET /roadmap feedback:read

Get the roadmap

The roadmap columns in display order, each with its posts. Not paginated.

Response fields

FieldDescription
statusesarray Roadmap columns.
statuses[].slugstring Column slug.
statuses[].namestring Column name.
statuses[].colorstring Column color.
statuses[].postsarray Posts in this column.
statuses[].posts[].idinteger Post id.
statuses[].posts[].titlestring Title.
statuses[].posts[].contentstring What the customer wrote.
statuses[].posts[].statusstring Board status slug.
statuses[].posts[].categoryobject Category, or null.
statuses[].posts[].category.idinteger Category id.
statuses[].posts[].category.namestring Name.
statuses[].posts[].vote_countinteger Votes.
statuses[].posts[].comments_countinteger Comments.
statuses[].posts[].on_roadmapboolean Whether the post sits on a roadmap column.
statuses[].posts[].created_atstring Posted.
statuses[].posts[].updated_atstring Last changed.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "feedback:read" scope (error: insufficient_scope).
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id getRoadmap

curl "https://app.klctai.com/api/roadmap" \
  -H "Authorization: Bearer $KLCT_API_KEY"
{
  "statuses": [
    {
      "slug": "planned",
      "name": "Planned",
      "color": "#6366f1",
      "posts": [
        {
          "id": 88,
          "title": "Dark mode",
          "content": "Please add a dark theme to the dashboard.",
          "status": "planned",
          "category": {
            "id": 2,
            "name": "Feature request"
          },
          "vote_count": 41,
          "comments_count": 6,
          "on_roadmap": true,
          "created_at": "2026-09-02T08:30:00Z",
          "updated_at": "2026-10-01T10:00:00Z"
        }
      ]
    }
  ]
}
API reference

Events and webhooks

Send events into KLCT to start sequences, and subscribe to events KLCT sends back. See the Webhooks guide for payloads and the signature check.

4 endpoints sequences:triggerwebhooks:manage
View as Markdown
Endpoints
Base URLhttps://app.klctai.com/apiAuthAuthorization: Bearer $KLCT_API_KEY
Needs sequences:trigger or webhooks:manageGet a key
POST /integrations/sprwt/events sequences:trigger

Forward a product event to start a sequence

Forwards something that happened in your product (order placed, cart abandoned, subscription renewed) so a matching KLCT sequence can enroll the contact. Contacts created this way are quarantined "shadow" contacts unless the account has opted in to exporting real contacts. If attribution carries ad parameters and trigger is order_create, user_create or user_subscriptions_create, a conversion is recorded for ad optimisation.

Body (JSON)

FieldDescription
triggerstring · required Event key a sequence trigger listens for.
external_refstring Your own id for the event, for traceability.
contactobject · required Who the event is about.
contact.namestring · required First name.
contact.last_namestring Last name.
contact.emailstring Email. Either email or phone is required.
contact.phonestring Phone.
metadataobject Extra data stored on the contact.
attributionobject utm_source, utm_medium, utm_campaign, utm_content, utm_term, fbclid, gclid, klct_ad.
kpiobject Revenue for purchase events.
kpi.value_minorinteger Order value in minor units (cents).
kpi.currencystring ISO currency code.

Response fields

FieldDescription
statusstring "ok".
enrolledinteger How many sequences the contact was enrolled in.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "sequences:trigger" scope (error: insufficient_scope).
  • 422Validation failed.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id sendEvent

curl -X POST "https://app.klctai.com/api/integrations/sprwt/events" \
  -H "Authorization: Bearer $KLCT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"trigger":"order_create","external_ref":"order_8841","contact":{"name":"Dana","email":"[email protected]"},"kpi":{"value_minor":4900,"currency":"USD"}}'
{
  "status": "ok",
  "enrolled": 1
}
GET /oauth-platform/webhooks webhooks:manage

List your webhook subscriptions

Only subscriptions created by the calling connection are visible. Requires an OAuth connection, not a manual API key.

Response fields

FieldDescription
webhooksarray Subscriptions.
webhooks[].idinteger Subscription id.
webhooks[].event_typestring Event name.
webhooks[].target_urlstring Your HTTPS endpoint.
webhooks[].is_activeboolean Whether deliveries are on.
webhooks[].created_atstring Created.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "webhooks:manage" scope (error: insufficient_scope).
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id listWebhooks

curl "https://app.klctai.com/api/oauth-platform/webhooks" \
  -H "Authorization: Bearer $KLCT_API_KEY"
{
  "webhooks": [
    {
      "id": 7,
      "event_type": "contact.created",
      "target_url": "https://acme.example/hooks/klct",
      "is_active": true,
      "created_at": "2026-10-01T12:00:00Z"
    }
  ]
}
POST /oauth-platform/webhooks webhooks:manage

Subscribe to an event

The signing_secret is returned once. Store it; you need it to verify the X-KLCT-Signature header. Requires an OAuth connection, not a manual API key.

Body (JSON)

FieldDescription
event_typestring · required One of the supported events (see the Webhooks guide).
target_urlstring · required HTTPS URL KLCT will POST to.

Response fields

FieldDescription
idinteger Subscription id.
event_typestring Event name.
target_urlstring Your URL.
signing_secretstring HMAC secret. Shown once.

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "webhooks:manage" scope (error: insufficient_scope).
  • 422Validation failed.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id createWebhook

curl -X POST "https://app.klctai.com/api/oauth-platform/webhooks" \
  -H "Authorization: Bearer $KLCT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"event_type":"contact.created","target_url":"https://acme.example/hooks/klct"}'
{
  "id": 7,
  "event_type": "contact.created",
  "target_url": "https://acme.example/hooks/klct",
  "signing_secret": "3f8c0b6d1e..."
}
DELETE /oauth-platform/webhooks/{webhook} webhooks:manage

Remove a webhook subscription

Path parameters

NameDescription
webhookinteger · requiredSubscription id.

Response fields

FieldDescription
statusstring "ok".

Errors

  • 401Missing, invalid or expired token.
  • 403The token does not carry the "webhooks:manage" scope (error: insufficient_scope).
  • 404No such record in this account.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id deleteWebhook

curl -X DELETE "https://app.klctai.com/api/oauth-platform/webhooks/123" \
  -H "Authorization: Bearer $KLCT_API_KEY"
{
  "status": "ok"
}
API reference

Meetings

Bookable meeting types, for embedding a booking link in another product.

1 endpoint
View as Markdown
Endpoints
Base URLhttps://app.klctai.com/apiAuthAuthorization: Bearer $KLCT_API_KEY
Uses the first-party tokenGet a key
GET /{account}/meetings first-party token

List an account's bookable meetings

First-party only. Uses the shared machine-to-machine token (APP_API_TOKEN) instead of an account key, and is keyed by account id because slugs can be renamed. Account API keys and OAuth tokens are not accepted here.

Path parameters

NameDescription
accountinteger · requiredKLCT account id.

Response fields

FieldDescription
okboolean True.
accountobject
account.idinteger Account id.
account.namestring Account name.
meetingsarray
meetings[].idinteger Meeting type id.
meetings[].namestring Name.
meetings[].slugstring URL slug.
meetings[].descriptionstring Description.
meetings[].duration_minutesinteger Length.
meetings[].location_typestring Where it happens (video, phone, in person).
meetings[].urlstring Public booking URL.

Errors

  • 401Missing, invalid or expired token.
  • 404No such record in this account.
  • 429Rate limit reached. Retry after the Retry-After header.

Operation id listMeetings

curl "https://app.klctai.com/api/123/meetings" \
  -H "Authorization: Bearer $KLCT_APP_API_TOKEN"
{
  "ok": true,
  "account": {
    "id": 4821,
    "name": "Acme Dental"
  },
  "meetings": [
    {
      "id": 31,
      "name": "Intro call",
      "slug": "intro-call",
      "description": "15 minutes to talk through your goals.",
      "duration_minutes": 15,
      "location_type": "video",
      "url": "https://app.klctai.com/book/acme/intro-call"
    }
  ]
}