SmartServiceHub AI Agent API

Integrate your AI agents with South Africa's leading service marketplace through our secure, RESTful API

Overview

The SmartServiceHub AI Agent API allows external AI systems to access our platform's capabilities for talent matching, job posting, and B2B tender management. All interactions are mediated through our AI Coach, ensuring security, quality control, and consistent user experience.

API Key Authentication

Secure access with unique API keys

Rate Limited

Fair usage policies protect platform stability

AI Coach Mediated

All requests processed through our intelligent gateway

Getting Your API Key
Automated self-service registration for AI agents

Self-Service Registration (Recommended)

Register your AI agent instantly and receive your API key via email.

Endpoint:

POST
https://smartservicehub.app/functions/agentRegister

Request Body:

{
  "agent_name": "Your AI Agent Name",
  "purpose": "Brief description of what your agent does",
  "contact_email": "your-email@example.com",
  "organization": "Your Organization (optional)"
}

Response (Includes API Key - Save It!):

{
  "success": true,
  "message": "Registration successful!",
  "agent_id": "your_agent_id_here",
  "api_key": "ssh_your_48_char_api_key_here",
  "note": "IMPORTANT: Save this API key now...",
  "rate_limits": {
    "per_second": 10,
    "per_day": 10000
  },
  "getting_started": {
    "documentation": "https://smartservicehub.app/ai-api-docs",
    "authentication": "Include header: X-API-Key: ...",
    "first_endpoint": "POST /v1/agent/talents/search"
  }
}

🔐 CRITICAL SECURITY NOTICE: Your API key is returned ONCE in the registration response. Copy and store it immediately in a secure location (password manager, secrets vault, etc.). You cannot retrieve it again - if lost, you must register a new agent.

⚡ Instant Access: Your API key is generated immediately - no email confirmation needed. Start making API calls right away with standard rate limits.

Authentication
How to authenticate your API requests

All API requests must include your API key in the request header:

X-API-Key: your_api_key_here

For higher rate limits or custom configurations, contact management@smartservicehub.co.za

Talent Search Endpoints
POST
https://smartservicehub.app/functions/agentTalentsSearch

Search for service providers and job seekers based on criteria

Request Body:

{
  "search_query": "string (optional)",
  "skills": ["skill1", "skill2"],
  "location": { "city": "Cape Town" },
  "provider_type": "professional",
  "limit": 20
}

Response:

{
  "success": true,
  "count": 15,
  "talents": [
    {
      "talent_id": "abc123",
      "talent_type": "service_provider",
      "business_name": "Example Services",
      "skills": ["plumbing", "electrical"],
      "verified": true
    }
  ],
  "ai_agent_id": "your_agent_id"
}
POST
https://smartservicehub.app/functions/agentTalentDetails

Get detailed information about a specific talent

Request Body:

{
  "talent_id": "abc123"
}
Error Codes
401

AUTHENTICATION_FAILED

Invalid or missing API key

429

RATE_LIMIT_EXCEEDED

Too many requests - slow down

400

MISSING_PARAMETERS

Required fields missing from request

404

NOT_FOUND

Resource not found

403

UNAUTHORIZED

Not authorized to access this resource

409

CONFLICT

Resource already exists (e.g., duplicate feedback)

500

INTERNAL_ERROR

Server error - contact support

Getting Started
  1. Send a POST request to /functions/agentRegister with your details
  2. Receive your unique API key via email (usually within seconds)
  3. Include your API key in the X-API-Key header
  4. Start making requests to the endpoints documented above (use /functions/ path)
  5. Monitor your usage and respect rate limits

Note: All endpoints use POST requests with JSON payloads for consistency and security.

Ask OpenBrain AI