{"openapi":"3.1.0","info":{"title":"Concierge API","version":"1.0.0","description":"White-label infrastructure for embedding action-taking AI agents into your product. From prompt to production agent in 60 seconds.","contact":{"name":"Concierge","url":"https://github.com/mehedihassanz/concierge"},"license":{"name":"MIT","url":"https://opensource.org/licenses/MIT"}},"servers":[{"url":"http://hj3pcncszjxl4jzb2mor5bhs.34.135.84.216.sslip.io/api/v1","description":"Versioned API (recommended)"},{"url":"http://hj3pcncszjxl4jzb2mor5bhs.34.135.84.216.sslip.io/api","description":"Legacy API (backward compatible)"}],"components":{"securitySchemes":{"SessionToken":{"type":"http","scheme":"bearer","description":"Dashboard/user session token (HMAC-signed)"},"ApiKey":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Tenant-scoped widget API key"}}},"paths":{"/chat":{"post":{"summary":"Send a message to the agent","tags":["Agent"],"security":[{"ApiKey":[]},{"SessionToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenantId":{"type":"string"},"message":{"type":"string"},"history":{"type":"array"}},"required":["message"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized — valid session token or API key required"},"403":{"description":"Forbidden — insufficient role or cross-tenant access"},"429":{"description":"Rate limit exceeded or monthly quota reached"}}}},"/chat/stream":{"post":{"summary":"Stream agent reply via SSE","tags":["Agent"],"security":[{"ApiKey":[]},{"SessionToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenantId":{"type":"string"},"message":{"type":"string"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized — valid session token or API key required"},"403":{"description":"Forbidden — insufficient role or cross-tenant access"},"429":{"description":"Rate limit exceeded or monthly quota reached"}}}},"/chat/confirm":{"post":{"summary":"Confirm a staged (HITL) action","tags":["Agent"],"security":[{"ApiKey":[]},{"SessionToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pendingId":{"type":"string"}},"required":["pendingId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized — valid session token or API key required"},"403":{"description":"Forbidden — insufficient role or cross-tenant access"},"429":{"description":"Rate limit exceeded or monthly quota reached"}}}},"/chat/handoff":{"post":{"summary":"Escalate to a human agent","tags":["Agent"],"security":[{"ApiKey":[]},{"SessionToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenantId":{"type":"string"},"conversationId":{"type":"string"},"reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized — valid session token or API key required"},"403":{"description":"Forbidden — insufficient role or cross-tenant access"},"429":{"description":"Rate limit exceeded or monthly quota reached"}}}},"/auth/register":{"post":{"summary":"Register a new user","tags":["Auth"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"},"name":{"type":"string"},"tenantId":{"type":"string"}},"required":["email","password"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized — valid session token or API key required"},"403":{"description":"Forbidden — insufficient role or cross-tenant access"},"429":{"description":"Rate limit exceeded or monthly quota reached"}}}},"/auth/login":{"post":{"summary":"Login and get session token","tags":["Auth"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"}},"required":["email","password"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized — valid session token or API key required"},"403":{"description":"Forbidden — insufficient role or cross-tenant access"},"429":{"description":"Rate limit exceeded or monthly quota reached"}}}},"/builder":{"post":{"summary":"Build an agent from a prompt (prompt-to-agent)","tags":["Builder"],"security":[{"SessionToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string"},"email":{"type":"string"}},"required":["prompt"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized — valid session token or API key required"},"403":{"description":"Forbidden — insufficient role or cross-tenant access"},"429":{"description":"Rate limit exceeded or monthly quota reached"}}}},"/me":{"get":{"summary":"Get current user profile","tags":["User"],"security":[{"SessionToken":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized — valid session token or API key required"},"403":{"description":"Forbidden — insufficient role or cross-tenant access"},"429":{"description":"Rate limit exceeded or monthly quota reached"}}}},"/me/memory":{"get":{"summary":"Get what the agent remembers about you","tags":["User"],"security":[{"SessionToken":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized — valid session token or API key required"},"403":{"description":"Forbidden — insufficient role or cross-tenant access"},"429":{"description":"Rate limit exceeded or monthly quota reached"}}}},"/me/conversations":{"get":{"summary":"List your conversations","tags":["User"],"security":[{"SessionToken":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized — valid session token or API key required"},"403":{"description":"Forbidden — insufficient role or cross-tenant access"},"429":{"description":"Rate limit exceeded or monthly quota reached"}}}},"/me/conversations/{id}/csat":{"post":{"summary":"Rate a conversation (1-5)","tags":["User"],"security":[{"SessionToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rating":{"type":"integer","minimum":1,"maximum":5},"comment":{"type":"string"}},"required":["rating"]}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized — valid session token or API key required"},"403":{"description":"Forbidden — insufficient role or cross-tenant access"},"429":{"description":"Rate limit exceeded or monthly quota reached"}}}},"/admin/tenants":{"get":{"summary":"List all tenants","tags":["Admin"],"security":[{"SessionToken":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized — valid session token or API key required"},"403":{"description":"Forbidden — insufficient role or cross-tenant access"},"429":{"description":"Rate limit exceeded or monthly quota reached"}}}},"/admin/tenants/{tenantId}":{"get":{"summary":"Get tenant details","tags":["Admin"],"security":[{"SessionToken":[]}],"parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized — valid session token or API key required"},"403":{"description":"Forbidden — insufficient role or cross-tenant access"},"429":{"description":"Rate limit exceeded or monthly quota reached"}}}},"/admin/tenants/{tenantId}/enabled-actions":{"put":{"summary":"Set enabled actions for a tenant","tags":["Admin"],"security":[{"SessionToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabledActions":{"type":"array","items":{"type":"string"}}}}}}},"parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized — valid session token or API key required"},"403":{"description":"Forbidden — insufficient role or cross-tenant access"},"429":{"description":"Rate limit exceeded or monthly quota reached"}}}},"/admin/tenants/{tenantId}/apikeys":{"post":{"summary":"Issue a new API key","tags":["Admin"],"security":[{"SessionToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string"}}}}}},"parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized — valid session token or API key required"},"403":{"description":"Forbidden — insufficient role or cross-tenant access"},"429":{"description":"Rate limit exceeded or monthly quota reached"}}}},"/admin/tenants/{tenantId}/apikeys/{keyId}":{"delete":{"summary":"Revoke an API key","tags":["Admin"],"security":[{"SessionToken":[]}],"parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}},{"name":"keyId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized — valid session token or API key required"},"403":{"description":"Forbidden — insufficient role or cross-tenant access"},"429":{"description":"Rate limit exceeded or monthly quota reached"}}}},"/admin/tenants/{tenantId}/apikeys/{keyId}/rotate":{"post":{"summary":"Rotate an API key (invalidates old secret)","tags":["Admin"],"security":[{"SessionToken":[]}],"parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}},{"name":"keyId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized — valid session token or API key required"},"403":{"description":"Forbidden — insufficient role or cross-tenant access"},"429":{"description":"Rate limit exceeded or monthly quota reached"}}}},"/admin/analytics":{"get":{"summary":"Get conversation analytics (resolution, CSAT, containment)","tags":["Admin"],"security":[{"SessionToken":[]}],"parameters":[{"name":"tenantId","in":"query","schema":{"type":"string"},"description":"Filter to a specific tenant"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized — valid session token or API key required"},"403":{"description":"Forbidden — insufficient role or cross-tenant access"},"429":{"description":"Rate limit exceeded or monthly quota reached"}}}},"/admin/audit":{"get":{"summary":"Read the audit trail","tags":["Admin"],"security":[{"SessionToken":[]}],"parameters":[{"name":"tenantId","in":"query","schema":{"type":"string"},"description":"Filter to a tenant"},{"name":"limit","in":"query","schema":{"type":"integer","default":200}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized — valid session token or API key required"},"403":{"description":"Forbidden — insufficient role or cross-tenant access"},"429":{"description":"Rate limit exceeded or monthly quota reached"}}}},"/admin/tenants/{tenantId}/kb":{"get":{"summary":"List KB documents","tags":["Knowledge"],"security":[{"SessionToken":[]}],"parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized — valid session token or API key required"},"403":{"description":"Forbidden — insufficient role or cross-tenant access"},"429":{"description":"Rate limit exceeded or monthly quota reached"}}},"post":{"summary":"Index a KB document","tags":["Knowledge"],"security":[{"SessionToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"content":{"type":"string"},"url":{"type":"string"}},"required":["title","content"]}}}},"parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized — valid session token or API key required"},"403":{"description":"Forbidden — insufficient role or cross-tenant access"},"429":{"description":"Rate limit exceeded or monthly quota reached"}}}},"/kb/query":{"post":{"summary":"Query the knowledge base","tags":["Knowledge"],"security":[{"ApiKey":[]},{"SessionToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenantId":{"type":"string"},"query":{"type":"string"}},"required":["query"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized — valid session token or API key required"},"403":{"description":"Forbidden — insufficient role or cross-tenant access"},"429":{"description":"Rate limit exceeded or monthly quota reached"}}}},"/widget":{"get":{"summary":"Get widget config + branding","tags":["Agent"],"security":[],"parameters":[{"name":"tenantId","in":"query","schema":{"type":"string"},"description":"Tenant ID"},{"name":"lang","in":"query","schema":{"type":"string"},"description":"Locale code"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized — valid session token or API key required"},"403":{"description":"Forbidden — insufficient role or cross-tenant access"},"429":{"description":"Rate limit exceeded or monthly quota reached"}}}},"/mcp":{"post":{"summary":"MCP JSON-RPC endpoint (tools/list, tools/call)","tags":["MCP"],"security":[{"ApiKey":[]},{"SessionToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"JSON-RPC 2.0 request"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized — valid session token or API key required"},"403":{"description":"Forbidden — insufficient role or cross-tenant access"},"429":{"description":"Rate limit exceeded or monthly quota reached"}}}}},"tags":[{"name":"Agent","description":"Chat, stream, confirm, handoff"},{"name":"Auth","description":"Login, register"},{"name":"Builder","description":"Prompt-to-agent builder"},{"name":"User","description":"User profile, memory, conversations"},{"name":"Admin","description":"Tenant management, analytics, audit"},{"name":"Knowledge","description":"RAG knowledge base"},{"name":"Channels","description":"WhatsApp, SMS, email, voice"},{"name":"MCP","description":"Model Context Protocol tool server"}]}