Skip to content

Developer reference · API version 1

Connect your business activity with confidence

One guide for activity data, BizPlifier Calendar, periodic synchronization, webhooks and CRM connections. Start with a small read-only integration, then expand the permissions you need.

Open API & IntegrationsOpenAPI JSON specification

1. Your first successful request

An API lets your server request structured business data. A webhook lets BizPlifier notify your server when activity changes. A CRM connector manages the authorization and mapping needed to send selected activity into your CRM.

  1. Open API & Integrations from your assistant dashboard.
  2. Check that the assistant and plan allow the resources you need. If access is unavailable on an eligible assistant, contact support.
  3. Create a credential, selecting an assistant and messages:read. Copy the secret once and store it in your server's secret configuration.
  4. Use your assistant's actual ID in the request below. All sample IDs in this manual are fictional.
  5. Check the HTTP status before processing the JSON. Honor Retry-After if you reach a limit.

API base URL: https://bizplifier.com/ai-assistant/api/v1/

export BIZPLIFIER_API_BASE='https://bizplifier.com/ai-assistant/api/v1/'
# Set BIZPLIFIER_API_KEY securely on your server. Replace 123 with an allowed assistant ID.
curl -i --get "${BIZPLIFIER_API_BASE}messages/" \
  -H "Authorization: Bearer $BIZPLIFIER_API_KEY" \
  --data-urlencode "assistant_id=123" --data-urlencode "page_size=50"

A successful list response looks like this:

{"data":[{"id":456,"resource":"messages","assistant_id":123,"subject":"Appointment enquiry","status":"new","message_text":"Please contact me about an appointment."}],"next_cursor":null,"checkpoint":"2026-10-24T10:00:00+00:00","checkpoint_ready":true}
API access has no separate BizPlifier charge on eligible plans. It does not include extra call minutes or unlock paid recording, calendar or Callback Agent features. Your external CRM or hosting service may have separate requirements or charges.

2. Plan eligibility and exact limits

PlanActivity accessIncoming and outgoing request budgetsDaily JSON allowance
StarterCalendar resources only, with an active calendar add-on. Existing eligible calendar writes remain available.New API: one every 300 seconds, at most two per rolling 600 seconds. No webhooks or CRM connectors.50,000,000 bytes
GrowthAll modules, read-onlyOne every 300 seconds, at most two per rolling 600 seconds. No managed webhooks or CRM connectors.50,000,000 bytes
ProAll modules; webhooks and managed CRM connectors. Controlled writes must be enabled for your assistant.Minimum gap of 60 seconds; at most three requests in any rolling 600 seconds, separately in each direction.200,000,000 bytes
EnterprisePro defaults with agreed custom limitsPro defaults, configurable200,000,000 bytes by default; configurable

The JSON body cap is 2,000,000 uncompressed bytes by default. Daily data usage includes incoming request bodies, API responses and outgoing integration request/response bodies. When a remote transfer fails before its response size can be confirmed, its reserved maximum is charged conservatively to prevent unaccounted transfers. It resets at 00:00 UTC. The dashboard displays your effective limits. Contact support if your business needs a different allowance. An owner can initially hold up to 10 active credentials and 10 connections; contact support if you need additional capacity.

Request counters are shared by the owner across credentials and assistants. Incoming API reads do not consume the outgoing delivery request budget, but both consume the shared daily data allowance. Requests spanning assistants use the most restrictive selected policy. Specify assistant_id to select a permitted assistant.

Example: Pro requests at 12:00, 12:01 and 12:02 fill the rolling window. A fourth request must wait until the oldest leaves that window. This service provides periodic synchronization; delivery may be delayed further by queued work or CRM errors.

Normal assistant calls, internal booking tools, payments, mobile features and dashboard operations do not consume this integration allowance. Existing trial calendar behavior is preserved; trials do not receive the new activity suite.

3. Credentials, ownership and permissions

Send the secret only in the HTTPS authorization header:

Authorization: Bearer YOUR_SERVER_SIDE_CREDENTIAL

If your Apache/proxy setup does not forward Authorization, send the same secret in X-BizPlifier-API-Key: YOUR_SERVER_SIDE_CREDENTIAL instead. Keep secrets out of query strings.

