跳到主要内容

假期不漏消息:免费重新连接

选择套餐

The API docs are available in English, Romanian and Russian. This is the English version.

Authentication

Authentication

API keys with permissions (scopes), zero-downtime rotation and instant revocation.

The API key

Send the key in the Authorization header with every request, over HTTPS only. Keys start with aik_live_, which makes them easy for secret scanners such as GitHub secret scanning to find.

curl https://aichat.md/api/public/v1/me \
  -H "Authorization: Bearer $AICHAT_API_KEY"

We only keep a cryptographic fingerprint of the key, not the key itself. That is why we show it once: if you lose it, create another.

Permissions

ScopeAllows
agents:read / agents:writeagents: list, details / name, pause, resume
conversations:read / conversations:writeconversations and messages / send as an operator, take over, hand back
leads:read / leads:writeleads / status, tags, external ID, metadata
contacts:read / contacts:writecontacts / tags, metadata
channels:readconnected channels and their state
knowledge:read / knowledge:writeknowledge sources / add a URL or text, archive
webhooks:managewebhooks, deliveries, /events

A call without the required permission gets 403 permission_error with code scope_missing and the name of the missing scope. Give each integration only what it needs.

Rotation and revocation

  • Rotate — you get a new key with the same permissions; the old one keeps working for the time you choose (none, one hour, 24 hours or 7 days), so you can switch without downtime.
  • Revoke — the key stops immediately. This cannot be undone.
  • Expiry — optional, at creation: 30, 90 or 365 days.

Every creation, rotation or revocation sends a security e-mail to the person who did it. A workspace can have up to 20 active keys. If an account is suspended, all its keys get 401.

Pushed a key to a repository or pasted it in a chat by mistake? Revoke it right away in Settings → Developers, then create a new one.

NextConventions