API Reference
Authentication
💬Get free consultation

Authentication

ⓘ

Who can use this feature?

  • Creating and managing API keys requires an admin account and the Pro or Plus plan.
  • The storefront SDK needs no credentials and works on any plan.

Your two credentials

For API-key authentication, create credentials in Settings → General → Manage keys. OAuth connections use a separate sign-in flow; they do not use your secret key.

CredentialLooks likeWhat it is
App IDa short identifierIdentifies your store. Some tools call it a Client ID. It is not secret.
Secret keysk_ followed by 32 hex charactersGrants access to your store's data. Treat it like a password.

The Overview page shows how to create a key step by step. This page explains how the credentials behave once you have them.


Which header each API expects

APISend
Public APIX-Api-Key: sk_...
Chat Conversations APIX-Api-Key: sk_...
Webhooks managementX-Api-Key: sk_...
MCP serverX-App-Id: <App ID> and Authorization: Bearer sk_...
GraphQL Customer APIx-api-id: <App ID> and x-api-secret: sk_...

It is the same secret key everywhere. Only the header differs: the Public API, Chat Conversations API and webhook management read it from X-Api-Key, while the MCP server reads it from Authorization: Bearer and needs your App ID alongside it. Sending a key in the wrong header returns 401, except on the GraphQL Customer API, which returns HTTP 200 with an errors array and extensions.code set to UNAUTHENTICATED.

Send credentials as headers only. Never put a secret key in a query string, a redirect URL, or storefront JavaScript. Anything running in a customer's browser is readable by that customer.


What a key can and cannot do

A key is bound to the store that created it. It reads and writes that store's data and nothing else. You never pass a store ID with your requests; Chatty resolves the store from the key itself.

When you create a key, tick only the permissions your integration needs. Scoped keys are checked on every request. Write access includes read access for the same resource; settings:write also grants every settings.*:write permission. A domain write such as settings.shop:write grants settings:read, but not another domain's write access.

Key typePublic APIChat Conversations API (/chat)API-key MCP
Explicit scopesRequired scope, or an implied permissionRequired scope, or an implied permissionEach tool checks its scope
Legacy key without a scopes fieldRefused with 403 FORBIDDENLegacy access retainedLegacy core tools retained; merchant tools and the four admin tools are unavailable
New key with an empty scopes arrayRefused with 403 FORBIDDENRefused with 403 FORBIDDENNo scoped core, merchant, or admin tools

The four admin tools are get_setup_status, get_settings, update_settings, and create_knowledge_entry. Legacy and empty-scoped keys can still reach the API-key MCP server's built-in storefront tools when enabled by shop settings; this is not permission to use its admin tools. See the tool catalog for each tool's availability. An explicitly empty-scoped key can also call chatty_whoami for identity. Clearing all permissions on an existing key revokes it.

Manage keys and its internal key-management requests are admin-only. The Team and Access API also exposes /api-keys to scoped API keys with api_keys:write, subject to the current-admin and delegation rules below.

  1. Go to Settings → General → Manage keys.
  2. Enter a name in Key name. Example: Zapier stock sync.
  3. Tick the permissions this key needs.
  4. Click Generate key.

Expected result: Scoped API operations are limited to the permissions you ticked. MCP storefront tools follow their separate shop feature settings, as described above.

Manage keys with permissions ticked

!

The Chat Conversations API includes endpoints that send messages, change conversation state, and reassign conversations. A leaked key can post to your customers as your store.

Keys do not expire. A key stays valid until you delete it.


API-key scopes

The key editor has 39 scopes. A scope being listed does not make every operation available on every API surface; use the endpoint or tool reference for the supported operations.

