Developer API
API programisty

Najlepszy przewodnik po API dla programistów

Zweryfikowany interfejs API serwer-serwer do budowania bezpiecznych integracji Chirps. Rozliczenia i OAuth panelu, publiczne wywołania widżetu, webhooki dostawców, zadania cron i trasy wewnętrzne są celowo wykluczone.

Developer API

1. Uwierzytelnianie i podstawowe zasady

Podstawowy adres URL: https://chirps.cc

Wszystkie punkty końcowe API wymagają klucza API Chirps w nagłówku „Authorization”. Możesz wygenerować klucz API z Menedżera API w sekcji dla programistów na pulpicie nawigacyjnym.

http
Authorization: Bearer <YOUR_CHIRPS_API_KEY>

Przykładowe żądanie:

bash
curl -X GET https://chirps.cc/api/billing/usage \
  -H "Authorization: Bearer <YOUR_CHIRPS_API_KEY>" \
  -H "Content-Type: application/json"

Standardowa obsługa błędów

Kod stanu, Opis
Kod stanuOpis
,,200 OK”.Żądanie zostało zrealizowane.
400 Bad RequestWeryfikacja ładunku JSON nie powiodła się. Zawiera tablicę szczegółów.
401 UnauthorizedBrakujący lub wygasły token.
402 Payment RequiredObszar roboczy osiągnął limity rozliczeniowe.
403 ForbiddenUżytkownik nie ma wymaganych uprawnień RBAC.
404 Not FoundŻądany zasób nie istnieje.
500 Server ErrorNieoczekiwany błąd platformy.
409 ConflictThe request conflicts with current state, such as a booking slot that is no longer available.
413 Payload Too LargeThe request exceeds the endpoint's documented size limit.
429 Too Many RequestsThe API-key request limit was reached; retry after the current window resets.
503 Service UnavailableA required safety or rate-limit dependency is unavailable. Retry with backoff; the request is rejected rather than processed without protection.

Zakresy i minimalne uprawnienia

Każdy klucz jest ograniczony do wybranych zakresów. Gdy to możliwe, używaj kluczy tylko do odczytu i osobnego klucza dla każdej integracji. Zakres zapisu nie przyznaje automatycznie odpowiadającego mu zakresu odczytu.

scopes
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:write
API key security
Klucze API są poufne. Przechowuj je wyłącznie na serwerze, nigdy nie osadzaj w witrynie ani aplikacji mobilnej i natychmiast unieważnij ujawniony klucz.

API-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.

Developer API

2. Cykl życia asystenta (tworzenie)

GET /api/assistants

Lista asystentów

Pobiera listę wszystkich asystentów powiązanych z obszarem roboczym klucza API.

Utwórz Asystenta

POST /api/assistants

Tworzy nowego asystenta ze wszystkimi konfiguracjami podstawowymi.

json
{

  "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
}
Parametr, Typ, Wymagany, Opis
ParametrTypWymaganyOpis
businessNameSmyczkowyTakNazwa firmy (2-100 znaków).
businessUrlSmyczkowyTakPrawidłowy adres URL witryny firmy (maks. 500 znaków).
knowledgeBaseTypeWyliczenieTakJedno z: "url", "document", "both", "none".
knowledgeBaseUrlSmyczkowyNIENależy podać, jeśli typem jest `"url"`oba''.
knowledgeBaseTextSmyczkowyNIESurowy tekst, jeśli typ to `"document"`oba''.
knowledgeBaseFileNameSmyczkowyNIENazwa przesłanego pliku, jeśli dostarczany jest tekst.
„język”.SmyczkowyTakKod języka (np. „en”, „es”).
„jest wielojęzyczny”.Wartość logicznaNIEWłącz automatyczne tłumaczenie. Domyślnie „fałsz”.
„tonOsobowość”.SmyczkowyTakNp. „profesjonalny”, „przyjazny””. Maks. 100 znaków.
„isCustomPersonality”.Wartość logicznaNIEWłącz niestandardowy dźwięk. Domyślnie „fałsz”.
customPersonalityDescriptionSmyczkowyNIENiestandardowe instrukcje dźwiękowe, jeśli są włączone (maks. 2000 znaków).
„instrukcje dodatkowe”.SmyczkowyNIEPodstawowe instrukcje podpowiedzi (maks. 10000 znaków).
supportEmailSmyczkowyTakPrawidłowy adres e-mail do eskalacji.
maxPagesNumerNIEStrony do przeszukania. Min. 1, maks. 100. Domyślnie „5”.
maxDepthNumerNIEGłębokość pełzania. Min. 1, maks. 20. Domyślnie „2”.
welcomeMessageDelayNumerNIEOpóźnienie w sekundach przed powitaniem. Min. 0, Maks. 6. Domyślnie „2”.

