Stammer.ai Docs
  • Welcome
    • 👋Welcome to Stammer.ai
    • 📑About Stammer.ai
    • 🆕New/ Latest Updates
  • START HERE
    • ❓What is Stammer.ai?
    • 🫡Agency Quick Start Guide
    • 📚Glossary
    • 🤑Our Community
  • AI Features
    • 🤖AI Agents (Chatbots)
      • How AI Agents Work
      • How to Build an AI Agent
    • 🔃AI Agent Dashboard
      • (White Label) Marketplace
      • Default Chatbot
      • Share Chatbot
      • Clone Chatbot
      • Chatbot UUID
      • Delete Chatbot
      • Summary (Analytics)
    • 💬Conversations
      • Review Past Conversations
      • Conversation Links
      • Training Better Responses
      • Live Chat
        • Human Handoff Automation (for Live Chat)
    • 📚Knowledge Base Explained
      • 💽Data Storage (Characters)
        • Storage (Characters) Example
      • Copy & Paste Text
      • Upload Documents
      • Scrape Websites
        • 24-hour Auto-Scraping
        • Scraping a Google Doc
        • Google Docs
      • Question & Answer Pairs
      • Data & Content Security
      • Citations/ Sources
      • HTML Rendering (Embed Images & Videos)
    • ✍️Prompting
      • What is a Base System Prompt?
      • Writing a Base System Prompt
      • Prompt Examples (Marketplace)
        • Base System Prompt Template (General)
    • 🔧AI Agent Settings
    • 🎨AI Chat Widget
      • Customize Chat Widget Apperance
      • Chat Widget Pop-Up
      • Initial Messages Pop-Up
      • Chat Widget Voice
    • ⚙️Advanced Settings for AI Agent
      • Model Version
      • Prioritize Question/Answer Results
      • Chatbot Visibility
      • Temperature
      • Message Template
      • Support Email
      • Domains
      • Show Data Sources in Chat Widget
      • Debug Mode
    • Leads 2.0
    • 📈Leads (Legacy)
      • Overview of Lead Generation
      • Lead Collection Form Fields
      • Lead Collection Webhook URL
      • Lead Collection Email Notification
      • In Chat Lead Collection Base System Prompt
      • Sending Lead Data to Zapier
      • Sending Lead Data to GHL
      • Sending Lead Data to Zoho CRM
    • 📅Scheduling
      • AI Scheduling - Simplified
      • AI Scheduling - Experimental (Beta)
        • What is Scheduling?
        • Calendar Integration
          • Google Calendar
        • Appointment Scheduling Activation
        • Appointment Scheduling Webhook URL
        • Appointment Scheduling Email Notification
        • Appointment Scheduling Base System Prompt
        • The Appointment Scheduling Functions & Customizing the Appointment Scheduling Prompt
    • 🧊Integrations
      • Embed Chatbot on a Website
      • Zapier App
      • GoHighLevel (GHL)
      • Instagram DM
      • Facebook Messenger
      • WhatsApp
      • ElevenLabs Voice
      • Discord
    • 🤖Troubleshooting
      • How to Respond in Any Language
      • Responses are Too Long
      • Debug Mode
      • Clickable Links in Responses
    • 🌌Functions (Labs)
      • Custom Functions
        • How Custom Functions Work
        • Code Generation Prompt for Custom Functions
        • Stock Market Data - Custom Function
        • Shopify - Custom Function
        • Airtable - Custom Function
        • Google Sheets - Custom Function
    • 🔄Vault
      • OpenAI API Key (ChatGPT)
      • Anthropic API Key (Claude)
      • xAI API Key (Grok)
      • Eleven Labs API Key
  • 👑MasterChat
  • White Label
    • 🤑What is White Labeling?
    • 👤Client Sub-Accounts
      • Create Sub-Account
      • Sub-Account Wallet
      • Sub-Account Storage Balance
      • Sub-Account Extra AI Agents
      • How to clone a chatbot to a sub-account
    • 🔗Custom Domain
      • Troubleshooting Custom Domain Deployment DNS Issues
    • 🏗️The SaaS Configurator
      • Create Subscription Package
        • Custom Packages + Settings
      • Add-Ons
        • Storage (Characters) - Add Ons
        • AI Agent Rebilling - Add Ons
        • MasterChat - Add Ons
        • Advanced Scraper - Add Ons
    • 👍White Label API
      • API Documentation
      • AI Agent API
        • Message AI Agent
        • Create AI Agent
        • Retrieve AI Agent
        • Update AI Agent
        • Delete AI Agent
      • Knowledge Base API
        • Add AI Agent Q/A
        • Add URLs to Scrape
        • Add Files (Pdf, Doc etc.)
      • Conversations
        • AI Agent Conversations
        • Retrieve Conversation
        • Delete A Conversation
      • Sub-Accounts
        • Create Sub-Account
        • Retrieve Sub-Account
        • Update Sub-Account
        • Delete Sub-Account
      • User
        • Retrieve User's Data
      • Examples
        • Create New Sub-Account (Zapier Example)
        • White Label API x Zapier X Slack Example
        • AI Chatbot Chrome Extension
    • 👾White Label (Your) Marketplace
    • 😇White Label Free Trials
      • Free Trial Settings (No CC Req.)
      • Free Trial Settings (CC Req.)
    • 🎨Custom Dashboard Styling
  • Agency Settings
    • ⛳Agency Dashboard
    • 👥User Permissions
    • 😎Agency Profile
    • 👥User Access
    • 💳Connect Stripe
    • 🔗Custom Menu Links
    • 🤘Default Prompts
  • Account Management
    • ⚙️Billing Usage & Settings
    • 💲Agency Billing
      • Subscription Plans
      • Change Subscription Plan
      • Update Credit Card
      • Download Invoice
      • Refunds
      • Cancel Subscription
    • 💱Agency Wallet
      • The Agency Wallet System
      • Agency vs Sub-Account Wallet
      • Auto Billing
      • Add Funds to Wallet
      • AI Messages Costs
      • AI Agents Costs
      • Storage (Characters) Costs
    • 🤲Admin Account Profile
      • Change Password
      • Google Auth Login
  • Support
    • 🤝Need Help?
    • 🔓Security & Compliance
      • Data Privacy & Security Report
      • GDPR
      • Terms & Conditions
      • Privacy Policy
      • Data Processing Agreement
      • AI Model Data Usage
      • Service Level Agreement
    • ⚡Discord Community
    • 📹Weekly Office Hours
    • 🙌FAQ
      • General
      • Localization
      • Data/Security
      • Set Up
      • Password
      • Technical Questions
      • Sales/Onboarding
      • Marketing/Pricing
      • Where can I find...?
      • Other
      • Alternatives to Stripe Connect
    • 📰Changelog/ Roadmap
    • 🍭Resources
      • Sales Deck
      • 💰AI Agency 101
        • How to Price Your AI Chatbots
        • How to Get More Clients
        • The Value Proposition of AI Agents
        • AI SaaS Funnel Explained
    • 🤑Affiliate Program