Credentials are scoped to assistants you own. Every request checks the current owner, granted assistants, scope, subscription and current access settings. A Pro credential cannot expose another account's data or unlock Starter activity modules. Credential revocation and expiry are checked on API requests. Outgoing work rechecks the connection, current owner and current plan permissions before delivery.

Available scopes:

  • interaction_flows:read
  • calls:read
  • messages:read
  • bookings:read
  • callbacks:read
  • calendars:read
  • calendar_events:read
  • recordings:read
  • messages:write
  • interaction_flows:write

Choose the read scopes for individual modules, or select all permitted modules for the suite. recordings:read also requires calls:read. Write scopes are optional and work only when the corresponding actions are enabled for your assistant.

Secrets are shown once. To rotate one: create a replacement, update the consuming application, verify it works, then revoke the old credential. Never put secrets in a URL, JavaScript bundle, WordPress shortcode, public repository or support screenshot. Keep the customer API credential separate from CRM OAuth credentials and webhook signing secrets.

4. Resources and response fields

Use GET resource/ for a list, GET resource/ID/ for one record, and an explicit assistant filter when needed. IDs are stable within their resource. Related IDs let you connect calls, messages, bookings and Interaction Flows. Internal supplier payloads, credentials and admin notes are excluded.

interaction_flows — interaction-flows/

Common fields: id, resource, assistant_id, created_at and updated_at.

Business fields: source_call_id, source_message_id, source_appointment_id, source_callback_request_id, caller_name, caller_phone, caller_email, status, priority, resolution_summary, not_solved_reason, current_summary, requires_action, last_activity_at.

GET https://bizplifier.com/ai-assistant/api/v1/interaction-flows/?assistant_id=123&page_size=50
GET https://bizplifier.com/ai-assistant/api/v1/interaction-flows/456/?assistant_id=123
calls — calls/

Common fields: id, resource, assistant_id, created_at and updated_at.

Business fields: caller_number, callback_phone, called_number, status, started_at, ended_at, duration_seconds, selected_language, summary_text.

GET https://bizplifier.com/ai-assistant/api/v1/calls/?assistant_id=123&page_size=50
GET https://bizplifier.com/ai-assistant/api/v1/calls/456/?assistant_id=123
messages — messages/

Common fields: id, resource, assistant_id, created_at and updated_at.

Business fields: call_id, caller_name, caller_phone, subject, message_text, priority, status.

GET https://bizplifier.com/ai-assistant/api/v1/messages/?assistant_id=123&page_size=50
GET https://bizplifier.com/ai-assistant/api/v1/messages/456/?assistant_id=123
bookings — bookings/

Common fields: id, resource, assistant_id, created_at and updated_at.

Business fields: call_id, message_id, status, caller_name, caller_phone, caller_email, booking_title, booking_addressed_to, booking_type, booking_request_description, start_at, end_at, timezone, duration_minutes, summary.

GET https://bizplifier.com/ai-assistant/api/v1/bookings/?assistant_id=123&page_size=50
GET https://bizplifier.com/ai-assistant/api/v1/bookings/456/?assistant_id=123
callbacks — callbacks/

Common fields: id, resource, assistant_id, created_at and updated_at.

Business fields: source_call_id, source_message_id, source_appointment_id, caller_name, caller_phone, callback_phone, request_text, scheduled_for_at, status, result, completed_at.

GET https://bizplifier.com/ai-assistant/api/v1/callbacks/?assistant_id=123&page_size=50
GET https://bizplifier.com/ai-assistant/api/v1/callbacks/456/?assistant_id=123
calendars — calendars/

Common fields: id, resource, assistant_id, created_at and updated_at.

Business fields: title, timezone, is_default, is_active, read_only_after.

GET https://bizplifier.com/ai-assistant/api/v1/calendars/?assistant_id=123&page_size=50
GET https://bizplifier.com/ai-assistant/api/v1/calendars/456/?assistant_id=123
calendar_events — calendar-events/

Common fields: id, resource, assistant_id, created_at and updated_at.