ScopeAccess
settings:readRead public settings and field metadata.
settings:writeManage all public settings domains.
settings.widget:writeManage widget settings and AI toggles.
settings.shop:writeManage shop settings, shop preferences and similar matching.
settings.integrations:writeConnect supported integrations, change channel preferences, and disconnect channels and integrations. Sensitive.
settings.notifications:writeManage notification settings.
settings.satisfaction:writeManage satisfaction survey settings.
settings.product-quiz:writeManage product quiz availability, collections, question counts, recommendations and intent triggers on eligible plans.
settings.faq-page:writeManage FAQ page content, appearance, URL and SEO settings, including translation and publishing.
settings.translations:writeEdit and reset translated content within the plan limits.
settings.languages:writeManage language settings.
knowledge:readRead knowledge, FAQs, scenarios, recommendations, training and sync status.
knowledge:writeManage knowledge, FAQs (including import and delete-all), scenarios, recommendations, training and sync jobs.
setup:readRead setup status.
analytics:readRead analytics reports, chat-to-sale, subscription and usage.
conversations:readRead and export conversations, transcripts, messages, summaries, intent labels and members.
conversations:writeSend messages and attachments, start email conversations, manage state, assignments, webhooks (including delivery logs, redelivery and tests) and AI questions.
conversations:deleteDelete conversations; also required with customers:write when deleting a customer and their conversations.
customers:readRead customers and their history.
customers:writeCreate/update customers, manage tags and customer memory. Customer deletion additionally needs conversations:delete.
customers:exportEmail customer data exports to the store's email address. Sensitive; not granted by customers:write.
members:readRead individual member profiles and notification preferences. Member lists still use conversations:read.
members:writeInvite and manage staff, change notification preferences, and list or disconnect AI clients.
api_keys:writeList metadata for all active shop keys; create, update, or revoke keys within the caller’s effective access. This scope can only be granted in the dashboard.
campaigns:readRead campaigns and delivery status.
campaigns:writeCreate, update, publish and reorder campaigns, and create missing default campaigns.
helpdesk.tickets:readRead tickets, history and internal notes.
helpdesk.tickets:writeChange ticket status.
helpdesk.messages:writeSend a public reply to a customer.
helpdesk.contacts:readRead contacts and ticket history.
helpdesk.contacts:writeUpdate contact details and notes.
helpdesk.analytics:readRead ticket reporting metrics.
helpdesk.helpcenter:readRead Help center settings, overview and search analytics, and search published articles through MCP.
helpdesk.helpcenter:writeOn the Public API and MCP, change Help center settings, the store page, store colors and brand assets directly. On the Helpdesk agent API, propose article and category changes that a person approves or undoes.
helpdesk.skills:readRead custom agent skills.
helpdesk.settings:readRead tags, ticket fields, macros, SLAs and automations.
helpdesk.subscriptions:readRead Helpdesk ticket-event subscriptions. No Chatty API route or MCP tool uses it yet.
helpdesk.subscriptions:writeCreate and delete Helpdesk ticket-event subscriptions. No Chatty API route or MCP tool uses it yet.
helpdesk.orders:writePropose order changes or refunds for human approval; cannot approve or execute its own proposal.

conversations:delete and customers:export are separate from write access. customers:write does not grant customers:export. Likewise, conversations:write does not grant conversations:delete, and delete alone does not grant read/write. Deleting a customer needs both customers:write and conversations:delete because associated conversations are also removed.

Helpdesk permissions apply to shops using Helpdesk. Any helpdesk.*:write scope also grants all Helpdesk read permissions, not only reads for its own resource. helpdesk.helpcenter:write is API-key only; OAuth can only read the Help center. helpdesk.skills:read and the two helpdesk.subscriptions scopes are in the catalog for the Helpdesk agent API; Chatty has no route or tool for them yet.

Admin ownership and delegated keys

Member writes, every /api-keys operation, and both /ai-clients operations re-read the API key creator's current member record. The creator must belong to the same shop, have role: "admin", and have active: true. A missing creator, removed member, different shop, inactive account, or lost admin role returns 403 KEY_OWNER_NOT_ADMIN, even if the key has the required scope. Individual member and notification reads need their scopes but do not apply this extra admin-owner check.

To manage keys through the API, first grant api_keys:write in the dashboard. The key also needs each permission it will delegate. New or replacement scopes must be a subset of the calling key's effective permissions, including scope implications. api_keys:write itself cannot be delegated through the API; trying to include it returns 400 INVALID_PARAMS.