Usuń Asystenta

DELETE /api/assistants/:id

Trwale usuwa asystenta i kaskadowo usuwa wszystkie jego węzły wiedzy i historię. Nie jest wymagany żaden ładunek.

Creation validation and quota safety

Input, Contract
InputContract
knowledgeBaseUrlFor url or both: 1–20 comma-separated public HTTP(S) URLs, with at most 2,000 characters in total.
knowledgeBaseTextRequired for document or both; maximum 2,000,000 characters.
knowledgeBaseFileNameOptional source label; maximum 255 characters.
maxPages / maxDepthRequested 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.

Developer API

3. Asystent Analytics i statystyki

Natychmiast po utworzeniu i użyciu możesz programowo pobrać wskaźniki wydajności asystenta.

GET /api/analytics/overview?assistantId=uuid&range=30

Pobierz statystyki użytkowania, całkowitą liczbę wiadomości, przechwyconych potencjalnych klientów i ogólne wskaźniki zaangażowania dla określonego asystenta. Parametr „zakres” jest opcjonalny (liczba dni, min. 7, maks. 365, domyślnie 30).

Oczekiwana odpowiedź

json
{

  "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
    }
  ]
}
Nieruchomość, Typ, Opis
NieruchomośćTypOpis
„całkowite rozmowy”.NumerCałkowita liczba sesji czatu obsłużonych przez asystenta.
„wszystkie wiadomości”.NumerCałkowita liczba wiadomości (użytkownik + AI) wysłanych we wszystkich rozmowach.
„całkowita liczba potencjalnych klientów”.NumerCałkowita liczba wyodrębnionych unikalnych leadów (imię i nazwisko, adres e-mail, telefon).
„całkowite rezerwacje”.NumerŁączna liczba pomyślnie zarezerwowanych spotkań w kalendarzu.
„Wskaźnik satysfakcji”.NumerProcent (0–100) pozytywnych ocen w stosunku do wszystkich ocen.
avgMessagesPerSessionNumerŚrednia liczba wiadomości wymienianych w trakcie rozmowy.
avgSessionsPerDayNumerŚrednia liczba rozmów dziennie w żądanym zakresie.
„Na żywo”.NumerLiczba aktywnych rozmów aktualnie przejętych przez agenta ludzkiego.
„Teraz online”.NumerLiczba użytkowników aktywnie rozmawiających z AI w ciągu ostatnich 2 minut.
„codzienna seria”.SzykTablica obiektów codziennych zawierających liczniki „rozmów”, „wiadomości”, „potencjalnych klientów” i „rezerwacji” według daty.
agentStatsSzykWskaźniki wydajności agentów ludzkich, w tym „messagesSent” i „csat” (wynik zadowolenia klienta).
Developer API

4. Wiedza i szkolenie

Po utworzeniu asystenta zarządzasz jego mózgiem poprzez „węzły wiedzy”. Each node represents a chunk of data (a crawled URL, an uploaded document, or a manual text snippet).

Zarządzanie węzłami wiedzy

GET /api/assistants/:id/nodes - Lista wszystkich węzłów wiedzy dla tego asystenta.

POST /api/assistants/:id/nodes - Ręcznie wstrzyknij nowy blok wiedzy.

