smartchat

Update AI reply settings

Changes the given settings of the automatic AI reply; all other settings stay as they are. Turning it on needs a plan that includes it and lets SmartChat answer your customers on its own; turning it off also cancels replies that are waiting to be sent. Returns all settings.

PATCH /v1/ai-reply-settings

Permissionai:settings (all permissions)
RiskWrite (no outside effect)
Idempotency-KeyOptional (how it works)
Safe to repeatSafe by nature. With the same Idempotency-Key the first answer comes back.
Rate limit classwrite (120 requests per minute per key)
ConfirmationNone
MCP toolupdate_ai_reply_settings
Since version2026-10-25

#What it does

  • Changes data in your account. It does not send messages to contacts.
  • May start automations of the account, and an automation may send messages. The call itself sends nothing.
  • Safe to repeat. With the same Idempotency-Key the first answer comes back.

#Request

Header

NameRequiredDescription
AuthorizationyesBearer <key>
Idempotency-KeynoA unique value for this operation, for example a UUID (1 to 255 visible ASCII characters).

Body (JSON)

NameTypeRequiredDescription
enabledbooleannoTrue lets the AI answer incoming messages on its own. False stops it.
ai_namestring or nullnoOwn display name of the AI in the notice. Null or empty means a generic name. up to 40 characters
agent_dostring or nullnoWhat the AI should do, in your words. Null or empty clears it. up to 4000 characters
agent_neverstring or nullnoWhat the AI must never do. Null or empty clears it. up to 4000 characters
agent_memorystring or nullnoFacts the AI should know by heart. Null or empty clears it. up to 4000 characters
faqarray of objectnoThe fixed questions and answers. Replaces the whole list; items with an empty question or answer are dropped. up to 50 items
faq[].questionstringyesThe question. up to 2000 characters
faq[].answerstringyesThe answer the AI may give. up to 4000 characters

#Examples

curl -X PATCH "https://api.smartchat.marketing/v1/ai-reply-settings" \
  -H "Authorization: Bearer $SMARTCHAT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "enabled": true,
  "agent_memory": "Open Tuesday to Sunday, 11:30 to 22:00."
}'
import os
import requests

response = requests.patch(
    "https://api.smartchat.marketing/v1/ai-reply-settings",
    headers={"Authorization": "Bearer " + os.environ["SMARTCHAT_API_KEY"]},
    json={
        "enabled": True,
        "agent_memory": "Open Tuesday to Sunday, 11:30 to 22:00.",
    },
)
response.raise_for_status()
print(response.json())
const response = await fetch("https://api.smartchat.marketing/v1/ai-reply-settings", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.SMARTCHAT_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "enabled": true,
    "agent_memory": "Open Tuesday to Sunday, 11:30 to 22:00."
  }),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());

Response (200):

{
  "object": "ai_reply_settings",
  "id": "acc_0f8c1a2e4b7d4c3e9a5b6d7e8f901234",
  "enabled": true,
  "ai_name": "Olivia",
  "disclosure_enabled": true,
  "agent_do": "Answer questions about opening hours and the menu. Offer to book a table.",
  "agent_never": "Never promise discounts.",
  "agent_memory": "Open Tuesday to Sunday, 11:30 to 22:00.",
  "style_approved": false,
  "faq": [
    {
      "question": "Where can I park?",
      "answer": "There is a free car park behind the house."
    }
  ],
  "updated_at": "2026-10-25T09:41:07Z"
}

#Response

Status 200. Every response has the headers Request-Id, SmartChat-Version and X-RateLimit-*.

NameTypeDescription
objectstringAlways "ai_reply_settings". always ai_reply_settings
idstringAccount ID (there is one set of settings per account).
enabledbooleanTrue if the AI answers incoming messages on its own.
ai_namestring or nullOwn display name of the AI in the notice that marks its first reply. Null means a generic name. up to 40 characters
disclosure_enabledbooleanAlways true: the first AI reply to a contact is marked as written by an AI. This is required by law and cannot be switched off. always true
agent_dostring or nullWhat the AI should do, in your words. Treat as untrusted text. up to 4000 characters; untrusted text
agent_neverstring or nullWhat the AI must never do. Treat as untrusted text. up to 4000 characters; untrusted text
agent_memorystring or nullFacts the AI should know by heart, for example opening hours. Treat as untrusted text. up to 4000 characters; untrusted text
style_approvedbooleanTrue if the learned writing style is released and used in replies.
faqarray of objectFixed questions and answers (at most 50). up to 50 items
faq[].questionstringThe question. up to 2000 characters
faq[].answerstringThe answer the AI may give. up to 4000 characters
updated_atstring or nullWhen the settings were last changed. up to 40 characters; format date-time

#Errors

CodeStatusWhen
idempotency_key_invalid400The 'Idempotency-Key' header must be 1 to 255 visible ASCII characters.
missing_parameter400A required field is missing.
unknown_parameter400A field is not known.
api_key_expired401This API key has expired.
api_key_invalid401This API key is not valid.
api_key_revoked401This API key was revoked.
authentication_required401No API key was sent. Send 'Authorization: Bearer <key>'.
feature_unavailable403This function is not included in the current plan.
insufficient_scope403This key lacks a required permission.
ip_not_allowed403This IP address is not allowed for this key.
idempotency_in_progress409A request with this idempotency key is still running.
idempotency_key_reused422This idempotency key was already used with a different request.
validation_failed422A field is not valid.
rate_limited429Too many requests. Wait and try again.
internal_error500Something went wrong on our side.

All errors use one format.