अल्टीमेट डेवलपर एपीआई गाइड
सुरक्षित Chirps इंटीग्रेशन बनाने के लिए सत्यापित सर्वर-टू-सर्वर API। डैशबोर्ड बिलिंग और OAuth, सार्वजनिक विजेट कॉलबैक, प्रदाता वेबहुक, cron जॉब और आंतरिक रूट जानबूझकर शामिल नहीं हैं।
1. प्रमाणीकरण एवं मूल सिद्धांत
बेस यूआरएल: https://chirps.cc
सभी एपीआई एंडपॉइंट को 'प्राधिकरण' हेडर में एक चिरप्स एपीआई कुंजी की आवश्यकता होती है। आप अपने डैशबोर्ड के [डेवलपर अनुभाग] (https://chirps.cc/dashboard/developers) में एपीआई प्रबंधक से एक एपीआई कुंजी उत्पन्न कर सकते हैं।
Authorization: Bearer <YOUR_CHIRPS_API_KEY>उदाहरण अनुरोध:
curl -X GET https://chirps.cc/api/billing/usage \
-H "Authorization: Bearer <YOUR_CHIRPS_API_KEY>" \
-H "Content-Type: application/json"मानक त्रुटि प्रबंधन
| स्थिति कोड | विवरण |
|---|---|
200 OK | अनुरोध सफल रहा. |
400 Bad Request | JSON पेलोड सत्यापन विफल रहा। एक विवरण सरणी शामिल है. |
401 Unauthorized | टोकन गुम या समाप्त हो गया। |
402 Payment Required | कार्यस्थल बिलिंग सीमा तक पहुंच गया है. |
403 Forbidden | उपयोगकर्ता के पास आवश्यक RBAC अनुमतियाँ नहीं हैं. |
404 Not Found | अनुरोधित संसाधन मौजूद नहीं है. |
500 Server Error | अनपेक्षित प्लेटफ़ॉर्म त्रुटि. |
409 Conflict | The request conflicts with current state, such as a booking slot that is no longer available. |
413 Payload Too Large | The request exceeds the endpoint's documented size limit. |
429 Too Many Requests | The API-key request limit was reached; retry after the current window resets. |
503 Service Unavailable | A required safety or rate-limit dependency is unavailable. Retry with backoff; the request is rejected rather than processed without protection. |
स्कोप और न्यूनतम विशेषाधिकार
हर कुंजी केवल चुने गए स्कोप तक सीमित रहती है। जहाँ संभव हो केवल-पढ़ने वाली कुंजी उपयोग करें और हर इंटीग्रेशन के लिए अलग कुंजी बनाएँ। लिखने का स्कोप संबंधित पढ़ने का स्कोप स्वतः नहीं देता।
assistants:read
assistants:write
analytics:read
artifacts:read
artifacts:write
billing:read
bookings:read
bookings:write
chat:write
connectors:read
connectors:write
conversations:read
conversations:write
knowledge:read
knowledge:write
leads:read
leads:write
telephony:read
telephony:write
widget:writeAPI-key rate limit
Each developer key is limited to 300 requests per rolling minute by default. The limit is atomic across all application instances and can be changed by the platform with API_KEY_RATE_LIMIT_PER_MINUTE. A rejected request returns 429; retry only after the window resets.
2. सहायक जीवनचक्र (निर्माण)
GET /एपीआई/सहायक
सहायकों की सूची बनाएं
एपीआई कुंजी के कार्यक्षेत्र से जुड़े सभी सहायकों की एक सूची प्राप्त करता है।
एक सहायक बनाएँ
POST /एपीआई/सहायक
सभी आधार कॉन्फ़िगरेशन के साथ एक नया सहायक बनाता है।
{
"businessName": "Acme Corp",
"businessUrl": "https://acme.com",
"knowledgeBaseType": "both",
"knowledgeBaseUrl": "https://acme.com/help",
"knowledgeBaseText": "Raw text content of a document...",
"knowledgeBaseFileName": "company_handbook.pdf",
"language": "en",
"isMultiLanguage": false,
"tonePersonality": "professional",
"isCustomPersonality": false,
"supportEmail": "[email protected]",
"maxPages": 5,
"maxDepth": 2,
"welcomeMessageDelay": 2
}| पैरामीटर | प्रकार | आवश्यक | विवरण |
|---|---|---|---|
businessName | डोरी | हाँ | व्यवसाय का नाम (2-100 अक्षर)। |
businessUrl | डोरी | हाँ | व्यावसायिक वेबसाइट का वैध URL (अधिकतम 500 वर्ण)। |
knowledgeBaseType | Enum | हाँ | इनमें से एक: ''यूआरएल'', ''दस्तावेज़'', ''दोनों'', ''कोई नहीं''। |
knowledgeBaseUrl | डोरी | नहीं | यदि प्रकार "url" या "both" है तो प्रदान किया जाना चाहिए। |
knowledgeBaseText | डोरी | नहीं | कच्चा पाठ यदि प्रकार "document" या "both" है। |
knowledgeBaseFileName | डोरी | नहीं | यदि पाठ उपलब्ध कराया गया है तो अपलोड की गई फ़ाइल का नाम। |
language | डोरी | हाँ | भाषा कोड (उदाहरण के लिए, "en", "es")। |
isMultiLanguage | बूलियन | नहीं | स्वचालित अनुवाद सक्षम करें. डिफ़ॉल्ट false. |
tonePersonality | डोरी | हाँ | उदाहरण के लिए, `"professional"`दोस्ताना''। अधिकतम 100 वर्ण. |
isCustomPersonality है | बूलियन | नहीं | कस्टम टोन सक्षम करें. डिफ़ॉल्ट false. |
customPersonalityDescription | डोरी | नहीं | सक्षम होने पर कस्टम टोन निर्देश (अधिकतम 2000 वर्ण)। |
additionalInstructions | डोरी | नहीं | कोर प्रॉम्प्ट निर्देश (अधिकतम 10000 वर्ण)। |
supportEmail | डोरी | हाँ | वृद्धि के लिए वैध ईमेल पता. |
maxPages | संख्या | नहीं | क्रॉल करने के लिए पन्ने. न्यूनतम 1, अधिकतम 100. डिफ़ॉल्ट 5। |
maxDepth | संख्या | नहीं | क्रॉल गहराई. न्यूनतम 1, अधिकतम 20. डिफ़ॉल्ट 2। |
welcomeMessageDelay | संख्या | नहीं | अभिवादन से पहले सेकंड की देरी. न्यूनतम 0, अधिकतम 6. डिफ़ॉल्ट 2। |
सहायक हटाएँ
DELETE /api/assistants/:id
सहायक को स्थायी रूप से हटा देता है और उसके सभी ज्ञान नोड्स और इतिहास को कैस्केडिंग रूप से हटा देता है। किसी पेलोड की आवश्यकता नहीं है.
Creation validation and quota safety
| Input | Contract |
|---|---|
knowledgeBaseUrl | For url or both: 1–20 comma-separated public HTTP(S) URLs, with at most 2,000 characters in total. |
knowledgeBaseText | Required for document or both; maximum 2,000,000 characters. |
knowledgeBaseFileName | Optional source label; maximum 255 characters. |
maxPages / maxDepth | Requested values are bounded by both the documented hard limits and the workspace plan. |
Creation allowance is reserved atomically before insertion, so concurrent requests cannot exceed the monthly quota. Database insertion failures refund that reservation. A created assistant starts inactive in developer mode; call the setup endpoint and wait for its successful terminal event before publishing it.
3. सहायक विश्लेषिकी एवं सांख्यिकी
निर्माण और उपयोग के तुरंत बाद, आप प्रोग्रामेटिक रूप से सहायक के प्रदर्शन मेट्रिक्स प्राप्त कर सकते हैं।
GET /api/analytics/overview?assistantId=uuid&range=30अवलोकन?assistantId=uuid&range=30
निर्दिष्ट सहायक के लिए उपयोग के आँकड़े, कुल संदेश, प्राप्त लीड और सामान्य सहभागिता मेट्रिक्स प्राप्त करें। range पैरामीटर वैकल्पिक है (दिनों की संख्या, न्यूनतम 7, अधिकतम 365, डिफ़ॉल्ट 30)।
अपेक्षित प्रतिक्रिया
{
"totalConversations": 1245,
"totalMessages": 8420,
"totalLeads": 156,
"totalBookings": 42,
"satisfactionRate": 94,
"avgMessagesPerSession": 6.7,
"avgSessionsPerDay": 41.5,
"liveNow": 3,
"onlineNow": 12,
"dailySeries": [
{
"date": "2026-07-15",
"conversations": 45,
"messages": 310,
"leads": 5,
"bookings": 2
}
],
"agentStats": [
{
"name": "Jane Doe",
"messagesSent": 120,
"csat": 98
}
]
}| संपत्ति | प्रकार | विवरण |
|---|---|---|
totalConversations | संख्या | सहायक द्वारा प्रबंधित चैट सत्रों की कुल संख्या. |
totalMessages | संख्या | सभी वार्तालापों में भेजे गए संदेशों की कुल संख्या (उपयोगकर्ता + एआई)। |
totalLeads | संख्या | निकाली गई अद्वितीय लीड (नाम, ईमेल, फ़ोन) की कुल संख्या। |
totalBookings | संख्या | सफलतापूर्वक बुक की गई कैलेंडर नियुक्तियों की कुल संख्या। |
satisfactionRate | संख्या | कुल रेटिंग में से सकारात्मक फीडबैक रेटिंग का प्रतिशत (0-100)। |
avgMessagesPerSession | संख्या | प्रति वार्तालाप संदेशों के आदान-प्रदान की औसत संख्या। |
avgSessionsPerDay | संख्या | अनुरोधित सीमा के भीतर प्रतिदिन बातचीत की औसत संख्या। |
liveNow | संख्या | वर्तमान में किसी मानव एजेंट द्वारा सक्रिय वार्तालापों की संख्या। |
onlineNow | संख्या | पिछले 2 मिनट के भीतर एआई के साथ सक्रिय रूप से चैट करने वाले उपयोगकर्ताओं की संख्या। |
dailySeries | सरणी | दैनिक वस्तुओं की श्रृंखला जिसमें प्रति तिथि conversations, messages, leads और bookings की गणना होती है। |
agentStats | सरणी | मानव एजेंटों के लिए प्रदर्शन मेट्रिक्स, जिनमें messagesSent और csat (ग्राहक संतुष्टि स्कोर) शामिल हैं। |
4. ज्ञान एवं प्रशिक्षण
एक बार एक सहायक बन जाने के बाद, आप "नॉलेज नोड्स" के माध्यम से उसके मस्तिष्क का प्रबंधन करते हैं। प्रत्येक नोड डेटा के एक हिस्से (एक क्रॉल किया गया यूआरएल, एक अपलोड किया गया दस्तावेज़, या एक मैन्युअल टेक्स्ट स्निपेट) का प्रतिनिधित्व करता है।
ज्ञान नोड्स का प्रबंधन
GET /api/assistants/:id/nodes - इस सहायक के लिए सभी ज्ञान नोड्स की सूची बनाएं।
POST /api/assistants/:id/nodes - मैन्युअल रूप से एक नया ज्ञान ब्लॉक इंजेक्ट करें।
{
"title": "Return Policy",
"refined_content": "We offer a 30-day return policy for all unused items...",
"type": "text",
"metadata": {}
}PATCH /api/assistants/:id/nodes/:nodeId - मौजूदा नोड की सामग्री को संशोधित करें या इसकी सक्रिय स्थिति को टॉगल करें।
{
"title": "Updated Return Policy",
"refined_content": "We offer a 60-day return policy now...",
"is_active": true
}DELETE /api/assistants/:id/nodes/:nodeId - किसी नॉलेज ब्लॉक को पूरी तरह हटा दें।
POST /api/assistants/:id/nodes/:nodeId/re-crawl - स्क्रैपर को इस नोड से जुड़े URL को फिर से क्रॉल करने और इसकी सामग्री को अपडेट करने के लिए बाध्य करें। पेलोड: {}.
एआई प्रशिक्षण
POST /api/assistants/:id/train - सभी is_active ज्ञान नोड्स को संकलित करें और एक नए मास्टर सिस्टम प्रॉम्प्ट को गतिशील रूप से संश्लेषित करने के लिए AI ऑर्केस्ट्रेटर का उपयोग करें। पेलोड: {}.
Upload, crawl, and index consistency
| Operation | Limits and guarantees |
|---|---|
| Manual node | Title: 1–200 characters; content: 1–200,000 characters; metadata: object up to 20,000 serialized characters. |
| File upload | PNG, JPEG, WebP, PDF, DOCX, TXT, or Markdown; maximum 10 MB. Failed extraction creates a disabled repairable node and returns vector_sync_pending: true. |
| Deep crawl | maxPages is a positive integer capped by the plan (100 hard maximum); depth is capped at 20. Only public HTTP(S) destinations are allowed, including redirects and browser subrequests. |
| Enable / disable | Disabled nodes are removed from the vector index and are also filtered at retrieval time. Re-enable or edit an active node to rebuild its vectors. |
vector_sync_pending response means the record was saved but is not yet guaranteed searchable; call the sync endpoint or retry the edit.POST /api/knowledge/urls is retained only to return an explicit 410 Gone; it never stores data. Migrate to POST /api/assistants/:id/nodes/deep-crawl.5. विजेट का रूप और व्यवहार
Every accepted PATCH field, its real default, bounds, plan behavior, and nested shape.
PATCH /api/assistants/:id/widget-config
Send only the fields you want to change. The API rejects unknown keys and invalid nested data instead of silently storing configuration the widget cannot use.
{
"designPreset": "corporate-soft",
"primaryColor": "#1972F5",
"theme": "dark",
"bubbleStyle": "branded-drawer",
"bubbleText": "Talk to our team",
"welcomeMessages": [
{
"text": "Hello! How can I help?",
"delay": 1.5
}
],
"welcomeSuggestions": [
"View pricing",
"Book a demo"
],
"pageVisibility": {
"mode": "exclude",
"paths": [
"/checkout/*"
]
},
"voiceEnabled": true,
"voiceName": "Aoede",
"copilotEnabled": true,
"gdprConsentEnabled": true,
"privacyPolicyUrl": "https://example.com/privacy"
}| Field | Type / bounds | Default | Effect | Plan behavior |
|---|---|---|---|---|
primaryColor | hex color | #000000 | हेक्स रंग कोड (उदाहरण के लिए, "#000000")। | — |
designPreset | enum | default | Visual system: default, legacy, corporate, corporate-soft, editorial. | — |
position | enum | bottom-right | "bottom-right""bottom-left""top-right"`ऊपर-बाएं''। | — |
theme | enum | light | "light"`अंधेरा''। | — |
fontFamily | enum | default | "default" (इंटर) या ``विरासत''। | — |
bubbleStyle | enum | circle | ''सर्कल'', ''बार'', ''दराज'', ''ब्रांडेड-सर्कल'', ''ब्रांडेड-बार'', ''ब्रांडेड-दराज''। | Branded launcher styles require custom-branding access. |
bubbleText | string (1–80) | Chat with us | बबल के बगल में प्रदर्शित करने के लिए टेक्स्ट (बार/दराज शैलियों के लिए)। | — |
customLogoUrl | HTTP(S) URL or null | null | कस्टम हेडर लोगो छवि का URL. | Requires custom-branding access. Prefer HTTPS or the widget-logo upload endpoint. |
title | string (1–50) | business name | विजेट हेडर में शीर्षक. | — |
headerSubtitle | string (0–100) | We typically reply instantly | विजेट हेडर में उपशीर्षक. | — |
welcomeMessage | string (0–300) | Hi! How can I help you today? | प्रारंभिक शुभकामना संदेश. | — |
welcomeMessages | array (1–5) | one greeting | Ordered greeting objects with text (1–300) and delay in seconds (0–10). | — |
welcomeMessageDelay | number (0–10) | 2 | अभिवादन से पहले सेकंड की देरी. | — |
welcomeSuggestions | string[] (max 3) | [] | प्रारंभिक त्वरित उत्तर चिप्स के लिए स्ट्रिंग की श्रृंखला। | — |
inputPlaceholder | string (1–100) | Type your message... | संदेश इनपुट के लिए प्लेसहोल्डर टेक्स्ट. | — |
language | language code | assistant language | विजेट भाषा कोड (जैसे, "en", "fr")। | — |
showBranding | boolean | true | Show the Powered by Chirps attribution. | Plans without branding removal always force true. |
voiceEnabled | boolean | true | वॉइस कॉलिंग सक्षम करें. | Plans without voice access always force false. |
voiceModel | string | platform default | Realtime voice model identifier. Normally leave unchanged so Chirps can use the supported platform model. | — |
voiceName | enum | Fenrir | ऑडियो प्रतिक्रियाओं के लिए आवाज की पहचान। नीचे उपलब्ध आवाज़ें देखें। | — |
fileUploadEnabled | boolean | true | उपयोगकर्ताओं को अनुलग्नक अपलोड करने की अनुमति दें. | Plans without file uploads always force false. |
dictationEnabled | boolean | true | ध्वनि श्रुतलेख सक्षम करें (वाक्-से-पाठ)। | — |
copilotEnabled | boolean | plan default | Allow the DOM-navigation Copilot experience. | Plans without Copilot always force false. |
pageVisibility | object | { mode: all, paths: [] } | निर्धारित करता है कि विजेट किन पृष्ठों पर दिखाई देगा ('मोड', 'पथ')। | — |
humanizerEnabled | boolean | true | Apply the conversational response-style pass. | — |
promptInjectionProtectionEnabled | boolean | true | Screen visitor and uploaded-file prompt injection attempts and keep lower-trust content from overriding assistant instructions. | — |
rateLimitEnabled | boolean | true | चैट दर सीमित करना सक्षम करें. डिफ़ॉल्ट सत्य. | — |
rateLimitMaxMessages | integer (1–500) | 30 | विंडो में अधिकतम संदेश. डिफ़ॉल्ट 30. | — |
rateLimitTimeWindow | integer minutes (1–1440) | 60 | समय विंडो मिनटों में. डिफ़ॉल्ट 60. | — |
privacyPolicyUrl | HTTP(S) URL | empty | आपकी गोपनीयता नीति का URL. | — |
gdprConsentEnabled | boolean | false | Show the compact chat privacy notice before the visitor sends data. | — |
gdprDataMaskingEnabled | boolean | false | सहेजने से पहले मास्क PII. डिफ़ॉल्ट ग़लत. | — |
cookieConsentEnabled | boolean | false | Enable widget cookie preferences and consent UI. | — |
cookieConsentAnalyticsEnabled | boolean | true | Offer optional analytics in cookie preferences. Analytics events remain blocked until the visitor affirmatively consents. | — |
Page visibility matching
Use exact paths such as /pricing, or append /* to include descendants such as /docs/*. include shows only matches; exclude hides matches; all ignores paths. Full URLs are normalized to their pathname by the widget.
Available voice names
Zephyr, Aoede, Kore, Leda, Callirrhoe, Despina, Erinome, Laomedeia, Achernar, Pulcherrima, Gacrux, Algenib, Sulafat, Puck, Charon, Fenrir, Orus, Enceladus, Iapetus, Umbriel, Algieba, Autonoe, Rasalgethi, Alnilam, Schedar, Sadachbia, Achird, Zubenelgenubi, Sadaltager
GET /api/assistants/:id/widget-config without an API key. That read is intentionally origin-bound to the authorized business domain in production mode and returns plan-normalized public configuration. It is not a server-to-server developer endpoint; never treat it as a way to read private assistant settings.6. इंटरैक्टिव आर्टिफैक्ट
The complete configuration model for forms, bookings, cards, CSAT, and custom tools.
GET /api/assistants/:id/artifacts · PUT /api/assistants/:id/artifacts · PATCH /api/assistants/:id/artifacts
Artifacts are tool-driven UI. The model calls the enabled tool and Chirps renders it; integrations must send configuration JSON, never {{ARTIFACT: ...}} strings.
{
"form": {
"enabled": true,
"title": "Request a quote",
"description": "Collect the details needed for a quote.",
"triggerRules": "When a visitor explicitly asks for a quote.",
"fields": [
{
"key": "name",
"label": "Full name",
"type": "text",
"required": true,
"placeholder": "Jane Doe"
},
{
"key": "email",
"label": "Work email",
"type": "email",
"required": true
}
],
"submitLabel": "Request quote"
},
"booking": {
"enabled": true,
"title": "Book a consultation",
"description": "Choose an available time.",
"triggerRules": "When a visitor asks to book a meeting.",
"services_enabled": false,
"meetings_enabled": true,
"requiresScheduling": true,
"timezone": "Europe/Paris",
"slotDuration": 30,
"bufferMinutes": 10,
"workingHours": {
"monday": {
"enabled": true,
"start": "09:00",
"end": "17:00"
},
"tuesday": {
"enabled": true,
"start": "09:00",
"end": "17:00"
},
"wednesday": {
"enabled": true,
"start": "09:00",
"end": "17:00"
},
"thursday": {
"enabled": true,
"start": "09:00",
"end": "17:00"
},
"friday": {
"enabled": true,
"start": "09:00",
"end": "17:00"
},
"saturday": {
"enabled": false,
"start": "10:00",
"end": "14:00"
},
"sunday": {
"enabled": false,
"start": "10:00",
"end": "14:00"
}
},
"blockedDates": [
"2026-12-25"
],
"meeting_intake_fields": [
{
"key": "email",
"label": "Email",
"type": "email",
"required": true
}
],
"submitLabel": "Book meeting"
},
"card": {
"enabled": false,
"ctaLabel": "View details",
"ctaUrl": "",
"description": "",
"triggerRules": ""
},
"csat_survey": {
"enabled": true,
"title": "How was your experience?",
"description": "One-click feedback.",
"triggerRules": "Only after the request is resolved."
},
"custom": []
}| Section | Accepted properties | Runtime behavior |
|---|---|---|
form | enabled, title, description, triggerRules, fields, submitLabel | Lead capture and structured intake through show_form. |
booking | enabled, title, description, triggerRules, services_enabled, meetings_enabled, requiresScheduling, timezone, slotDuration, bufferMinutes, workingHours, blockedDates, categories, services, meeting_intake_fields, submitLabel | Meeting or service scheduling through show_booking; supplied values can be prefilled and exact requested slots are verified. |
card | enabled, ctaLabel, ctaUrl, description, triggerRules | Transactional rich-card behavior when verified product data exists. |
csat_survey | enabled, title, description, triggerRules | Thumbs-up/down feedback through show_csat_survey. |
custom | Array of enabled, name, type, description, triggerRules, schema, isCustom | Plan-gated custom tool-backed artifacts. |
Field schema
| Field | Type / bounds | Effect |
|---|---|---|
key | string | Stable machine key used by prefilled_data and requested_fields. |
label | string | Visitor-facing label. |
type | enum | text, email, tel, textarea, number, date, url, dropdown, radio, checkbox, slider, select, or location. |
required | boolean | Blocks submission until a valid value is supplied. |
placeholder | string (max 200) | Optional hint shown inside the control. |
options | string[] | Choices for dropdown, radio, and select controls. |
min, max, step | number | Numeric and slider bounds. |
geo_scope | object | Location boundary: worldwide, continent, country, state, city, or custom; optional value and map bounds. |
Booking service schema
| Field | Type / bounds | Effect |
|---|---|---|
id, name, description | string | Stable service identity and visitor-facing copy. |
duration | minutes | Service duration; the configured slot duration is the fallback. |
category, price | string | Optional filtering and display metadata. |
routing.type | enum | virtual, physical, or phone. |
routing.platform | enum | google_meet, teams, or custom for virtual services. |
routing.link, routing.address | string | Destination appropriate to the selected routing type. |
intake_fields | field[] | Service-specific information requested during booking. |
Validation limits and scheduling rules
| Field | Type / bounds | Effect |
|---|---|---|
fields, meeting_intake_fields, intake_fields | max 50 each | Every field needs a unique machine key, label, and supported type. |
services / categories | max 100 each | Service IDs should remain stable after clients begin storing them. |
slotDuration | integer 5–480 minutes | Length of generated calendar slots. |
bufferMinutes | integer 0–1440 minutes | Unavailable gap inserted around bookings. |
timezone | IANA time-zone name | Business schedule zone, for example Europe/Paris; visitor times are converted for display and calendar invitations. |
workingHours | seven day objects | Each enabled day uses 24-hour HH:mm and must end after it starts. |
blockedDates | YYYY-MM-DD[] (max 366) | Dates unavailable in the business time zone. |
custom | max 20 | Custom tools are plan-gated; names and types are required. |
Tool-call prefill behavior
| Field | Type / bounds | Effect |
|---|---|---|
prefilled_data | object | Values already learned in chat, keyed by configured field key. |
requested_fields | string[] | Show only the configured fields relevant to this intent. |
mode | meeting or service | Select the general meeting flow or a configured service flow. |
selected_service_id | string | Preselect a configured service; never invent an ID. |
requested_categories | string[] | Restrict the visible service list to configured categories. |
preferred_start_time_iso | ISO-8601 | Ask the widget to verify one visitor-requested instant before showing approval. |
artifacts array; streaming responses emit event: artifacts with { artifacts: [...] }. Chirps also keeps compatibility tags in message text for existing widgets and stored history. New clients should consume the structured field/event and treat message text as display copy.7. कनेक्टर और टूल
Discover provider schemas at runtime, store credentials securely, then activate only the tools an assistant needs.
Start with GET /api/marketplace/connectors. Its provider definitions are the source of truth for credential fields, configuration fields, available tools, defaults, and required values; this keeps custom and future providers discoverable without a documentation release.
{
"provider": "shopify",
"name": "Shopify",
"credentials": {}
}- Install the workspace connector record with
POST /api/assistants/:id/connectors;credentialsmust be omitted or{}. - Read its exact field schema from
GET /api/marketplace/connectorsand activate it withPOST /api/assistants/:id/connectors/:connectorId/activate. - Send
configValues, optionalenabledTools, and optionalinstructions. Chirps verifies non-custom connectors and discovers the tools before saving the integration. - Rotate secrets by calling the activation endpoint again.
PUTonly renames a named Custom API. - Use
DELETE /api/assistants/:id/connectorswith{ connectorId }to disable it for one assistant. Use the nestedDELETE .../:connectorIdonly to permanently remove it from the workspace and every assistant.
| Field | Type / bounds | Effect |
|---|---|---|
configValues | object (max 100 scalar values) | Exact keys from the marketplace schema. Values are bounded and secrets are write-only. |
enabledTools | string[] (max 200) | Optional allow-list of tools discovered from the verified connector. |
instructions | string (max 10,000) | Assistant-specific constraints for tool use. |
name | string (max 120) | Optional rename during activation, supported only for named Custom APIs. |
8. एकीकरण एवं परिनियोजन
एक बार जब आपका सहायक कॉन्फ़िगर और प्रशिक्षित हो जाता है, तो आपके पास इसे तैनात करने के दो प्राथमिक तरीके होते हैं:
विकल्प ए: वेब एंबेड (फ्रंटएंड)
सहायक को एक मानक वेबसाइट (वर्डप्रेस, शॉपिफाई, रिएक्ट, आदि) में एकीकृत करने का सबसे आसान तरीका। एंबेड कोड पूरी तरह से नियतात्मक है। इसे लाने के लिए आपको किसी समापन बिंदु की आवश्यकता नहीं है। बस इसे अपनी साइट के <head> में छोड़ें:
<script>
window.chirpsConfig = { assistantId: "YOUR_ASSISTANT_ID" };
</script>
<script src="https://chirps.cc/embed.js" async></script>विकल्प बी: हेडलेस इंटीग्रेशन (बैकएंड/सीआरएम/बॉट्स)
यदि आप एक कस्टम क्लाइंट (जैसे डिस्कोर्ड बॉट, टेलीग्राम इंटीग्रेशन, या देशी आईओएस ऐप) बना रहे हैं, तो आप वेब एंबेड का उपयोग नहीं करेंगे। इसके बजाय, आप सीधे /api/chat समापन बिंदु से इंटरैक्ट करेंगे।
POST /api/chat या /api/chat?stream=true
महत्वपूर्ण: हेडलेस और सर्वर-टू-सर्वर कॉल में Authorization: Bearer <YOUR_CHIRPS_API_KEY> होना आवश्यक है। केवल इंस्टॉल किया गया ब्राउज़र विजेट सार्वजनिक origin-bound प्रवाह का उपयोग करता है। API कुंजी को फ्रंटएंड JavaScript में कभी न रखें।
{
"assistantId": "123e4567-e89b-12d3-a456-426614174000",
"sessionId": "unique-session-id-for-user",
"conversationId": "optional-uuid",
"message": "Hello, I need help with my billing."
}*(यदि multipart/form-data सत्य है तो संलग्नक के लिए file फ़ील्ड के साथ fileUploadEnabled का भी समर्थन करता है)।*
| पैरामीटर | प्रकार | आवश्यक | विवरण |
|---|---|---|---|
assistantId | डोरी | हाँ | सहायक का UUID. |
sessionId | डोरी | हाँ | आप इसे जनरेट करते हैं। चैट इतिहास को समूहीकृत करने के लिए आपके अपने सिस्टम से एक विशिष्ट पहचानकर्ता (उदाहरण के लिए, एक डिस्कॉर्ड उपयोगकर्ता आईडी, एक टेलीग्राम चैट आईडी, या एक यादृच्छिक यूयूआईडी)। |
message | डोरी | हाँ | संदेश की पाठ्य सामग्री (अधिकतम 5000 वर्ण)। |
conversationId | डोरी | नहीं | बातचीत का यूयूआईडी (आपके पहले अनुरोध में लौटाया गया)। |
id | डोरी | नहीं | डिडुप्लीकेशन को रोकने के लिए वैकल्पिक क्लाइंट-साइड संदेश आईडी। |
मोड 1: मानक JSON प्रतिक्रिया (डिफ़ॉल्ट)
/api/chat (स्ट्रीम पैरामीटर के बिना) पर एक POST अनुरोध भेजकर, आप पूर्ण AI प्रतिक्रिया की प्रतीक्षा करते हैं और एक मानक JSON ऑब्जेक्ट प्राप्त करते हैं।
{
"message": "Here is the information you requested...",
"conversationId": "uuid-of-conversation",
"messageId": "uuid-of-message"
}*(यदि is_active_agent: true लौटाया जाता है, तो एक मानव ने चैट पर कब्जा कर लिया है, और message null होगा।)*
मोड 2: सर्वर-भेजे गए इवेंट स्ट्रीमिंग (?stream=true)
URL में ?stream=true जोड़कर, आपको एक वास्तविक समय सर्वर-भेजे गए इवेंट (SSE) स्ट्रीम प्राप्त होती है। आपके कोड को इन विशिष्ट ईवेंट प्रकारों को सुनना चाहिए:
- `event: token`: इसमें
{"text": "chunk"}शामिल है। एआई के प्रतिक्रिया पाठ के प्रत्येक भाग के लिए निकाल दिया गया। - `event: status`: इसमें
{"text": "Searching knowledge base..."}शामिल है। बैकएंड टूल निष्पादन स्थितियों का प्रतिनिधित्व करता है। - `event: done`: इसमें
{"messageId": "uuid", "conversationId": "uuid", "message": "full text"}शामिल है। जब पीढ़ी पूरी तरह से समाप्त हो जाए तो निकाल दिया जाता है। - `event: error`: इसमें
{"error": "Error message"}शामिल है। यदि दर सीमा या त्रुटियाँ होती हैं तो निकाल दिया जाएगा।
लाइव टेकओवर समापन बिंदु
GET /एपीआई/चैट/सत्र
ऐतिहासिक सत्र पुनः प्राप्त करें.
POST /एपीआई/चैट/टॉगल-एजेंट
मानव अधिग्रहण के लिए AI को रोकें। पेलोड: { "sessionId": "...", "isActive": true }
POST /एपीआई/चैट/एजेंट-संदेश
मानवीय संदेश भेजें. पेलोड: { "sessionId": "...", "message": "..." }
Complete chat response contract
{
"message": "I've opened the booking calendar for you.",
"messageId": "uuid",
"conversationId": "uuid",
"artifacts": [
{
"type": "booking",
"title": "Book a consultation"
}
],
"sources": []
}A human takeover returns { message: null, conversationId, is_active_agent: true }. A streaming request can therefore return JSON before an SSE stream begins; check the response Content-Type.
Complete SSE event reference
| Event | Payload and behavior |
|---|---|
token | { text } — committed assistant text chunk. |
status | { text } — tool or retrieval progress for user-facing status UI. |
artifacts | { artifacts: [...] } — structured tool-generated UI payloads. |
sources | { sources, tag } — structured citations when enhanced streaming is enabled. |
provisional | { text } — temporary pre-tool text with X-Chirps-Stream-Version: 2. |
reset | {} — discard accumulated provisional text. |
commit | {} — commit accumulated provisional text. |
done | { messageId, conversationId, message } — authoritative final message. |
error | { error } — terminal generation error. |
X-Chirps-Stream-Version: 2 to receive provisional/reset/commit and structured source events. Clients that do not implement those events should omit the header and rely on token, artifacts, done, and error.9. उन्नत सहायक सेटिंग्स
PATCH /एपीआई/असिस्टेंट्स/:आईडी
कोर कॉन्फ़िगरेशन अद्यतन करें
सहायक की मुख्य सेटिंग्स, व्यक्तित्व और स्क्रैपिंग सीमा को संशोधित करें।
{
"business_name": "Acme Corp",
"business_url": "acme.com",
"business_description": "We sell anvils.",
"system_prompt": "You are a helpful assistant.",
"language": "en",
"tone_personality": "Friendly",
"support_email": "[email protected]",
"additional_instructions": "Never mention the Roadrunner.",
"is_multi_language": true,
"is_dev_mode": false,
"is_active": true,
"max_pages": 15,
"max_depth": 2,
"widget_config_merge": {
"rateLimitEnabled": true
}
}*नोट: सभी फ़ील्ड वैकल्पिक हैं। केवल वही फ़ील्ड भेजें जिन्हें आप अपडेट करना चाहते हैं।*
सहायक हटाएँ
DELETE /api/assistants/:id
सहायक को स्थायी रूप से हटा देता है और सभी ज्ञान नोड्स, वार्तालापों और संदेशों को कैस्केड रूप से हटा देता है। यदि सहायक कभी भी पूरी तरह से सेट नहीं किया गया था, तो यह मासिक निर्माण कोटा वापस कर देता है।
10. टेलीफोनी और आवाज
GET /api/phone-numbers - उपलब्ध नंबरों की सूची बनाएं।
POST /api/phone-numbers/:subscriptionId/assign assigns an already-purchased Chirps phone subscription to an assistant. Send { "assistantId": "uuid" }; send { "assistantId": null } to unassign it. This endpoint does not purchase or provision a new number.
POST /एपीआई/असिस्टेंट्स/:आईडी/आउटबाउंड - आउटबाउंड कॉल ट्रिगर करें। पेलोड: { "phoneNumber": "+123...", "callReason": "Confirm the requested appointment", "conversationId": "optional-uuid" }
11. लीड निष्कर्षण
GET /api/leads?assistantId=uuid&page=1&limit=50&status=new - बातचीत के दौरान निकाले गए एआई को पृष्ठांकित, संरचित लीड प्राप्त करें।
GET /api/leads?id=leadId - संपूर्ण वार्तालाप प्रतिलेख सहित एकल लीड का विवरण प्राप्त करें।
Public lead response
Lead objects contain id, assistant_id, conversation_id, session_id, name, email, phone, status, notes, artifact_id, ai_score, ai_summary, form_data, created_at, and the assistant business name. Internal voice-confirmation/idempotency identifiers are never returned.
12. बुकिंग और कैलेंडर
GET /api/bookings?assistantId=uuid&start=ISO-8601&end=ISO-8601 - सहायक द्वारा निर्धारित कैलेंडर नियुक्तियों को पुनः प्राप्त करें, वैकल्पिक रूप से तिथि के अनुसार फ़िल्टर किया गया।
GET /api/bookings?id=bookingId - वार्तालाप प्रतिलेख सहित एकल बुकिंग का विवरण प्राप्त करें।
DELETE /api/bookings/cancel?id=bookingId - सक्रिय बुकिंग रद्द करता है। &silent=true केवल तब जोड़ें जब आपका इंटीग्रेशन Chirps का बैकअप रद्दीकरण ईमेल जानबूझकर रोकता हो।
POST /एपीआई/बुकिंग/रीशेड्यूल - बुकिंग समायोजित करें। पेलोड: { "bookingId": "uuid", "newStartTime": "ISO-8601", "newEndTime": "ISO-8601" }
Public booking response and time zones
Booking objects contain the public appointment, guest, status, notes, and timestamp fields plus business_timezone. Times are ISO-8601 instants; format them in the viewer's time zone while preserving the returned business zone for schedule context. Internal confirmation IDs, provider calendar-event IDs, and database range columns are omitted.
13. खाता एवं बिलिंग उपयोग
GET /एपीआई/बिलिंग/उपयोग
कार्यक्षेत्र के बिलिंग चक्र उपयोग, सदस्यता योजना सीमा और कुल सहायक गणना पुनः प्राप्त करें। ध्यान दें: एपीआई कुंजी का उपयोग करते समय, अनुरोध स्वचालित रूप से एपीआई कुंजी के कार्यक्षेत्र में आ जाता है; आपको teamId प्रदान करने की आवश्यकता नहीं है।
प्रतिक्रिया ('200 ठीक'):
{
"planName": "Pro",
"periodStr": "2023-10-01",
"assistantCount": 3,
"usage": {
"message_count": 1450,
"harvest_count": 12,
"recrawl_count": 5,
"train_count": 2,
"assistants_created_count": 1,
"voice_minutes_used": 0,
"sms_count": 0,
"email_count": 0,
"whatsapp_count": 0
},
"limits": {
"messages": 5000,
"assistants": 5,
"training": 50,
"recrawls": 20
},
"workspaceOwnerId": "uuid"
}14. पूरा एंडपॉइंट कैटलॉग
The reviewed, API-key-compatible surface. Paths and JSON property names are never translated.
What belongs in the public developer API
These routes accept a scoped Chirps API key and enforce its workspace boundary. Dashboard-only billing/OAuth routes, browser widget callbacks, provider webhooks, cron jobs, and internal MCP routes are intentionally excluded.
id for duplicate protection. Do not automatically retry other write operations unless the response is clearly safe to retry. 402 means a plan quota was reached; 429 means throttled; 5xx may be transient.Assistants
| Method | Path | Scope | Request | Successful result |
|---|---|---|---|---|
GET | /api/assistants | assistants:read | — | Assistant array; credential fields omitted |
POST | /api/assistants | assistants:write | Assistant creation JSON | Created assistant and setup identifiers |
GET | /api/assistants/:id | assistants:read | — | Assistant configuration; secrets omitted |
PATCH | /api/assistants/:id | assistants:write | Supported fields only | Updated assistant |
DELETE | /api/assistants/:id | assistants:write | — | Deletion confirmation |
GET | /api/assistants/:id/setup | assistants:read | — | Setup and crawl status |
POST | /api/assistants/:id/setup | assistants:write | Empty body | SSE setup progress stream |
GET | /api/analytics/overview?assistantId=:id&range=30 | analytics:read | Query: range 7–365 | Engagement, lead, booking and agent metrics |
Knowledge and training
| Method | Path | Scope | Request | Successful result |
|---|---|---|---|---|
GET | /api/assistants/:id/nodes | knowledge:read | — | Knowledge node array |
POST | /api/assistants/:id/nodes | knowledge:write | { title, refined_content, type?, metadata? } | Stored and vectorized node |
PATCH | /api/assistants/:id/nodes/:nodeId | knowledge:write | { title?, refined_content?, is_active? } | Updated and re-vectorized node |
DELETE | /api/assistants/:id/nodes/:nodeId | knowledge:write | — | Node deletion confirmation |
POST | /api/assistants/:id/nodes/:nodeId/re-crawl | knowledge:write | Empty body | Refreshed URL node |
POST | /api/assistants/:id/nodes/upload | knowledge:write | multipart/form-data: file, title? | Extracted knowledge node |
POST | /api/assistants/:id/nodes/deep-crawl | knowledge:write | { maxPages? } | SSE crawl progress stream |
POST | /api/assistants/:id/nodes/sync | knowledge:write | Empty body | Vector store synchronization result |
POST | /api/assistants/:id/train | knowledge:write | Empty body | Compiled assistant prompt |
POST | /api/assistants/:id/harvest | knowledge:write | Empty body | Conversation insights added to knowledge |
POST | /api/knowledge/urls | knowledge:write | Deprecated | Always returns 410 with the assistant-scoped deep-crawl replacement path |
Widget, artifacts and connectors
| Method | Path | Scope | Request | Successful result |
|---|---|---|---|---|
PATCH | /api/assistants/:id/widget-config | widget:write | Partial widget configuration | Normalized widget configuration |
POST | /api/assistants/:id/widget-logo | widget:write | multipart/form-data: file (PNG/JPEG/WebP, max 2 MB) | Public logo URL |
GET | /api/assistants/:id/artifacts | artifacts:read | — | Form, booking, card and CSAT configuration |
PUT | /api/assistants/:id/artifacts | artifacts:write | Complete artifact configuration | Normalized configuration |
PATCH | /api/assistants/:id/artifacts | artifacts:write | Partial artifact configuration | Merged normalized configuration |
GET | /api/marketplace/connectors | connectors:read | — | Installable connector definitions; no credentials |
GET | /api/assistants/:id/connectors | connectors:read | — | Workspace connectors and assistant integrations |
POST | /api/assistants/:id/connectors | connectors:write | { provider, name, credentials?: {} } | Installed connector record; no operational access yet |
PUT | /api/assistants/:id/connectors/:connectorId | connectors:write | { name } (named custom APIs only) | Renamed connector; credentials omitted |
DELETE | /api/assistants/:id/connectors | connectors:write | { connectorId } | Connector disabled for this assistant only |
DELETE | /api/assistants/:id/connectors/:connectorId | connectors:write | — | Workspace connector and all assistant integrations deleted |
POST | /api/assistants/:id/connectors/:connectorId/activate | connectors:write | { configValues, enabledTools?, instructions?, name? } | Activated integration and tool list |
Conversations, leads and bookings
| Method | Path | Scope | Request | Successful result |
|---|---|---|---|---|
POST | /api/chat or /api/chat?stream=true | chat:write | { assistantId, sessionId, message, conversationId?, id? } | JSON reply with artifacts/sources or SSE token/artifacts/status/done events |
GET | /api/chat/sessions?assistantId=:id | conversations:read | — | 20 most recent session summaries |
GET | /api/assistants/:id/conversations?limit=20&status=active | conversations:read | Query: limit 1–50, status optional | Conversation summaries |
DELETE | /api/assistants/:id/conversations | conversations:write | { conversationIds: [uuid] } (max 100) | Deletion confirmation |
POST | /api/chat/toggle-agent | conversations:write | { sessionId, isActive } | Takeover state |
POST | /api/chat/agent-message | conversations:write | { sessionId, message } | Stored human-agent message |
POST | /api/chat/typing | conversations:write | { assistantId, sessionId, isTyping } | Typing-state confirmation |
POST | /api/chat/followup-draft | conversations:write | { conversationId|leadId, assistantId?, channel? } | AI-generated draft; consumes AI-message usage |
POST | /api/chat/conversation-followup | conversations:write | { conversationId|leadId, channel, recipient, subject?, message } | Dispatched follow-up result |
GET | /api/leads | leads:read | Query: id, or assistantId with page, limit, status | Lead detail with transcript or paginated leads; internal confirmation identifiers omitted |
POST | /api/leads | artifacts:write | Artifact submission JSON | Captured lead/booking result |
PATCH | /api/leads | leads:write | { leadId, status?, notes? } | Updated lead |
DELETE | /api/leads | leads:write | { leadId } or { leadIds: [uuid] } | Deletion count |
GET | /api/bookings | bookings:read | Query: id, or assistantId with start and end | Booking detail or booking array; provider and idempotency identifiers omitted |
DELETE | /api/bookings/cancel?id=:id | bookings:write | Query: silent=true optional | Cancellation and calendar-sync state |
POST | /api/bookings/reschedule | bookings:write | { bookingId, newStartTime, newEndTime } | Updated booking or available alternatives |
Telephony and account
| Method | Path | Scope | Request | Successful result |
|---|---|---|---|---|
GET | /api/phone-numbers | telephony:read | — | Numbers and assignable assistants in this workspace |
POST | /api/phone-numbers/:subscriptionId/assign | telephony:write | { assistantId } or { assistantId: null } | Routing update confirmation |
POST | /api/assistants/:id/outbound | telephony:write | { phoneNumber, callReason, conversationId? } | Provider call SID and conversation ID |
GET | /api/billing/usage | billing:read | — | Workspace plan, limits and current usage |
GET | /api/metadata?url=:httpsUrl | artifacts:read | Query: public HTTP(S) URL | Bounded page title, description and image metadata |
अपना सहायक लॉन्च करें
10 मिनट में.
साइन अप करें, अपनी साइट पर प्रशिक्षण लें, अलर्ट कस्टमाइज़ करें और अपनी वेबसाइट पर एम्बेड करें।