NEOBIZ_API to the HTTPS base URL for the provisioned environment.
See the object reference for JSON examples, field types, nullable values and customer identity.
Authentication and tokens
Request limits and retries
An API key has two independent one-minute budgets for the partner Inbox endpoints. The default is 120 reads across conversation, message and assignee lookups and 30 writes across replies and conversation actions. Each page of a list consumes one read. Applications sharing a key share its budgets. Replacing a key keeps its existing budgets. Owner subscription management and outbound webhook deliveries have separate request paths. When a budget runs out, Neobiz returns HTTP429 with {"error":"RATE_LIMIT_EXCEEDED"} and a Retry-After header in whole seconds. The handler has not executed. Pause the affected requests for at least that long, then resume gradually. Retry a reply with the same requestId, conversation and body. A higher ingress limit can also return 429 before authentication when many calls come from the same network peer. During a Redis outage, conversation, message and assignee reads continue with a smaller per-key allowance on each API host. Exhausting that allowance returns 429. Replies and conversation actions return 503 with RATE_LIMIT_UNAVAILABLE and Retry-After until the host can check the shared budget. Authentication and scope checks continue on every request.
For operators. Set ReadsPerMinute, WritesPerMinute and IngressPerMinute in the PartnerApi:RateLimits section on every API replica. Each value must be a positive integer. The ingress default is 1,200 attempts per minute per peer bucket on each host. Peers can share a bucket, particularly behind a reverse proxy. Configure the same ConnectionStrings:Redis and tenant database on all replicas to share credential counters. A single-host installation without Redis uses in-memory counters that reset on restart. Set MaxReplicas to the maximum number of API hosts that can serve partner traffic concurrently, including deployment overlap. The default of four gives each host 30 fallback reads per key per minute at the default 120-read limit. The allowance is floor(ReadsPerMinute / MaxReplicas). A zero allowance returns 503 for reads during an outage. Local and Redis windows can overlap during transitions, and restarting a host resets its local allowance.
While Redis is unavailable, each host waits five seconds before letting one partner request retry the shared quota check. Concurrent requests keep their outage limits while that check runs. A response from Redis restores shared enforcement, including when Redis reports the key is already over quota. Monitor the per-host gauge neobiz.partner_api.quota.degraded on the Neobiz.PartnerApi meter (1 during fallback, 0 otherwise).
Credential LastUsedAt is an approximate UTC time of successful authentication. The first use records it, and subsequent authentications refresh it at most once every five minutes. Revocation and permission checks still run on every request. An authenticated request can count as use even if its operation subsequently returns 429.
Set up an integration in the dashboard
Sign in as a tenant owner and open Settings → Integrations → API keys → Create API key. Give the application a name, expand each module and select its permissions. Each header shows the selections for that module. Inbox grants take effect when saved. Other module selections persist for future use and grant no API or webhook access today. Choose an Acting staff member when granting an Inbox write permission. Copy the key when issued. A read-only key can operate without a staff identity or a webhook. To receive events, open Webhooks → Add webhook, choose an active key with Read conversations, enter its public HTTPS endpoint, and select the Inbox events to receive. Each key supports one endpoint. Copy the signing secret when issued. Removing Read conversations stops subsequent deliveries, including queued retries. Restoring access enables future matching events. Use API keys to replace a lost key or revoke the integration. Revocation disables both API access and webhook delivery. Use Webhooks to edit the endpoint, send a test event or rotate its signing secret. Existing API keys are stored as hashes and cannot be displayed again. Replacing a key invalidates its predecessor immediately. Dashboard and API changes manage the same subscriptions. API keys screenshot · Webhooks screenshot · Inbox permissions · Inventory permissions · Webhook event pickerObtain or renew the owner token
An owner with a current Neobiz staff access token can go straight to registration. For a new staff session, the API exposes the following flow. Initial sign-in limitation: the staff OTP request currently creates a challenge without delivering the code to the owner. A fresh self-service sign-in depends on staff OTP delivery being available in the target environment.
Send these request bodies as
application/json. Once registration is complete, the integration can read and write using its API key independently of the owner’s session.
1 Register and test your webhook endpoint
For write permissions, choose an active Neobiz staff account to represent your integration. Neobiz attributes API replies and claims to this account. A dedicated account makes it easier to recognize replies sent by your application. The owner grants access across the tenant’s customer Inbox, including all locations and all three channels.subscriptionId, apiKey and webhookSecret. Give the integration backend the API key (shown below as INBOX_API_KEY) and the webhook receiver the signing secret. Store each in its respective secret store. Neobiz returns the plaintext values once. The callback destination must be a publicly reachable HTTPS endpoint. Use a different subscription for each environment.
For a cutover with overlapping keys, register a second subscription, switch the integration, and revoke the original. Both destinations can receive events during the overlap. For an immediate replacement, use
/rotate-key.
2 Receive and authenticate events
Neobiz POSTs JSON to your registered URL. Read the raw HTTP body before parsing it. Compute HMAC-SHA256 with the UTF-8 signing secret as the key and the original body bytes as the input. Compare the lowercase hexadecimal digest, prefixed withsha256=, with the X-Neobiz-Signature header using a constant-time comparison. The signed body contains the event type. X-Neobiz-Event repeats it for routing.
The Read conversations permission grants access to eligible history, including conversations and messages from before the key was issued. Webhooks start when the endpoint is activated. Adding an endpoint to an existing key, changing its destination, or restoring its read permission starts a new delivery window. Rotating the signing secret preserves that window. A new receipt or edit on an older message can produce
message.updated. Historical messages are never replayed as message.created.
Hosts learn about enrollment through the backplane. A host that misses an enrollment change can continue serving chat using its last confirmed subscriptions until it reconnects. To reconcile a gap, list conversations and fetch their current transcripts. Webhooks resume for new activity once the host has refreshed its subscriptions.
Webhook payloads contain references. Fetching message content separately returns the latest edit or withdrawal. Private notes, staff operations threads and preview chats are excluded. Imported history and campaign snapshot rows are available through public transcript reads but do not create live message triggers.
Receiver behavior. Verify the signature, durably enqueue the event keyed by eventId, then return any 2xx within 10 seconds. A repeated event ID should also receive 2xx. Events may arrive more than once or out of order. Neobiz retries timeouts, connection failures, 408, 429 and 5xx up to five total dispatches. Retries become eligible after 15, 30, 60 and 120 seconds respectively. During each delay Neobiz pauses the affected tenant’s queued callbacks so other tenants can receive theirs. Other unsuccessful HTTP responses end delivery to that subscription. For an outage exceeding retries, reconcile the conversation list and public transcripts. Checking current state also handles callbacks received in reverse order.
3 Read conversations and messages
To check the API key after registration, request the first page of conversations. A 200 response, including an emptyitems list, confirms the key can read the Inbox.
Legacy registrations that omit both
permissions and configuredPermissions require both a webhook URL and an operator and retain the original read/write scope bundle. Explicit grants reject unsupported scopes. Omit webhookUrl to create a key only.
For the fields returned by these endpoints, see Conversation, Customer identity, Message and Assignee.
Both list endpoints for conversations and messages return
{"items":[...],"next":null} with up to 100 items. If next is present, send it as ?after=<next> and keep any filters. Continue until next is null. For a full reconciliation, enumerate all conversation IDs and page their transcripts. A header’s update time alone cannot identify every edit or delivery receipt. Use the underlying conversation ID for each channel, including when the dashboard combines a member’s threads.
4 Send a reply and manage a chat
messageId and status. A replay can return 202 with Pending while the provider outcome is unknown. Retrieve the message to reconcile. If the transcript is edited, replay the original request text. Reusing the same request ID with changed text or a different conversation returns 409. Correlate the returned message ID with callbacks for your own writes to avoid feedback loops. Route automatic replies only from the customer events you intend to answer.
Neobiz applies the dashboard’s channel reply window, WhatsApp credit checks and human takeover behavior. The social channels’ extended human-agent window is for replies authored by people. This endpoint sends as the designated human operator. Use handoffToNeo to let Neo resume its own automated replies.
All commands below use POST /v1/inbox/conversations/{id}/actions and return 204 on success.
Errors. 400 indicates an invalid input, including a cursor or assignee. 401 means the key is missing, invalid or revoked. 403 indicates insufficient scope or an inactive designated operator on a write. 404 means the requested public resource is unavailable to this tenant. 409 covers a conflicting owner, concurrent update, closed messaging window, insufficient credit or failed send. Read the response’s
error field where supplied. Refresh the resource after a conflict. Keep the same request ID when checking an uncertain send.
5 Verify the integration together
- Register a test subscription in the agreed Neobiz environment and confirm its signed test event.
- Send a customer message and let Neo answer. Check that your receiver gets two distinct message IDs for the same conversation with author types
customerandai. - Claim the conversation, send one API reply twice with the same request ID and confirm a single human message in the customer’s channel. Assign it to a second operator and check the conversation update.
- Add a private dashboard note. Verify that it is absent from both the callback stream and the public transcript.
- Return 503 once, then acknowledge the retry. Confirm the event ID is stable. Rotate the secret, send another test, then revoke the test subscription and confirm that the old API key returns 401.