Before updating or revoking another key, its current scopes must also be within the caller's access. A broader target returns 403 FORBIDDEN. Legacy keys without scopes must be managed in the dashboard. The calling key cannot update or revoke itself (409 CANNOT_REVOKE_SELF). PATCH /api-keys/{id} with {"scopes":[]} revokes the target; creating a key with omitted or empty scopes instead creates an active key with no scoped permissions.

Key creation returns the new secret once. List responses include metadata for all active shop keys, including broader-scoped and legacy keys, but never the secret or hash. The subset restriction applies to creation, updates and revocation, not listing. API key management rechecks Pro / Plus on every operation (403 PLAN_REQUIRED after losing the required plan), allows up to five active keys, and limits creation to ten attempts/hour/shop. Created keys retain the same creator identity for future admin checks. See Team and Access for request bodies and response examples.

OAuth permissions for MCP

OAuth is available on the merchant MCP connection. Send its access token as Authorization: Bearer <access_token> without X-App-Id. REST endpoints described in the Public API use API keys, not this OAuth token.

OAuth supports eleven scopes: conversations:read, conversations:write, customers:read, campaigns:read, analytics:read, knowledge:read, settings:read, helpdesk.helpcenter:read, setup:read, knowledge:write, and settings:write.

OAuth knowledge:write and settings:write create proposals for review; they do not grant the direct API-key settings/knowledge tools. OAuth conversations:write permits selected conversation actions as the connected member. It is available to admins and staff/member accounts with current Inbox conversation edit access. That edit permission is checked again for every conversation write. Read grants remain capped by the member's current Inbox, Contacts, report and Help center permissions; customer reads exclude contact details. An existing connection does not gain new scopes such as helpdesk.helpcenter:read automatically; connect again to grant them. Only admins can grant the knowledge/settings write scopes. A granted API-key permission is not an OAuth grant.

OAuth conversation actions are immediate writes, not proposals. send_message and start_conversation use the connected member as sender; they do not let the client impersonate another member. OAuth ask_ai ignores the supplied customer object. OAuth does not expose webhook management, delete_conversation, customer deletion or exports, channel and integration writes, translation, FAQ or Help center writes, or team/key/AI-client administration. It does not grant conversations:delete, customers:export, settings.integrations:write, settings.translations:write, helpdesk.helpcenter:write, members:read, members:write, or api_keys:write. See the per-tool catalog for the exact allowed operations.


Rotating a key

Chatty has no rotate button. To replace a key, create the new one first, switch your integration over, then delete the old one.

Create a replacement key

Go to Settings → General → Manage keys, enter a name in Key name, and click Generate key. Name it so you can tell the two apart, for example Zendesk sync 2026-08. You can hold up to 5 active keys per store.

The Manage keys section in Settings, showing the App ID field, the Key name field, and the Generate key button

Copy the new key immediately

Chatty stores only a hash of the key, so the full value is shown once and never again.

Update your integration

Point your integration at the new key and confirm it still works. Both keys are valid at this point, so nothing breaks during the switch.

Delete the old key

Remove the old key from the list.

!

Deleting a key takes effect on its next request. Chatty checks the key's status on every call, so requests with a deleted key are refused straight away. If a key has leaked, delete it first, then check your inbox for activity from before you deleted it.

If a REST request already treated a key as unknown, that failed lookup can be cached for up to 30 seconds. Wait briefly and retry, then check the header and key if 401 persists.


If a key leaks

Delete the key straight away, then create a replacement. A legacy key retains broad access to older Chat Conversations and MCP tools, but not the Public API or the four MCP admin tools. A newer key limits scoped operations to the permissions you ticked; MCP storefront tools still follow shop feature settings. Either way, review the last few days of conversations for messages your team did not send. Then open Settings → General → Manage keys and remove any key you do not recognize.


Need help?

If you run into issues with your API key or requests, contact the Chatty support team from your dashboard.

For what each status code means and what to do about it, see Errors and rate limits.