Business fields: calendar_id, appointment_id, title, start_at, end_at, timezone, description, location, source_type, status.

GET https://bizplifier.com/ai-assistant/api/v1/calendar-events/?assistant_id=123&page_size=50
GET https://bizplifier.com/ai-assistant/api/v1/calendar-events/456/?assistant_id=123

List parameters: assistant_id, page_size (1–100; default 50), since (timezone-aware ISO-8601), cursor, and status on resources that have a status. Calendar resource records describe BizPlifier calendars, not unrestricted access to every external calendar account.

Large text

List and detail responses may shorten large text. A response with truncated_fields includes a text_path. Use that endpoint to read an allowed text field in character segments. Save the record's updated_at and restart retrieval if it changes during segmentation.

GET https://bizplifier.com/ai-assistant/api/v1/messages/456/text/?assistant_id=123&field=message_text&offset=0&limit=10000
{"id":456,"field":"message_text","text":"...","next_offset":10000,"updated_at":"2026-10-24T10:00:00+00:00"}

Follow next_offset until it is null. Segments consume normal request and data allowance. Audio is never embedded in JSON.

5. Pagination, checkpoints and recovery

  1. Fetch the first page with your desired assistant, resource, status and optional since timestamp.
  2. Upsert returned records using the resource name and record ID.
  3. If next_cursor is present, request the next page with that cursor and exactly the same filters.
  4. Only after every page succeeds, save the final checkpoint.
  5. For the next synchronization, start without a cursor and use that saved value as since. The boundary is inclusive; deduplicate by ID and update time.

Pages may contain fewer records than requested to respect the byte limit. A cursor is bound to its credential, module, assistant selection and filters. Resource snapshot cursors expire after 24 hours; restart the snapshot if one expires. Records updated after a snapshot boundary appear in the next incremental run.

One feed for multiple modules

GET https://bizplifier.com/ai-assistant/api/v1/activity/?assistant_id=123&modules=calls,messages,bookings&page_size=50

The activity feed returns stable event_id values, event names, occurrence times and the current permitted record state. Deletions have data: null. Store the returned next_cursor and use it on the next poll. Feed events are captured after API activation; use resource snapshots for historical data. For reliable initial synchronization, begin saving the activity cursor before importing snapshots, then catch up from that cursor without a timestamp filter. Continue polling that cursor for ongoing changes and deletions. Timestamp-only resource polling cannot detect deletions or every late-committing transaction.

Event history defaults to 30 days; your agreed retention settings may differ. Checkpoints expire with the retention policy. After a prolonged outage or expired cursor, rebuild from resource snapshots. A stale event whose source record no longer exists will not restore deleted content.

6. Calendar REST API, ICS feeds and portals

The unified API exposes calendars/ and calendar-events/ with the same ownership, pagination and quota rules as other modules. Appointments remain under bookings/: an appointment and its calendar event are related records, not two independent bookings.

Existing calendar access links remain available. Their credentials are specific to one calendar and are not valid as unified activity credentials. Create, revoke or regenerate them in the Calendar workspace. A calendar REST token can have read or write permission; an ICS feed or portal token has its own access type.

Existing accessPurposePath pattern
RESTRead events; permitted manual-event writes/ai-assistant/calendar/access/rest/TOKEN/
ICSSubscribe in a calendar application/ai-assistant/calendar/access/ics/TOKEN/calendar.ics
PortalOpen an authorized calendar page/ai-assistant/calendar/access/portal/TOKEN/

These existing links contain credentials: treat the entire link as a secret. Do not replace or alter the token manually. New unified credentials use authorization headers.

Read a calendar through existing REST access

curl --get 'YOUR_CALENDAR_REST_URL' \
  --data-urlencode 'date_from=2026-10-24' \
  --data-urlencode 'date_to=2026-10-31'

Create a manual calendar event through an existing write-enabled REST link

curl -X POST 'YOUR_CALENDAR_REST_URL' \
  -H 'Content-Type: application/json' \
  --data '{"action":"save_manual_event","title":"Team meeting","start_at":"2026-10-26T09:00:00+01:00","end_at":"2026-10-26T09:30:00+01:00","timezone_name":"Europe/Berlin"}'

