Operator AI | Docs
  • 👋Welcome to Operator AI
  • Getting Started
    • 🚀Quickstart Guide
    • 🔌Connect Your Channels
    • 🎯Go Live With Operator
    • 📈Post-Launch Best Practices
  • Core Features
    • 🔄Flows Overview
    • 🧠Building Your Knowledge Base
    • ⚙️Automations Overview
    • 🕒Hours & Offline Mode
    • 💬Fallbacks & Default Replies
    • 📥Unified Inbox & Agent Handoff
  • Conversation Management
    • 👥Users and Roles
    • 🏢Departments
    • 🏷️Tags & Organization
    • 📝Internal Notes
    • 🤖Smart Replies
  • 💬Saved Replies
  • Integrations
    • 🔗Zapier Integration
    • 💬Slack Integration
    • 📧Email Marketing
    • 📱WhatsApp Business API Setup
    • 🔌Webhooks and API
  • Best Practices
    • 🛤️Designing Effective Flows
    • 🌱Using Automations for Growth
    • 📊Monitoring Metrics and Optimization
    • 🗣️Conversation Design Tips
  • Troubleshooting
    • 🛠️Common Connection Issues
    • 🔍Conversation Handling Errors
    • 🔄Flow Troubleshooting
    • 💬Fallback Handling Problems
  • 🔧API & Webhook Issues
  • FAQ
    • ❓General Operator AI Questions
  • 📡Channel-specific Limitations
  • 💳Billing and Pricing
  • 🔓Data Privacy and Security
  • API Reference
    • 🛡️Authentication
  • 📚Available Endpoints
  • 🔗Webhooks Overview
  • 🧩Example API Requests
  • 🚫Error Codes and Handling
  • Affiliate Program
    • 📢 Operator AI Affiliate Program
Powered by GitBook
On this page
  • 🧩 Example: Create a New User
  • 🧩 Example: Send a New Message
  • 🧩 Example: Tag a User
  • 🧩 Example: Get All Conversations
  • 📋 Tips for Building with the API
  • 🛟 Need Help?
  • 🎯 Next Step

Example API Requests

Here are real-world examples of how to interact with Operator AI’s API — so you can start building automations, integrations, and workflows faster.


🧩 Example: Create a New User

POST /users
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
  "name": "Jane Smith",
  "email": "jane@example.com",
  "phone": "+15551234567",
  "tags": ["DemoLead", "NewsletterSignup"]
}

✅ Instantly create new user profiles from forms, CRMs, or external apps.


🧩 Example: Send a New Message

POST /messages
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
  "conversation_id": "123456",
  "message": "Thanks for reaching out! How can we help you today?",
  "type": "agent"
}

✅ Send personalized or automated messages inside existing conversations.


🧩 Example: Tag a User

POST /tags
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
  "user_id": "78910",
  "tag": "HighIntent"
}

✅ Organize users better for segmentation, automation, and reporting.


🧩 Example: Get All Conversations

GET /conversations
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

✅ Retrieve all active, pending, or closed conversations for reporting or syncing.


📋 Tips for Building with the API

Tip
Why It Matters

Always use HTTPS

Protects your data and token security.

Handle pagination responses

/conversations and /users may paginate results.

Validate API responses

Always check for success codes and error handling.

Retry on temporary server errors

Build resilience into your integrations.

Rotate tokens quarterly

Maintain good security hygiene.

✅ Consistent, defensive programming = stronger integrations.


🛟 Need Help?

  • Explore full API usage tutorials inside this documentation.

  • Contact support@heyoperator.ai if you need integration help.

  • Your Success Manager can help you architect API-powered workflows.

✅ We’re here to help your Operator AI setup extend powerfully.


🎯 Next Step

👉 Continue to Error Codes and Handling →

PreviousWebhooks OverviewNextError Codes and Handling

Last updated 2 months ago

🧩