Powered by GitBook
On this page
  • Required Parameters
  • Optional Parameters
  1. White Label
  2. White Label API
  3. AI Agent API

Update AI Agent

You can interact with this API by sending a PUT request.

API Endpoint

The following endpoint/URL should be used in order to access this API:

https://app.stammer.ai/en/chatbot/api/v1/chatbot/your_chatbot_uuid/

Request Headers

The API must have the following request headers:

Content-Type: application/json
Authorization: Token <Your-API-Token>

Request Body

The API requires the following parameters in the request body:

Required Parameters

  • name (Type: String, Required) The name of the chatbot.

  • display_name (Type: String, Required) Name shown on the Chat Widget.

  • base_system_message (Type: String, Required) Base message given to ChatGPT.

Optional Parameters

  • chatgpt_model_key (Type: Choice, Optional) The key for the version of the ChatGPT (OpenAI) model being used.

  • temperature (Type: Decimal, Optional) Temperature parameter for the GPT Chatbot Completion API. Determines the randomness of the response.

  • support_email (Type: Email, Optional) Set this email to override the default agency support email for the chatbot.

  • conversation_starter_message (Type: String, Optional) Enter chatbot's starter messages, separated by new lines. These are displayed to the user at the beginning of the conversation.

  • initial_message (Type: String, Optional) Chatbot's initial messages shown to the user, each message is separated by new line.

  • show_data_sources (Type: Boolean, Optional) Flag to indicate if the chatbot should show data sources in the chat widget.

  • persistent_conversation_starter_message (Type: Boolean, Optional) Maintains the visibility of the conversation starter messages throughout the conversation.

  • debug_mode (Type: Boolean, Optional) Enabling this option will display the sources/matched data from Redisearch for a given query.

  • audio_io_enabled (Type: Boolean, Optional) Enable audio and input/output for chatbot.

Request Example

Here's an example of the request:

import requests

# Define the API endpoint
url = "https://app.stammer.ai/en/chatbot/api/v1/chatbot/your_chatbot_uuid/"

# Set up authentication and headers
headers = {
    'Authorization': 'Token <YOUR-API-TOKEN>',
    'Content-Type': 'application/json',
    'Accept': 'application/json'
}



# Data is passed in the request body as JSON
data = {

    "name": "Your message/string here.",

    "display_name": "Your message/string here.",

    "chatgpt_model_key": "Choices:['GPT-3.5', 'GPT-4', 'GPT-4-Turbo', 'GPT_4_TURBO_2024_04_09', 'GPT_4_O_2024_05_13', 'GPT-4O-mini', 'GPT-4O-2024-08-06']",

    "temperature": "1.1",

    "support_email": "john@example.com",

    "base_system_message": "Your message/string here.",

    "conversation_starter_message": "Your message/string here.",

    "initial_message": "Your message/string here.",

    "show_data_sources": True,

    "persistent_conversation_starter_message": True,

    "debug_mode": True,

    "audio_io_enabled": True

}
response = requests.put(url, headers=headers, json=data)



# Process the response
if response.status_code in (200, 201, 202):
    result = response.json()
    print("Response data:", result)
else:
    try:
        error_data = response.json()
        error_message = error_data.get('message') or error_data.get('error', 'Unknown error')
        print(f"Error: {error_message}")
    except ValueError:
        print(f"Error: Status code {response.status_code}")

PreviousRetrieve AI AgentNextDelete AI Agent

Last updated 1 month ago

Learn More -

👍
https://app.stammer.ai/en/api-docs/chatbot/update/