To update a manual event, include its event_id. To delete one, send {"action":"delete_manual_event","event_id":456}. These operations preserve current calendar write permissions, including eligible Starter access. A read-only calendar or expired calendar entitlement still blocks writes. These manual-event operations do not replace the assistant's appointment availability and booking tools.

Legacy REST and ICS may share your incoming API request and data allowance. Honor any 429 response and its Retry-After header. The original REST response is not paginated; reduce its date range or use the unified API if it exceeds your payload limit. Contact support if you need help confirming the limits for an existing calendar connection.

For complete calendar connection, sharing, lifecycle and portal instructions, open the Calendar workspace guide. Its existing URL is preserved.

7. Recording metadata and authenticated links

With both calls:read and recordings:read, a call can include recording availability, permitted playback/download capabilities and an internal authenticated download path. The link expires after 15 minutes. The recipient must sign in as the credential owner and still have access to the assistant and recording.

A private or coded identifier does not grant access by itself. Existing recording add-on, retention and plan rules remain authoritative. Starter continues to use its existing download-only recording behavior. There are no audio blobs, anonymous recording links or supplier storage URLs in this API.

Resolve the returned recording path against the BizPlifier API server origin. The first release does not provide automated audio export. Existing dashboard downloads retain their current behavior and are not silently changed into integration transfers.

8. Webhooks: secure periodic delivery

  1. Use a Pro or Enterprise assistant with webhooks enabled.
  2. Open API & Integrations and create a Webhook connection.
  3. Enter a public HTTPS receiver on port 443. Redirects, private-network destinations and embedded URL credentials are rejected.
  4. Select the modules you want to receive and copy the signing secret once.
  5. Return a successful 2xx response only after accepting the delivery safely. Process the data asynchronously in your application.

Deliveries batch up to 50 activity notifications when possible. Each event includes event_id, event, assistant_id, object_id, occurred_at and data. Names include messages.created, bookings.updated, calls.recording_ready and calendar_events.deleted. Notifications contain current permitted record state, not a permanent historical copy.

Verification headers: X-BizPlifier-Delivery, X-BizPlifier-Timestamp and X-BizPlifier-Signature. Verify HMAC-SHA256 over TIMESTAMP + "." + EXACT_RAW_BODY using your connection secret. Reject stale timestamps, invalid signatures and malformed envelopes. Persist event IDs to suppress duplicate processing. Retries retain event IDs and can arrive after later notifications. Event IDs are stable identifiers, not synchronization positions: keep the returned opaque cursor so updates committed out of order are still received. New connections deliver changes created after the connection was set up; use resource snapshots for earlier data.

// Node.js verification inside your HTTPS receiver; rawBody must be the original Buffer.
import crypto from 'node:crypto';
const timestamp = req.headers['x-bizplifier-timestamp'];
const signature = req.headers['x-bizplifier-signature'] || '';
if (!/^\d+$/.test(timestamp || '') || Math.abs(Date.now()/1000 - Number(timestamp)) > 300)
  return res.sendStatus(401);
const expected = crypto.createHmac('sha256', process.env.BIZPLIFIER_WEBHOOK_SECRET)
  .update(timestamp + '.').update(rawBody).digest();
if (!/^[a-f0-9]{64}$/.test(signature) ||
    !crypto.timingSafeEqual(expected, Buffer.from(signature, 'hex')))
  return res.sendStatus(401);
// Atomically accept/deduplicate event IDs in durable storage, then acknowledge.
res.sendStatus(204);

Retries consume outgoing allowance. A limited delivery waits rather than sending immediately. Repeated failures eventually stop and remain visible for recovery. Queue capacity and event retention are bounded; a lengthy outage may require a fresh snapshot. Pause a connection to stop delivery, then resume it when ready. Replays use normal quotas.

To rotate a webhook signing secret in this release, create a replacement connection, update the receiver, verify the new connection, then pause the old one. Use event IDs to deduplicate any overlap.

9. Connect the five supported CRMs