json
{

  "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 - Zmodyfikuj zawartość istniejącego węzła lub przełącz jego stan aktywny.

json
{

  "title": "Updated Return Policy",
  "refined_content": "We offer a 60-day return policy now...",
  "is_active": true
}

DELETE /api/assistants/:id/nodes/:nodeId - Całkowicie usuwa blok wiedzy.

POST /api/assistants/:id/nodes/:nodeId/re-crawl - Zmusza skrobak do ponownego przeszukania adresu URL powiązanego z tym węzłem i zaktualizowania jego zawartości. Ładunek: {}.

Szkolenie AI

POST /api/assistants/:id/train - Skompiluj wszystkie węzły wiedzy is_active i użyj orkiestratora AI do dynamicznej syntezy nowego głównego monitu systemowego. Ładunek: {}.

Upload, crawl, and index consistency

Operation, Limits and guarantees
OperationLimits and guarantees
Manual nodeTitle: 1–200 characters; content: 1–200,000 characters; metadata: object up to 20,000 serialized characters.
File uploadPNG, JPEG, WebP, PDF, DOCX, TXT, or Markdown; maximum 10 MB. Failed extraction creates a disabled repairable node and returns vector_sync_pending: true.
Deep crawlmaxPages 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 / disableDisabled 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.
Safe replacement
Deep crawl and document re-indexing prepare replacement data before retiring the previous searchable copy. If preparation fails, existing knowledge remains available. A vector_sync_pending response means the record was saved but is not yet guaranteed searchable; call the sync endpoint or retry the edit.
Retired endpoint
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.
Developer API

5. Wygląd i zachowanie widżetu

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.

json
{
  "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
FieldType / boundsDefaultEffectPlan behavior
primaryColorhex color#000000Kod koloru szesnastkowego (np. „#000000”).—
designPresetenumdefaultVisual system: default, legacy, corporate, corporate-soft, editorial.—
positionenumbottom-right"bottom-right", "bottom-left", "top-right", "top-left".—
themeenumlight„jasny” lub „ciemny”.—
fontFamilyenumdefault"default" (Inter) lub ``odziedziczyć''.—
bubbleStyleenumcircle"circle", "bar", "drawer", "branded-circle", "branded-bar", "branded-drawer".Branded launcher styles require custom-branding access.
bubbleTextstring (1–80)Chat with usTekst wyświetlany obok dymku (w przypadku stylów paska/szuflady).—
customLogoUrlHTTP(S) URL or nullnullAdres URL niestandardowego obrazu logo nagłówka.Requires custom-branding access. Prefer HTTPS or the widget-logo upload endpoint.
titlestring (1–50)business nameTytuł w nagłówku widżetu.—
headerSubtitlestring (0–100)We typically reply instantlyPodtytuł w nagłówku widżetu.—
welcomeMessagestring (0–300)Hi! How can I help you today?Początkowa wiadomość powitalna.—
welcomeMessagesarray (1–5)one greetingOrdered greeting objects with text (1–300) and delay in seconds (0–10).—
welcomeMessageDelaynumber (0–10)2Opóźnienie w sekundach przed powitaniem.—
welcomeSuggestionsstring[] (max 3)[]Tablica ciągów znaków dla początkowych żetonów szybkiej odpowiedzi.—
inputPlaceholderstring (1–100)Type your message...Tekst zastępczy dla danych wejściowych wiadomości.—
languagelanguage codeassistant languageKod języka widgetu (np. "en", "fr").—
showBrandingbooleantrueShow the Powered by Chirps attribution.Plans without branding removal always force true.
voiceEnabledbooleantrueWłącz połączenia głosowe.Plans without voice access always force false.
voiceModelstringplatform defaultRealtime voice model identifier. Normally leave unchanged so Chirps can use the supported platform model.—
voiceNameenumFenrirTożsamość głosowa dla odpowiedzi audio. Zobacz dostępne głosy poniżej.—
fileUploadEnabledbooleantrueZezwalaj użytkownikom na przesyłanie załączników.Plans without file uploads always force false.
dictationEnabledbooleantrueWłącz dyktowanie głosowe (zamienianie mowy na tekst).—
copilotEnabledbooleanplan defaultAllow the DOM-navigation Copilot experience.Plans without Copilot always force false.
pageVisibilityobject{ mode: all, paths: [] }Określa, na jakich stronach pojawi się widżet („tryb”, „ścieżki”).—
humanizerEnabledbooleantrueApply the conversational response-style pass.—
promptInjectionProtectionEnabledbooleantrueScreen visitor and uploaded-file prompt injection attempts and keep lower-trust content from overriding assistant instructions.—
rateLimitEnabledbooleantrueWłącz ograniczenie szybkości czatu. Domyślnie prawda.—
rateLimitMaxMessagesinteger (1–500)30Maksymalna liczba wiadomości w oknie. Domyślnie 30.—
rateLimitTimeWindowinteger minutes (1–1440)60Okno czasowe w minutach. Domyślnie 60.—
privacyPolicyUrlHTTP(S) URLemptyAdres URL Twojej polityki prywatności.—
gdprConsentEnabledbooleanfalseShow the compact chat privacy notice before the visitor sends data.—
gdprDataMaskingEnabledbooleanfalseMaskuj PII przed zapisaniem. Domyślnie fałsz.—
cookieConsentEnabledbooleanfalseEnable widget cookie preferences and consent UI.—
cookieConsentAnalyticsEnabledbooleantrueOffer 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

Public runtime configuration
The installed browser widget reads 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.
Plan enforcement
Chirps normalizes plan-gated settings on both write and public config reads. Custom branding, file uploads, voice, and Copilot cannot be enabled by bypassing the dashboard.
Developer API

6. Interaktywne artefakty

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.

json
{
  "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
SectionAccepted propertiesRuntime behavior
formenabled, title, description, triggerRules, fields, submitLabelLead capture and structured intake through show_form.
bookingenabled, title, description, triggerRules, services_enabled, meetings_enabled, requiresScheduling, timezone, slotDuration, bufferMinutes, workingHours, blockedDates, categories, services, meeting_intake_fields, submitLabelMeeting or service scheduling through show_booking; supplied values can be prefilled and exact requested slots are verified.
cardenabled, ctaLabel, ctaUrl, description, triggerRulesTransactional rich-card behavior when verified product data exists.
csat_surveyenabled, title, description, triggerRulesThumbs-up/down feedback through show_csat_survey.
customArray of enabled, name, type, description, triggerRules, schema, isCustomPlan-gated custom tool-backed artifacts.

Field schema

Field, Type / bounds, Effect
FieldType / boundsEffect
keystringStable machine key used by prefilled_data and requested_fields.
labelstringVisitor-facing label.
typeenumtext, email, tel, textarea, number, date, url, dropdown, radio, checkbox, slider, select, or location.
requiredbooleanBlocks submission until a valid value is supplied.
placeholderstring (max 200)Optional hint shown inside the control.
optionsstring[]Choices for dropdown, radio, and select controls.
min, max, stepnumberNumeric and slider bounds.
geo_scopeobjectLocation boundary: worldwide, continent, country, state, city, or custom; optional value and map bounds.

Booking service schema

Field, Type / bounds, Effect
FieldType / boundsEffect
id, name, descriptionstringStable service identity and visitor-facing copy.
durationminutesService duration; the configured slot duration is the fallback.
category, pricestringOptional filtering and display metadata.
routing.typeenumvirtual, physical, or phone.
routing.platformenumgoogle_meet, teams, or custom for virtual services.
routing.link, routing.addressstringDestination appropriate to the selected routing type.
intake_fieldsfield[]Service-specific information requested during booking.

Validation limits and scheduling rules

Field, Type / bounds, Effect
FieldType / boundsEffect
fields, meeting_intake_fields, intake_fieldsmax 50 eachEvery field needs a unique machine key, label, and supported type.
services / categoriesmax 100 eachService IDs should remain stable after clients begin storing them.
slotDurationinteger 5–480 minutesLength of generated calendar slots.
bufferMinutesinteger 0–1440 minutesUnavailable gap inserted around bookings.
timezoneIANA time-zone nameBusiness schedule zone, for example Europe/Paris; visitor times are converted for display and calendar invitations.
workingHoursseven day objectsEach enabled day uses 24-hour HH:mm and must end after it starts.
blockedDatesYYYY-MM-DD[] (max 366)Dates unavailable in the business time zone.
custommax 20Custom tools are plan-gated; names and types are required.

Tool-call prefill behavior

Field, Type / bounds, Effect
FieldType / boundsEffect
prefilled_dataobjectValues already learned in chat, keyed by configured field key.
requested_fieldsstring[]Show only the configured fields relevant to this intent.
modemeeting or serviceSelect the general meeting flow or a configured service flow.
selected_service_idstringPreselect a configured service; never invent an ID.
requested_categoriesstring[]Restrict the visible service list to configured categories.
preferred_start_time_isoISO-8601Ask the widget to verify one visitor-requested instant before showing approval.
Structured delivery for custom clients
Artifacts originate from model tool calls. Non-streaming chat responses include an 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.
PUT versus PATCH
PUT requires complete built-in sections and replaces the configuration. PATCH merges each supplied built-in section with the current normalized configuration. Unknown top-level sections are rejected.
Developer API

7. Konektory i narzędzia

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.

json
{
  "provider": "shopify",
  "name": "Shopify",
  "credentials": {}
}
  1. Install the workspace connector record with POST /api/assistants/:id/connectors; credentials must be omitted or {}.
  2. Read its exact field schema from GET /api/marketplace/connectors and activate it with POST /api/assistants/:id/connectors/:connectorId/activate.
  3. Send configValues, optional enabledTools, and optional instructions. Chirps verifies non-custom connectors and discovers the tools before saving the integration.
  4. Rotate secrets by calling the activation endpoint again. PUT only renames a named Custom API.
  5. Use DELETE /api/assistants/:id/connectors with { connectorId } to disable it for one assistant. Use the nested DELETE .../:connectorId only to permanently remove it from the workspace and every assistant.
Field, Type / bounds, Effect
FieldType / boundsEffect
configValuesobject (max 100 scalar values)Exact keys from the marketplace schema. Values are bounded and secrets are write-only.
enabledToolsstring[] (max 200)Optional allow-list of tools discovered from the verified connector.
instructionsstring (max 10,000)Assistant-specific constraints for tool use.
namestring (max 120)Optional rename during activation, supported only for named Custom APIs.
Credential handling
Connector secrets are write-only. API responses return safe metadata, never raw stored credentials. Use one least-privilege provider credential per integration. Remote SSE MCP and Custom API endpoints must use a publicly routable HTTPS URL; local and private-network targets are rejected.
Developer API

8. Integracja i wdrożenie

Po skonfigurowaniu i przeszkoleniu asystenta możesz go wdrożyć na dwa podstawowe sposoby:

Opcja A: osadzanie w sieci Web (frontend)

Najprostszy sposób na integrację asystenta ze standardową stroną internetową (WordPress, Shopify, React itp.). Kod osadzania jest czysto deterministyczny. Aby go pobrać, nie potrzebujesz punktu końcowego. Po prostu upuść to w <head> swojej witryny:

html
<script>
  window.chirpsConfig = { assistantId: "YOUR_ASSISTANT_ID" };
</script>
<script src="https://chirps.cc/embed.js" async></script>

Opcja B: Bezgłowe Integracje (Backend / CRM / Boty)

Jeśli tworzysz niestandardowego klienta (takiego jak bot Discord, integracja z Telegramem lub natywna aplikacja na iOS), NIE będziesz używać Web Embed. Zamiast tego będziesz mieć bezpośrednią interakcję z punktem końcowym /api/chat.

POST /api/chat lub /api/chat?stream=true

Ważne: wywołania headless i serwer-serwer muszą zawierać Authorization: Bearer <YOUR_CHIRPS_API_KEY>. Tylko zainstalowany widżet przeglądarkowy korzysta z publicznego przepływu powiązanego z origin. Nigdy nie umieszczaj klucza API w kodzie JavaScript frontendu.

json
{

  "assistantId": "123e4567-e89b-12d3-a456-426614174000",
  "sessionId": "unique-session-id-for-user",
  "conversationId": "optional-uuid",
  "message": "Hello, I need help with my billing."
}

*(Obsługuje również multipart/form-data z polem file dla załączników, jeśli fileUploadEnabled ma wartość true).*

Parametr, Typ, Wymagany, Opis
ParametrTypWymaganyOpis
assistantIdSmyczkowyTakUUID asystenta.
sessionIdSmyczkowyTakGenerujesz to. Unikalny identyfikator z Twojego własnego systemu do grupowania historii czatów (np. identyfikator użytkownika Discord, identyfikator czatu Telegram lub losowy identyfikator UUID).
messageSmyczkowyTakTreść tekstowa wiadomości (max 5000 znaków).
conversationIdSmyczkowyNIEUUID konwersacji (zwrócony w pierwszym żądaniu).
„identyfikator”.SmyczkowyNIEOpcjonalny identyfikator komunikatu po stronie klienta, aby zapobiec deduplikacji.

Tryb 1: Standardowa odpowiedź JSON (domyślnie)

Wysyłając żądanie POST do /api/chat (bez parametru stream), czekasz na pełną odpowiedź AI i otrzymujesz standardowy obiekt JSON.

json
{

  "message": "Here is the information you requested...",
  "conversationId": "uuid-of-conversation",
  "messageId": "uuid-of-message"
}

*(Jeśli zostanie zwrócone is_active_agent: true, oznacza to, że czat przejął człowiek, a message będzie miało wartość null.)*

Tryb 2: Przesyłanie strumieniowe zdarzeń wysyłanych przez serwer (?stream=true)

Dodając „?stream=true” do adresu URL, otrzymujesz strumień zdarzeń wysyłanych przez serwer (SSE) w czasie rzeczywistym. Twój kod powinien nasłuchiwać tych konkretnych typów zdarzeń:

  • `event: token`: Zawiera {"text": "chunk"}. Wywoływany dla każdego fragmentu tekstu odpowiedzi AI.
  • `event: status`: Zawiera {"text": "Searching knowledge base..."}. Reprezentuje stany wykonania narzędzia zaplecza.
  • `event: done`: Zawiera {"messageId": "uuid", "conversationId": "uuid", "message": "full text"}. Wywoływany po całkowitym zakończeniu generowania.
  • `event: error`: Zawiera {"error": "Error message"}. Uruchamiany w przypadku wystąpienia ograniczeń szybkości lub błędów.

Punkty końcowe przejęcia na żywo

GET /api/chat/sessions

Pobierz sesje historyczne.

POST /api/chat/toggle-agent

Wstrzymaj sztuczną inteligencję w celu przejęcia władzy przez ludzi. Ładunek: { "sessionId": "...", "isActive": true }

POST /api/chat/agent-messageść-agenta

Wyślij ludzką wiadomość. Ładunek: { "sessionId": "...", "message": "..." }

Complete chat response contract

json
{
  "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
EventPayload 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.
Enhanced streaming
Send 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.
Developer API

9. Zaawansowane ustawienia Asystenta

PATCH /api/assistants/:id

Zaktualizuj konfigurację rdzenia

Zmodyfikuj podstawowe ustawienia, osobowość i granice skrobania asystenta.

json
{

  "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
  }
}

*Uwaga: wszystkie pola są opcjonalne. Wysyłaj tylko te pola, które chcesz zaktualizować.*

Usuń Asystenta

DELETE /api/assistants/:id

Trwale usuwa asystenta i kaskadowo usuwa wszystkie węzły wiedzy, rozmowy i wiadomości. Jeśli asystent nigdy nie został w pełni skonfigurowany, zwracany jest miesięczny limit tworzenia.

Developer API

10. Telefonia i głos

GET /api/phone-numbers - Lista dostępnych numerów.

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 /api/assistants/:id/outbound - Uruchom połączenie wychodzące. Ładunek: { "phoneNumber": "+123...", "callReason": "Confirm the requested appointment", "conversationId": "optional-uuid" }

Developer API

11. Ekstrakcja leadów

GET /api/leads?assistantId=uuid&page=1&limit=50&status=new - Pobierz podzielone na strony i uporządkowane leady AI wyodrębnione podczas rozmów.

GET /api/leads?id=leadId - Pobierz szczegóły pojedynczego leada, łącznie z pełnym zapisem rozmowy.

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.

Developer API

12. Rezerwacje i kalendarz

GET /api/bookings?assistantId=uuid&start=ISO-8601&end=ISO-8601 - Pobierz spotkania z kalendarza zaplanowane przez asystenta, opcjonalnie filtrowane według daty.

GET /api/bookings?id=bookingId - Pobierz szczegóły pojedynczej rezerwacji, łącznie z transkrypcją rozmowy.

DELETE /api/bookings/cancel?id=bookingId - Anuluje aktywną rezerwację. Dodaj &silent=true tylko wtedy, gdy integracja celowo ma wyłączyć zapasową wiadomość e-mail o anulowaniu z Chirps.

POST /api/bookings/reschedule - Dostosuj rezerwację. Ładunek: { "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.

Developer API

13. Korzystanie z konta i rozliczeń

GET /api/billing/usage

Pobierz wykorzystanie cyklu rozliczeniowego obszaru roboczego, limity planu subskrypcji i łączną liczbę asystentów. Uwaga: w przypadku korzystania z klucza API żądanie jest automatycznie kierowane do obszaru roboczego klucza API; nie musisz podawać teamId.

Odpowiedź („200 OK”):

json
{

  "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"
}
Developer API

14. Pełny katalog endpointów

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.

Retries and idempotency
Only chat messages accept a stable client 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
MethodPathScopeRequestSuccessful result
GET/api/assistantsassistants:read—Assistant array; credential fields omitted
POST/api/assistantsassistants:writeAssistant creation JSONCreated assistant and setup identifiers
GET/api/assistants/:idassistants:read—Assistant configuration; secrets omitted
PATCH/api/assistants/:idassistants:writeSupported fields onlyUpdated assistant
DELETE/api/assistants/:idassistants:write—Deletion confirmation
GET/api/assistants/:id/setupassistants:read—Setup and crawl status
POST/api/assistants/:id/setupassistants:writeEmpty bodySSE setup progress stream
GET/api/analytics/overview?assistantId=:id&range=30analytics:readQuery: range 7–365Engagement, lead, booking and agent metrics

Knowledge and training

Method, Path, Scope, Request, Successful result
MethodPathScopeRequestSuccessful result
GET/api/assistants/:id/nodesknowledge:read—Knowledge node array
POST/api/assistants/:id/nodesknowledge:write{ title, refined_content, type?, metadata? }Stored and vectorized node
PATCH/api/assistants/:id/nodes/:nodeIdknowledge:write{ title?, refined_content?, is_active? }Updated and re-vectorized node
DELETE/api/assistants/:id/nodes/:nodeIdknowledge:write—Node deletion confirmation
POST/api/assistants/:id/nodes/:nodeId/re-crawlknowledge:writeEmpty bodyRefreshed URL node
POST/api/assistants/:id/nodes/uploadknowledge:writemultipart/form-data: file, title?Extracted knowledge node
POST/api/assistants/:id/nodes/deep-crawlknowledge:write{ maxPages? }SSE crawl progress stream
POST/api/assistants/:id/nodes/syncknowledge:writeEmpty bodyVector store synchronization result
POST/api/assistants/:id/trainknowledge:writeEmpty bodyCompiled assistant prompt
POST/api/assistants/:id/harvestknowledge:writeEmpty bodyConversation insights added to knowledge
POST/api/knowledge/urlsknowledge:writeDeprecatedAlways returns 410 with the assistant-scoped deep-crawl replacement path

Widget, artifacts and connectors

Method, Path, Scope, Request, Successful result
MethodPathScopeRequestSuccessful result
PATCH/api/assistants/:id/widget-configwidget:writePartial widget configurationNormalized widget configuration
POST/api/assistants/:id/widget-logowidget:writemultipart/form-data: file (PNG/JPEG/WebP, max 2 MB)Public logo URL
GET/api/assistants/:id/artifactsartifacts:read—Form, booking, card and CSAT configuration
PUT/api/assistants/:id/artifactsartifacts:writeComplete artifact configurationNormalized configuration
PATCH/api/assistants/:id/artifactsartifacts:writePartial artifact configurationMerged normalized configuration
GET/api/marketplace/connectorsconnectors:read—Installable connector definitions; no credentials
GET/api/assistants/:id/connectorsconnectors:read—Workspace connectors and assistant integrations
POST/api/assistants/:id/connectorsconnectors:write{ provider, name, credentials?: {} }Installed connector record; no operational access yet
PUT/api/assistants/:id/connectors/:connectorIdconnectors:write{ name } (named custom APIs only)Renamed connector; credentials omitted
DELETE/api/assistants/:id/connectorsconnectors:write{ connectorId }Connector disabled for this assistant only
DELETE/api/assistants/:id/connectors/:connectorIdconnectors:write—Workspace connector and all assistant integrations deleted
POST/api/assistants/:id/connectors/:connectorId/activateconnectors:write{ configValues, enabledTools?, instructions?, name? }Activated integration and tool list

Conversations, leads and bookings

Method, Path, Scope, Request, Successful result
MethodPathScopeRequestSuccessful result
POST/api/chat or /api/chat?stream=truechat:write{ assistantId, sessionId, message, conversationId?, id? }JSON reply with artifacts/sources or SSE token/artifacts/status/done events
GET/api/chat/sessions?assistantId=:idconversations:read—20 most recent session summaries
GET/api/assistants/:id/conversations?limit=20&status=activeconversations:readQuery: limit 1–50, status optionalConversation summaries
DELETE/api/assistants/:id/conversationsconversations:write{ conversationIds: [uuid] } (max 100)Deletion confirmation
POST/api/chat/toggle-agentconversations:write{ sessionId, isActive }Takeover state
POST/api/chat/agent-messageconversations:write{ sessionId, message }Stored human-agent message
POST/api/chat/typingconversations:write{ assistantId, sessionId, isTyping }Typing-state confirmation
POST/api/chat/followup-draftconversations:write{ conversationId|leadId, assistantId?, channel? }AI-generated draft; consumes AI-message usage
POST/api/chat/conversation-followupconversations:write{ conversationId|leadId, channel, recipient, subject?, message }Dispatched follow-up result
GET/api/leadsleads:readQuery: id, or assistantId with page, limit, statusLead detail with transcript or paginated leads; internal confirmation identifiers omitted
POST/api/leadsartifacts:writeArtifact submission JSONCaptured lead/booking result
PATCH/api/leadsleads:write{ leadId, status?, notes? }Updated lead
DELETE/api/leadsleads:write{ leadId } or { leadIds: [uuid] }Deletion count
GET/api/bookingsbookings:readQuery: id, or assistantId with start and endBooking detail or booking array; provider and idempotency identifiers omitted
DELETE/api/bookings/cancel?id=:idbookings:writeQuery: silent=true optionalCancellation and calendar-sync state
POST/api/bookings/reschedulebookings:write{ bookingId, newStartTime, newEndTime }Updated booking or available alternatives

Telephony and account

Method, Path, Scope, Request, Successful result
MethodPathScopeRequestSuccessful result
GET/api/phone-numberstelephony:read—Numbers and assignable assistants in this workspace
POST/api/phone-numbers/:subscriptionId/assigntelephony:write{ assistantId } or { assistantId: null }Routing update confirmation
POST/api/assistants/:id/outboundtelephony:write{ phoneNumber, callReason, conversationId? }Provider call SID and conversation ID
GET/api/billing/usagebilling:read—Workspace plan, limits and current usage
GET/api/metadata?url=:httpsUrlartifacts:readQuery: public HTTP(S) URLBounded page title, description and image metadata
Gotowy do rozpoczęcia?

Uruchom asystenta
za 10 minut.

Zarejestruj się, trenuj na swojej stronie, dostosuj alerty i umieść je na swojej stronie internetowej.