API Documentation

Everything you need to integrate Office 168/52 into your applications

๐ŸŽฏ Welcome to Office 168/52 API

The Office 168/52 API provides powerful customer service automation capabilities through a simple REST API. Our AI-powered platform enables businesses to deliver exceptional customer experiences with intelligent conversation management, real-time analytics, and seamless integrations.

๐Ÿ” Authentication Required

All API requests require authentication using API keys. Get started by generating your API key from the dashboard settings.

โœจ Key Features

๐Ÿ’ฌ Intelligent Chat

AI-powered conversations with context awareness and business knowledge integration

๐Ÿ“Š Real-time Analytics

Comprehensive metrics and insights into customer interactions and AI performance

๐Ÿ”Œ Platform Integration

Connect with WooCommerce, Shopify, Stripe, and other business platforms

Quick Example - Send a Chat Message
curl -X POST https://api.askbob.ai/api/chat \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Hello, I need help with my order",
    "customer_id": "cust_12345",
    "business_id": "your_business_id"
  }'

๐Ÿ” Authentication

Secure your API requests with proper authentication

API Key Authentication

Office 168/52 uses API key authentication. Include your API key in the Authorization header of every request using the Bearer token format.

Authorization Header
Authorization: Bearer YOUR_API_KEY

๐Ÿ”‘ Getting Your API Key

  1. Log in to your Office 168/52 dashboard
  2. Navigate to Settings โ†’ API Keys
  3. Click "Generate New API Key"
  4. Copy and securely store your API key
๐Ÿ›ก๏ธ Security Best Practices
  • Never expose API keys in client-side code
  • Use environment variables to store keys
  • Rotate keys regularly
  • Monitor API key usage in the dashboard

POST /api/chat

Send a message to the AI assistant

POST /api/chat
Send a message to Bob AI

This endpoint allows you to send a message to Bob AI and receive an intelligent response. The AI will use your business context and customer history to provide personalized assistance.

Request Parameters

Parameter Type Required Description
message string required The customer's message or question
customer_id string required Unique identifier for the customer
business_id string required Your business identifier
conversation_id string optional Continue an existing conversation
context object optional Additional context for the conversation
Example Request
{
  "message": "I need help tracking my order #12345",
  "customer_id": "cust_abc123",
  "business_id": "unityxpressions",
  "context": {
    "page_url": "https://example.com/orders",
    "user_agent": "Mozilla/5.0...",
    "session_id": "sess_xyz789"
  }
}

Response

200 Successful response
{
  "success": true,
  "conversation_id": "conv_abc123",
  "response": "I'd be happy to help you track your order! Order #12345 is currently being prepared and will ship within 1-2 business days. You'll receive a tracking number once it ships.",
  "confidence": 0.95,
  "model_used": "gpt-3.5-turbo",
  "response_time": 1.2,
  "timestamp": "2024-01-15T10:30:00Z"
}
400 Bad Request - Missing required parameters
{
  "success": false,
  "error": "Bad Request",
  "message": "Missing required parameter: message",
  "code": "MISSING_PARAMETER"
}
401 Unauthorized - Invalid API key
{
  "success": false,
  "error": "Unauthorized",
  "message": "Invalid API key",
  "code": "INVALID_API_KEY"
}

๐Ÿงช Try It Out

Response will appear here...

๐Ÿ› ๏ธ SDKs & Libraries

Official and community-maintained libraries

๐Ÿ“ฆ Official SDKs

๐ŸŸจ JavaScript / Node.js

Official JavaScript SDK for browser and Node.js

npm install @askbob/sdk

๐Ÿ Python

Python SDK with async support

pip install askbob-python

๐Ÿ’Ž Ruby

Ruby gem for Rails integration

gem install askbob

๐Ÿ’ก Quick Start Examples

JavaScript

JavaScript SDK Example
import { AskBobClient } from '@askbob/sdk';

const client = new AskBobClient({
  apiKey: 'your_api_key',
  baseURL: 'https://api.askbob.ai'
});

async function sendMessage() {
  const response = await client.chat.send({
    message: 'Hello, I need help!',
    customerId: 'cust_123',
    businessId: 'your_business'
  });
  
  console.log(response.data.response);
}

Python

Python SDK Example
from askbob import AskBobClient

client = AskBobClient(api_key='your_api_key')

response = client.chat.send(
    message='Hello, I need help!',
    customer_id='cust_123',
    business_id='your_business'
)

print(response.response)