Native connections are available on Pro and Enterprise. Growth applications may read data and implement their own CRM integration. Native connectors send selected BizPlifier activity to CRM contacts and notes/tasks; they do not change your assistant's knowledge, booking policy, phone configuration or billing.

  1. Open API & Integrations and choose the assistant, CRM and activity modules for your connection.
  2. Use Connect CRM to authorize the correct CRM account. Review the CRM's permission screen before approving.
  3. Check the connection status and send a controlled test activity containing a caller email or phone.
  4. Verify contact matching and the resulting activity in the CRM before enabling routine use.

If a CRM is unavailable or the connection asks for platform setup, contact support. You do not need to register a BizPlifier OAuth application or enter its client credentials.

CRMWhere your activity appears
HubSpotContact and associated note
SalesforceContact and completed Task
Zoho CRMContact and related Note
PipedrivePerson and associated Note
Microsoft Dynamics 365Contact and annotation

CRM notes contain a summary of up to 12,000 characters and an authenticated link to the original BizPlifier record; shortened content is explicitly marked. Contacts are matched using email when present, otherwise phone. Existing matches are reused. Contact IDs are retained per connection to reduce repeated lookups. A record without caller email or phone cannot create a contact and needs operator attention. Calendar resources are delivered through webhooks/API; native CRM contact activity uses calls, messages, bookings, callbacks and Interaction Flows.

The default contact mapping uses name, email and phone. Optional crm_fields maps your CRM's custom field names to these business values:

{"crm_fields":{"Custom_Phone__c":"phone","Custom_Name__c":"name"}}

Allowed values are name, first, last, email and phone. CRM field names must match your actual schema. Required custom fields or permissions can prevent a write; verify them in the CRM test account.

Each remote HTTP request, including authorization/refresh, uses outgoing request/data allowance. A lookup, contact creation and activity creation can therefore span several quota slots. CRM 429/temporary errors are delayed. If a write's result cannot be confirmed, it enters review instead of blindly retrying and creating duplicates. Check the CRM first, then confirm a replay in the dashboard.

After connecting, verify contact matching and the resulting activity in your CRM before relying on routine synchronization. Contact support if authorization or delivery needs attention. New connections begin with future captured events; use the API snapshots for historical imports. Two-way synchronization and automatic opportunity creation are not part of this release.

10. Server-side examples for nine stacks

Set BIZPLIFIER_API_BASE to https://bizplifier.com/ai-assistant/api/v1/ and supply your credential using server-side secret configuration. Run synchronizers in background jobs, not inside web page requests. These examples show a first request; the Python example also demonstrates pagination. Apply the same cursor and 429 handling in your chosen stack. Authenticate your own application's users before exposing any business data.

Python / Django
# Run on your Django server; keep the key in the environment.
import os, time, requests
url = os.environ["BIZPLIFIER_API_BASE"] + "messages/"
params = {"assistant_id": 123, "page_size": 50}
while True:
    r = requests.get(url, params=params,
        headers={"Authorization": "Bearer " + os.environ["BIZPLIFIER_API_KEY"]}, timeout=20)
    if r.status_code == 429:
        time.sleep(int(r.headers.get("Retry-After", "300"))); continue
    r.raise_for_status()
    page = r.json()
    for record in page["data"]:
        pass  # Upsert in your application by record['id']; do not log caller data.
    if not page["next_cursor"]:
        checkpoint = page["checkpoint"]  # Save only after every page succeeds.
        break
    params["cursor"] = page["next_cursor"]
Node.js / Express
// Server-side Node.js. Never return your key to a browser.
const url = new URL('messages/', process.env.BIZPLIFIER_API_BASE);
url.searchParams.set('assistant_id', '123');
const response = await fetch(url, {
  headers: { Authorization: `Bearer ${process.env.BIZPLIFIER_API_KEY}` },
  signal: AbortSignal.timeout(20000)
});
if (response.status === 429) {
  const seconds = Number(response.headers.get('retry-after') || 300);
  // Schedule your next job after seconds; do not immediately retry.
} else if (!response.ok) { throw new Error(`API HTTP ${response.status}`); }
else { const page = await response.json(); /* process page.data */ }
Next.js
// app/api/assistant-messages/route.ts — server-only route.
export async function GET() {
  // First authenticate your own user and check their access to this assistant.
  const url = new URL('messages/', process.env.BIZPLIFIER_API_BASE!);
  url.searchParams.set('assistant_id', '123');
  const upstream = await fetch(url, { cache: 'no-store',
    headers: { Authorization: `Bearer ${process.env.BIZPLIFIER_API_KEY}` } });
  if (upstream.status === 429) return Response.json(
    { error: 'Try later' }, { status: 429,
    headers: { 'Retry-After': upstream.headers.get('Retry-After') || '300' } });
  if (!upstream.ok) return Response.json({ error: 'API request failed' }, { status: upstream.status });
  return Response.json(await upstream.json(), { headers: { 'Cache-Control': 'private, no-store' } });
}
PHP / Laravel
// Run in a server-side service or queued Laravel job.
$response = Http::withToken(config('services.bizplifier.key'))
    ->timeout(20)->get(config('services.bizplifier.base').'messages/',
        ['assistant_id' => 123, 'page_size' => 50]);
if ($response->status() === 429) {
    $seconds = (int) $response->header('Retry-After');
    // Release this queued job with a delay of $seconds.
} else {
    $response->throw();
    $page = $response->json(); // Upsert $page['data']; follow next_cursor.
}
C# / ASP.NET Core
// Server-side service; inject IHttpClientFactory in a real application.
using var client = new HttpClient { Timeout = TimeSpan.FromSeconds(20) };
client.DefaultRequestHeaders.Authorization =
    new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer",
        Environment.GetEnvironmentVariable("BIZPLIFIER_API_KEY"));
var baseUrl = Environment.GetEnvironmentVariable("BIZPLIFIER_API_BASE");
using var response = await client.GetAsync(baseUrl + "messages/?assistant_id=123");
if ((int)response.StatusCode == 429) {
    var delay = response.Headers.RetryAfter?.Delta;
    // Schedule a retry after this delay.
} else {
    response.EnsureSuccessStatusCode();
    var json = await response.Content.ReadAsStringAsync();
    // Deserialize data/next_cursor; persist your checkpoint only after all pages.
}
Java
// Java 11+; server-side job.
var client = java.net.http.HttpClient.newHttpClient();
var request = java.net.http.HttpRequest.newBuilder()
    .uri(java.net.URI.create(System.getenv("BIZPLIFIER_API_BASE") + "messages/?assistant_id=123"))
    .timeout(java.time.Duration.ofSeconds(20))
    .header("Authorization", "Bearer " + System.getenv("BIZPLIFIER_API_KEY"))
    .GET().build();
var response = client.send(request, java.net.http.HttpResponse.BodyHandlers.ofString());
if (response.statusCode() == 429) {
    String seconds = response.headers().firstValue("Retry-After").orElse("300");
    // Reschedule using seconds.
} else if (response.statusCode() != 200) {
    throw new IllegalStateException("API HTTP " + response.statusCode());
} // Parse response.body(); upsert records and follow next_cursor.
Ruby
require 'net/http'
require 'json'
uri = URI(ENV.fetch('BIZPLIFIER_API_BASE') + 'messages/?assistant_id=123')
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'Bearer ' + ENV.fetch('BIZPLIFIER_API_KEY')
response = Net::HTTP.start(uri.host, uri.port, use_ssl: true,
  open_timeout: 5, read_timeout: 20) { |http| http.request(request) }
if response.code == '429'
  seconds = response['Retry-After'].to_i # Reschedule the job.
elsif response.code == '200'
  page = JSON.parse(response.body) # Upsert data, then follow next_cursor.
else
  raise "API HTTP #{response.code}"
end
Go
// Inside your server-side job function.
client := &http.Client{Timeout: 20 * time.Second}
req, err := http.NewRequest("GET", os.Getenv("BIZPLIFIER_API_BASE")+"messages/?assistant_id=123", nil)
if err != nil { return err }
req.Header.Set("Authorization", "Bearer "+os.Getenv("BIZPLIFIER_API_KEY"))
res, err := client.Do(req)
if err != nil { return err }
defer res.Body.Close()
if res.StatusCode == 429 {
    retryAfter := res.Header.Get("Retry-After")
    _ = retryAfter // Reschedule your job after this many seconds.
    return nil
}
if res.StatusCode != 200 { return fmt.Errorf("API HTTP %d", res.StatusCode) }
// Decode bounded JSON into your application's data/next_cursor/checkpoint structure.
// Imports: net/http, os, time, fmt.
WordPress
// Server-side plugin code, triggered by a scheduled job or authorized admin.
// Store secrets in server configuration, not in shortcode output or JavaScript.
$response = wp_remote_get(getenv('BIZPLIFIER_API_BASE').'messages/?assistant_id=123', [
    'headers' => ['Authorization' => 'Bearer '.getenv('BIZPLIFIER_API_KEY')],
    'timeout' => 20,
]);
if (is_wp_error($response)) { return; }
$status = wp_remote_retrieve_response_code($response);
if ($status === 429) {
    $delay = (int) wp_remote_retrieve_header($response, 'retry-after');
    // Use WP-Cron to schedule a retry; do not loop inside a page request.
    return;
}
if ($status !== 200) { return; }
$page = json_decode(wp_remote_retrieve_body($response), true);
// Upsert $page['data']; store and follow next_cursor in the scheduled job.

11. Controlled write actions

The new API is read-only by default. Controlled actions are available only when enabled for your Pro or Enterprise assistant. A credential must also explicitly contain the corresponding write scope. Every write requires an Idempotency-Key, so a retry of the same request can return its prior result without repeating the change. Reusing a key with different content returns 409. Successful writes return a minimal ID/status acknowledgement; use an explicit read scope to retrieve business content. Write receipts follow the configured integration retention period; do not reuse old keys for different operations.

POST https://bizplifier.com/ai-assistant/api/v1/messages/456/?assistant_id=123
Authorization: Bearer YOUR_CREDENTIAL
Content-Type: application/json
Idempotency-Key: my-system-message-456-seen-v1

{"status":"seen"}

Supported message statuses: new, seen, resolved.

POST https://bizplifier.com/ai-assistant/api/v1/interaction-flows/789/?assistant_id=123
Idempotency-Key: case-789-solved-v1

{"action":"solve","note":"Customer enquiry completed.","resolution_summary":"The customer received the requested information."}

reopen requires an explanatory note. Existing ownership and Interaction Flow business services remain authoritative. Calls, callbacks, bookings, provisioning, purchases and arbitrary model updates cannot be initiated through these new write endpoints. Existing calendar REST writes retain their separate permissions. New unified booking/calendar writes are reserved for a later reviewed extension.

12. Troubleshooting and safe recovery

400 — invalid request
Check the JSON object, numeric parameters, ISO timestamp and signed cursor. Keep filters unchanged while paging.
401 — authentication required
Supply a valid bearer credential. Check expiry and revocation; a calendar token is not an activity API credential.
403 — access denied
Check the assistant ID, selected scopes, current plan and the actions available for your assistant. Enabling a scope cannot override plan permissions.
404 — not found
The record is unavailable within the credential's granted scope. Do not attempt to guess another account's IDs.
409 — idempotency conflict
Use a new key for a different write. Keep the original key and exact body when retrying the same write.
410 — expired cursor
Restart synchronization from a fresh resource snapshot. An activity cursor cannot recover events beyond the configured retention window.
413 / 422 — size limit
Reduce request size, page size or legacy calendar date range. Retrieve large text in segments. Do not repeatedly retry an unchanged oversized request.
429 — request or daily data limit
Read the Retry-After header, save progress and reschedule. Creating another credential does not increase the shared allowance.
503 — setup unavailable
API access is temporarily unavailable. Contact support if the issue continues; avoid repeatedly retrying the same request.
CRM paused / review
Reconnect expired authorization or correct field permissions. Review uncertain writes in the CRM before replaying. Replays consume normal quotas.

The API returns Cache-Control: private, no-store. Protect any data your integration stores according to your organization's access and retention policies. Revoking a credential prevents future access but cannot erase data already copied to another system.