Connected Websites API
Everything a developer needs to connect a site or app to NEXTOSA: authentication, the APIs NEXTOSA hosts, the endpoints you host, signed commands, errors and limits. New to the idea? Start with the overview.
Overview
An integration runs in one of two directions. Your site to NEXTOSA uses APIs NEXTOSA hosts: live chat, events, product sync and the Booking API. NEXTOSA to your site uses endpoints you host and map on the connection: NEXTOSA calls them when an AI agent or automation needs live data.
https://YOUR-NEXTOSA-SERVER, YOUR_CONNECTION_ID and YOUR_ORGANIZATION_ID as placeholders. Inside NEXTOSA, on Connected Websites, the Developer Hub shows the real values for the connection you pick, ready to copy.Authentication
Each connected website has its own inbound API key. Generate it on Connected Websites with Generate Inbound API Key. It is shown once, so store it in an environment variable on your server. Regenerating it invalidates the old key immediately.
Send it as x-api-key. The Booking API also accepts Authorization: Bearer KEY; the Events and Product sync endpoints accept only x-api-key.
| Credential | Where you set it | Used for |
|---|---|---|
| Inbound API key | Generated in NEXTOSA. Shown once. | Your calls to the Booking API, Product sync and Events. It also signs (HMAC) every command and webhook NEXTOSA sends you. |
| Connection headers | You enter them on the connection, for example Authorization: Bearer ... | Sent by NEXTOSA on every call to the endpoints you host. |
| Session id | Nothing to set up. | The live chat API, which uses your organization id plus the visitor's session id. |
Calls NEXTOSA makes to endpoints you host are not signed: protect them with the connection headers. Only commands and webhooks sent to your Outbound webhook URL carry x-nextosa-signature.
Limits
| What | Limit | Applies to |
|---|---|---|
| Booking API, reads | 120 per minute | per connection |
| Booking API, writes | 30 per minute | per connection |
| Events and product sync | 30 per minute | per connection, shared by both |
| Live chat | 15 per minute | per visitor IP, shared by the three chat endpoints |
| Request bodies you send | about 100 KB | per request |
| Endpoints you host | 8 second timeout, first 20,000 characters read | per call; public https addresses only |
Going over a rate limit returns 429. Wait a moment and retry. Failed authentication attempts count toward the limit too.
Error conventions
- Booking API: JSON
{ "error": "...", "details": { "code": "..." } }. Branch ondetails.code, not the message. Full table under the Booking API. - Events and product sync: authentication failures (
401,403,404) return the status code only, with no JSON body. Product sync validation errors return JSON. - Live chat: JSON
{ "error": "..." }.
Live chat
Three ways to get a visitor into NEXTOSA as a lead. The live chat is hosted by NEXTOSA and called straight from the visitor's browser: the visitor gives an email, becomes a real contact, and chats with your AI assistant.
sessionId it returns is the visitor's only credential, so treat it like a secret and do not log it. Limit: 15 requests per minute per visitor IP, shared across the three chat endpoints.Start a chat session
POST/api/public/ai-chat/sessionStarts a conversation for one visitor. Their email makes them a lead: an existing contact with that email is matched, otherwise a new contact is created (source: web chat) using the name you send, or "Website Visitor".
Body
| organizationIdrequired | string | Your NEXTOSA organization id. |
| emailrequired | string | The visitor's email. Stored lowercase. |
| name | string (max 200) | The visitor's name. |
| connectionId | string | Strongly recommended. Tags the lead, and any deal or appointment the assistant creates in the chat, with this website. A wrong id is rejected rather than ignored. |
Returns 201 with sessionId. Errors: 400; 404 for an unknown organization or an unknown connectionId (details.code: UNKNOWN_CONNECTION); 403 if the connection is switched off (CONNECTION_DISABLED); 429.
connectionId is a label your page supplies: a determined visitor could send a different one of your connection ids. When attribution must be tamper-proof, send the lead from your server as an event instead.curl -X POST "https://YOUR-NEXTOSA-SERVER/api/public/ai-chat/session" \
-H "content-type: application/json" \
-d '{"organizationId":"YOUR_ORGANIZATION_ID","email":"asha@example.com","name":"Asha Verma","connectionId":"YOUR_CONNECTION_ID"}'{
"sessionId": "cmvq7k2x90002uk0c4a5b6c7d"
}Send a chat message
POST/api/public/ai-chat/messageSends the visitor's message and waits for the assistant's reply, returned as plain text. Replies can take a few seconds, so show a typing indicator.
Body
| organizationIdrequired | string | Your organization id. |
| sessionIdrequired | string | From Start a chat session. |
| messagerequired | string (1-4000) | What the visitor typed. |
Returns 200 with the reply's id and content. Errors: 400, 404 Chat session not found, 429.
curl -X POST "https://YOUR-NEXTOSA-SERVER/api/public/ai-chat/message" \
-H "content-type: application/json" \
-d '{"organizationId":"YOUR_ORGANIZATION_ID","sessionId":"SESSION_ID","message":"Do you have a 3BHK available?"}'{
"id": "cmvq7k2x90003uk0c8d9e0f1a",
"content": "Yes - we have two 3BHK units open right now. Would you like details?"
}Chat history
GET/api/public/ai-chat/session/:sessionId/messagesReturns the visible conversation so far, for restoring the chat after a page reload. Only the visitor's messages and the assistant's replies are included. Pass organizationId as a query parameter.
Returns 200. Errors: 400, 404 Chat session not found, 429.
curl "https://YOUR-NEXTOSA-SERVER/api/public/ai-chat/session/SESSION_ID/messages?organizationId=YOUR_ORGANIZATION_ID"Two more ways to capture a lead: post a form submission from your server as an event (next section), and, for Simple Website and Portfolio sites, map a Form submissions endpoint that NEXTOSA reads on demand (see Endpoints you host).
Send an event
Send an event
POST/api/webhooks/connected-apps/:connectionIdPosts one event from your server. NEXTOSA resolves the contact, then starts every active automation whose Connected software event trigger points at this connection, each as its own durable run. Works for every category.
X-Event-Id: <your id> (or Idempotency-Key), for example your own lead or order id. NEXTOSA runs each id once per 24 hours: a retry or replay with the same id is acknowledged with 200 but not processed again, so your automations never fire twice. Without an id there is no deduplication, so a retry runs the automation again. Ids can be up to 200 characters and are scoped to this connection.Headers
| x-api-keyrequired | header | This connection's API key. A Bearer header is not accepted here. |
| X-Event-Id | header | Your unique id for this event (or send Idempotency-Key). Max 200 characters. |
| Content-Type | header | application/json |
Body (a JSON object)
| phone | string | Identifies the contact. Send international format, for example +919876543210. It must match how the contact is stored to find them; anything else creates a new lead. |
| contactId | string | A NEXTOSA contact id, if you have one. Takes priority over phone. |
| name | string (max 200) | Saved on a new lead or a contact with no real name yet. Never overwrites a name already on record. |
| string | Saved lowercase when the contact has none. Never replaces an existing one. Ignored if it is not a valid address. | |
| eventType | string (max 100) | Your own label, for example lead.created or order.paid. An automation can be set to run only for one eventType. |
| (any other fields) | any | Passed through untouched to your automations as {{trigger.payload.fieldName}}. The event label is {{trigger.eventType}}. |
You must send phone or contactId: with neither, the event is acknowledged but nothing runs. An automation with an eventType filter only runs for events carrying exactly that value; one with no filter runs for every event on the connection.
Returns 200 (plain OK) once authenticated, even if processing fails internally (that is logged on NEXTOSA's side so your sender does not needlessly retry). 401 wrong key, 403 connection off, 404 unknown connection or no key generated (status only, no body), 429 rate limited.
curl -X POST "https://YOUR-NEXTOSA-SERVER/api/webhooks/connected-apps/YOUR_CONNECTION_ID" \
-H "x-api-key: $NEXTOSA_API_KEY" \
-H "x-event-id: lead-10234" \
-H "content-type: application/json" \
-d '{"eventType":"lead.created","phone":"+919876543210","name":"Asha Verma","email":"asha@example.com","message":"Interested in the 3BHK on Lake Road","source":"contact-form"}'Receive commands
When an automation runs Send command to connected software, NEXTOSA POSTs to the Outbound webhook URL you set on the connection. The command name is whatever the automation's author chose (NEXTOSA has no fixed list) and the rest of the body is the payload they wrote.
{
"command": "assign_plan",
"userId": "usr_204",
"plan": "pro"
}Headers
| x-nextosa-signaturerequired | header | HMAC-SHA256 of the raw body, signed with this connection's API key, as sha256=<hex>. Always verify it. |
| Idempotency-Key | header | Stable for one automation step, even if it is re-run. Use it to skip a command you already handled. |
| Content-Type | header | application/json |
import crypto from "node:crypto";
import express from "express";
const app = express();
// Verify against the RAW body: re-serialized JSON will not match the signature.
app.post("/nextosa-commands", express.raw({ type: "application/json" }), (req, res) => {
const expected =
"sha256=" + crypto.createHmac("sha256", process.env.NEXTOSA_API_KEY).update(req.body).digest("hex");
const given = req.header("x-nextosa-signature") ?? "";
const valid = given.length === expected.length && crypto.timingSafeEqual(Buffer.from(given), Buffer.from(expected));
if (!valid) return res.sendStatus(401);
const { command, ...params } = JSON.parse(req.body.toString("utf8"));
// Skip commands you already handled: req.header("idempotency-key")
res.json({ ok: true }); // reply 2xx within 8 seconds
});https:// and public. Reply with a 2xx within 8 seconds: a JSON reply is handed to the next automation step; a non-2xx reply or a timeout marks that step as failed. Nothing is sent until you have generated an API key for the connection, since it signs every command.Product sync (E-Commerce)
Your store pushes its catalog into NEXTOSA, and the WhatsApp AI Sales Agent then answers product, price and stock questions from real data. Link the connection to a WhatsApp number to turn this on; only one connected store can have it on at a time.
Sync products
POST/api/webhooks/sync-products/:connectionIdProducts are matched on your own externalProductId, so sending a product again updates it instead of duplicating it. Products you leave out of a request are left as they are: sync never deletes. Authenticate with x-api-key from your store's server, on each change or on a schedule.
Body
| productsrequired | array (1-500) | The products to create or update. |
Each product
| externalProductIdrequired | string (1-200) | Your store's own product id: the update key. |
| namerequired | string (1-300) | Product name. |
| pricerequired | number (0 or more) | Unit price. |
| currency | string (3 letters) | ISO currency code, for example INR or USD. Defaults to INR. |
| inventory | integer or null | Stock on hand. null means you do not track stock; 0 means genuinely out of stock, and the AI says so rather than offering it. |
| description | string (max 5000) | Shown to the AI so it can describe the product. |
| imageUrl | string (URL) | Product image URL. |
| sku | string (max 200) | Your SKU. |
Returns 200 with { "ok": true, "synced": N }. Errors: 400 (JSON, error: "Invalid request" with details.fieldErrors); 401 wrong key, 403 connection off, 404 unknown connection or no key (status only); 429.
curl -X POST "https://YOUR-NEXTOSA-SERVER/api/webhooks/sync-products/YOUR_CONNECTION_ID" \
-H "x-api-key: $NEXTOSA_API_KEY" \
-H "content-type: application/json" \
-d '{"products":[{"externalProductId":"sku-1001","name":"Linen Shirt","description":"Breathable linen, relaxed fit.","price":1499,"currency":"INR","inventory":12,"sku":"LS-1001","imageUrl":"https://cdn.example.com/ls-1001.jpg"}]}'{
"ok": true,
"synced": 1
}Booking API
Hosted by NEXTOSA. Your site reads open slots and books straight into the Upcoming column, and double-booking is prevented. Base URL:
https://YOUR-NEXTOSA-SERVER/api/public/v1/booking/YOUR_CONNECTION_IDPrerequisites on the NEXTOSA side: online booking availability is switched on (opening hours set) in the Online Booking Availability card on Connected Websites, the connection has an inbound API key, and its Booking API switch is on.
How availability works
- Slots sit on a grid (for example every 30 minutes) anchored to midnight in the business's timezone, within its weekly opening hours. An appointment must finish by closing time.
- The business sets a minimum notice and a booking window. Times outside them are never offered.
- Capacity is how many appointments may overlap. A slot is open while fewer than that many active appointments occupy it.
- Upcoming, in-progress and pending-approval appointments all count, including ones the team typed in by hand and bookings from other connected websites. Back-to-back appointments do not conflict.
GET /availabilityis a preview. The real decision happens when youPOST: it is re-checked atomically, so always handle409 SLOT_UNAVAILABLE.- Times are ISO 8601 in UTC (
startsAt).localTimeis the same moment on the business's clock, for display.
Get availability
GET/availabilityLists every open start time in a date range, grouped by calendar day in the business's timezone. Days with no openings come back with an empty slots array.
Query parameters
| fromrequired | YYYY-MM-DD | First day, as a calendar date in the business's timezone. |
| to | YYYY-MM-DD | Last day, inclusive. Defaults to from. The range can span at most 31 days. |
| durationMinutes | integer (5-480) | Appointment length to check. Defaults to the business's default length. Only slots long enough are returned. |
Returns 200. Errors: 400, 401, 403, 409 BOOKING_NOT_ENABLED.
curl "https://YOUR-NEXTOSA-SERVER/api/public/v1/booking/YOUR_CONNECTION_ID/availability?from=2027-05-03&to=2027-05-05&durationMinutes=30" \
-H "x-api-key: $NEXTOSA_API_KEY"{
"timezone": "Asia/Kolkata",
"durationMinutes": 30,
"slotMinutes": 30,
"days": [
{
"date": "2027-05-03",
"slots": [
{
"startsAt": "2027-05-03T03:30:00.000Z",
"endsAt": "2027-05-03T04:00:00.000Z",
"localTime": "09:00"
},
{
"startsAt": "2027-05-03T04:00:00.000Z",
"endsAt": "2027-05-03T04:30:00.000Z",
"localTime": "09:30"
}
]
},
{
"date": "2027-05-04",
"slots": []
}
]
}Create a booking
POST/bookingsBooks a slot. The customer is matched to an existing client by phone number, or added as a new lead. The booking appears in the Upcoming column straight away.
externalBookingId. If a request times out and you send it again, you get the original booking back (200 with an Idempotent-Replay: true header) instead of a duplicate.Body
| externalBookingIdrequired | string (1-200) | Your own unique id. Also your handle for GET, PATCH and DELETE. |
| startsAtrequired | ISO 8601 | Start time with an explicit UTC offset, for example 2027-05-03T04:30:00.000Z or 2027-05-03T10:00:00+05:30. Must be a slot you were offered. |
| servicerequired | string (1-300) | What is being booked. Shown as the appointment title. |
| customer.namerequired | string (1-200) | The customer's name. |
| customer.phonerequired | string (5-30) | With country code, for example +919876543210. Identifies the customer. |
| customer.email | string | Customer email address. |
| durationMinutes | integer (5-480) | Defaults to the business's default appointment length. |
| notes | string (max 2000) | Free-text notes shown on the appointment. |
| extra | object | Up to 20 flat key/value pairs (string, number or boolean) stored on the appointment, for example a campaign or party size. |
Returns 201 (or 200 on a replay) with { "booking": ... }. Errors: 409 SLOT_UNAVAILABLE, 409 IDEMPOTENCY_CONFLICT, 409 BOOKING_CANCELLED, 422 INVALID_SLOT, 422 INVALID_PHONE.
curl -X POST "https://YOUR-NEXTOSA-SERVER/api/public/v1/booking/YOUR_CONNECTION_ID/bookings" \
-H "x-api-key: $NEXTOSA_API_KEY" \
-H "content-type: application/json" \
-d '{"externalBookingId":"order-1042","startsAt":"2027-05-03T04:30:00.000Z","service":"Consultation","durationMinutes":30,"customer":{"name":"Asha Verma","phone":"+919876543210","email":"asha@example.com"},"notes":"First visit"}'{
"booking": {
"id": "cmvq7k2x90001uk0c8h1d2e3f",
"externalBookingId": "order-1042",
"status": "UPCOMING",
"service": "Consultation",
"startsAt": "2027-05-03T04:30:00.000Z",
"endsAt": "2027-05-03T05:00:00.000Z",
"durationMinutes": 30,
"notes": null,
"customer": {
"name": "Asha Verma",
"phone": "+919876543210",
"email": "asha@example.com"
},
"createdAt": "2027-05-01T09:12:44.000Z",
"updatedAt": "2027-05-01T09:12:44.000Z"
}
}{
"error": "That time slot is no longer available.",
"details": {
"code": "SLOT_UNAVAILABLE",
"alternatives": [
{
"startsAt": "2027-05-03T04:00:00.000Z",
"endsAt": "2027-05-03T04:30:00.000Z"
},
{
"startsAt": "2027-05-03T05:00:00.000Z",
"endsAt": "2027-05-03T05:30:00.000Z"
}
]
}
}Retrieve a booking
GET/bookings/:externalBookingIdFetches a booking you made through this connection, with its current status, which changes as the business works through it (for example to COMPLETED). You can only see bookings made through your own connection.
Returns 200. Errors: 404 BOOKING_NOT_FOUND.
curl "https://YOUR-NEXTOSA-SERVER/api/public/v1/booking/YOUR_CONNECTION_ID/bookings/order-1042" \
-H "x-api-key: $NEXTOSA_API_KEY"Reschedule a booking
PATCH/bookings/:externalBookingIdMoves an upcoming booking to a new time. The new slot goes through the same atomic check as a new booking, and the booking's own current slot never counts against it.
Body
| startsAtrequired | ISO 8601 | The new start time, with a UTC offset. |
| durationMinutes | integer (5-480) | A new length. Defaults to the booking's current length. |
Returns 200. Errors: 404 BOOKING_NOT_FOUND, 409 SLOT_UNAVAILABLE (with alternatives), 409 BOOKING_NOT_MODIFIABLE, 422 INVALID_SLOT.
curl -X PATCH "https://YOUR-NEXTOSA-SERVER/api/public/v1/booking/YOUR_CONNECTION_ID/bookings/order-1042" \
-H "x-api-key: $NEXTOSA_API_KEY" \
-H "content-type: application/json" \
-d '{"startsAt":"2027-05-03T05:30:00.000Z"}'{
"booking": {
"id": "cmvq7k2x90001uk0c8h1d2e3f",
"externalBookingId": "order-1042",
"status": "UPCOMING",
"service": "Consultation",
"startsAt": "2027-05-03T05:30:00.000Z",
"endsAt": "2027-05-03T06:00:00.000Z",
"durationMinutes": 30,
"notes": null,
"customer": {
"name": "Asha Verma",
"phone": "+919876543210",
"email": "asha@example.com"
},
"createdAt": "2027-05-01T09:12:44.000Z",
"updatedAt": "2027-05-01T10:02:10.000Z"
}
}Cancel a booking
DELETE/bookings/:externalBookingIdCancels an upcoming booking and frees its slot immediately. Cancelling twice is harmless: you get the cancelled booking back both times.
externalBookingId cannot be reused. To book the customer again, use a new id.Returns 200. Errors: 404 BOOKING_NOT_FOUND, 409 BOOKING_NOT_MODIFIABLE (already in progress or finished).
curl -X DELETE "https://YOUR-NEXTOSA-SERVER/api/public/v1/booking/YOUR_CONNECTION_ID/bookings/order-1042" \
-H "x-api-key: $NEXTOSA_API_KEY"{
"booking": {
"id": "cmvq7k2x90001uk0c8h1d2e3f",
"externalBookingId": "order-1042",
"status": "CANCELLED",
"service": "Consultation",
"startsAt": "2027-05-03T04:30:00.000Z",
"endsAt": "2027-05-03T05:00:00.000Z",
"durationMinutes": 30,
"notes": null,
"customer": {
"name": "Asha Verma",
"phone": "+919876543210",
"email": "asha@example.com"
},
"createdAt": "2027-05-01T09:12:44.000Z",
"updatedAt": "2027-05-01T10:15:31.000Z"
}
}The booking object
Fields
| id | string | NEXTOSA's internal id for the appointment. |
| externalBookingId | string | Your id, as sent when creating it. |
| status | string | UPCOMING, IN_PROGRESS, COMPLETED, CANCELLED. Rarely PENDING_APPROVAL or WAITLISTED. |
| service | string | What was booked. |
| startsAt / endsAt | ISO 8601, UTC | The appointment's start and end. |
| durationMinutes | integer | Length of the appointment. |
| customer | object | name, phone (E.164) and email (or null). |
| createdAt / updatedAt | ISO 8601, UTC | When it was made and last changed. |
Booking webhooks
Set an Outbound webhook URL on the connection and NEXTOSA POSTs to it whenever a booking made through that connection is created, rescheduled or cancelled.
{
"command": "booking.created",
"booking": {
"id": "cmvq7k2x90001uk0c8h1d2e3f",
"externalBookingId": "order-1042",
"status": "UPCOMING",
"service": "Consultation",
"startsAt": "2027-05-03T04:30:00.000Z",
"endsAt": "2027-05-03T05:00:00.000Z",
"durationMinutes": 30,
"notes": null,
"customer": {
"name": "Asha Verma",
"phone": "+919876543210",
"email": "asha@example.com"
},
"createdAt": "2027-05-01T09:12:44.000Z",
"updatedAt": "2027-05-01T09:12:44.000Z"
}
}What you receive
| command | string | booking.created, booking.rescheduled or booking.cancelled. |
| booking | object | The full booking object. |
| x-nextosa-signature | header | HMAC-SHA256 of the raw body, signed with your API key, as sha256=<hex>. Always verify it. |
| Idempotency-Key | header | Stable per event. Use it to ignore a delivery you already handled. |
Verify the signature exactly as shown under Receive commands.
https:// and publicly reachable. Reply with a 2xx within 8 seconds; otherwise the delivery is retried (up to 3 attempts, with increasing delays). The same events are also available as the Connected software event trigger in the Automation Builder.Booking errors
| Status | Code | Meaning |
|---|---|---|
| 400 | (Invalid request) | The body or query failed validation. details.fieldErrors lists each problem. |
| 400 | INVALID_DATE | from or to is not a real YYYY-MM-DD date, or to is before from. |
| 400 | RANGE_TOO_LARGE | The availability range spans more than 31 days. |
| 400 | INVALID_DURATION | durationMinutes must be a whole number from 5 to 480. |
| 401 | UNAUTHORIZED | Missing or wrong API key, or the connection id does not exist. The two are deliberately indistinguishable. |
| 403 | CONNECTION_DISABLED | The connection is switched off in NEXTOSA. |
| 403 | BOOKING_API_DISABLED | The connection's Booking API switch is off. |
| 404 | BOOKING_NOT_FOUND | No booking with that externalBookingId was made through this connection. |
| 409 | BOOKING_NOT_ENABLED | The business has not turned on online booking, or has not configured availability yet. |
| 409 | SLOT_UNAVAILABLE | That time was taken. details.alternatives lists the nearest open slots. |
| 409 | IDEMPOTENCY_CONFLICT | That externalBookingId already exists with a different start time. Use PATCH to move it. |
| 409 | BOOKING_CANCELLED | That externalBookingId belonged to a booking that was cancelled. Use a new id to book again. |
| 409 | BOOKING_NOT_MODIFIABLE | Only an upcoming booking can be rescheduled or cancelled. This one has started or finished. |
| 422 | INVALID_SLOT | That start and duration could never be offered: off the slot grid, closed, outside hours, too soon or too far ahead. |
| 422 | INVALID_PHONE | customer.phone is not a valid number. Include the country code, for example +919876543210. |
| 422 | UNSUPPORTED_BUSINESS_TYPE | Restaurants and salons use their own booking engines and cannot use this API. |
| 429 | (rate limited) | Too many requests. See the limits table. |
Practical advice: use your own order or reservation id as externalBookingId so a retry can never double-book; treat availability as a hint and show returned alternatives on a 409; always send an explicit UTC offset and display times using localTime; verify every webhook signature and make your handler idempotent.
Your own booking system
Prefer to keep your own scheduling system as the source of truth? Choose the Booking / Appointments category, map the two URLs below under the connection's Settings tab, and NEXTOSA calls your endpoints when an AI agent, an automation or the connection's dashboard wants to create a booking or look up open times.
The two endpoints (Create booking, Open slots) are described in the next section.
Endpoints you host
Map a URL per endpoint under the connection's Settings tab, and add the headers NEXTOSA should send. NEXTOSA calls them when an AI agent, an automation or the connection's dashboard needs the data, and reads the answer without keeping a copy.
https:// URL (private and internal addresses are blocked) that answers within 8 seconds with a 2xx and a JSON body. Only the first 20,000 characters are read, so a longer body is cut off mid-JSON and cannot be parsed: return recent or summarised data, not your whole database. Calls are not signed, so protect the endpoint with the header(s) you add on the connection. The response shapes below are recommended, not enforced.Create booking
POSTBooking / AppointmentsNEXTOSA sends: JSON body: customerName (required), startTime (as the caller supplied it, usually ISO 8601: parse defensively), customerPhone and notes (empty strings when unknown).
{
"id": "bk_7781",
"status": "confirmed"
}Open slots
GETBooking / AppointmentsNEXTOSA sends: Optional query parameter daysAhead (an integer), only when the caller supplies it.
{
"slots": [
{
"start": "2027-05-03T10:00:00+05:30",
"end": "2027-05-03T10:30:00+05:30",
"available": true
},
{
"start": "2027-05-03T10:30:00+05:30",
"end": "2027-05-03T11:00:00+05:30",
"available": false
}
]
}Orders
GETE-CommerceNEXTOSA sends: Optional query parameter daysBack (an integer), only when the caller supplies it.
{
"orders": [
{
"id": "1001",
"createdAt": "2027-04-28T10:15:00.000Z",
"status": "paid",
"total": 2998,
"currency": "INR",
"items": [
{
"title": "Linen Shirt",
"quantity": 2,
"price": 1499
}
],
"customer": {
"name": "Asha Verma",
"email": "asha@example.com"
}
}
]
}Create product
POSTE-CommerceNEXTOSA sends: JSON body: title and price (required), description and sku (empty strings when blank).
{
"id": "p_5521",
"url": "https://shop.example.com/products/linen-shirt"
}Form submissions
GETSimple Website and PortfolioNEXTOSA sends: Optional query parameter daysBack (an integer), only when the caller supplies it.
{
"leads": [
{
"id": "ld_310",
"name": "Asha Verma",
"email": "asha@example.com",
"phone": "+919876543210",
"message": "Interested in your services",
"submittedAt": "2027-04-29T08:41:00.000Z"
}
]
}Listings
GETReal EstateNEXTOSA sends: Nothing: a plain GET.
{
"listings": [
{
"id": "L-2041",
"title": "3BHK apartment, Lake Road",
"type": "apartment",
"status": "for-sale",
"price": 8900000,
"currency": "INR",
"bedrooms": 3,
"city": "Pune"
}
]
}Courses
GETEdTech / CoursesNEXTOSA sends: Nothing: a plain GET.
{
"courses": [
{
"id": "crs_88",
"title": "Data Analysis with Python",
"level": "beginner",
"price": 4999,
"currency": "INR",
"durationHours": 24
}
]
}Usage
GETSaaSNEXTOSA sends: Nothing: a plain GET.
{
"period": "2027-04",
"totals": {
"accounts": 148,
"activeUsers": 1210,
"apiCalls": 2840000
},
"accounts": [
{
"id": "acc_901",
"plan": "pro",
"seats": 12,
"activeUsers": 9,
"apiCalls": 41000,
"status": "active"
}
]
}A minimal handler, shown for the orders endpoint (every endpoint follows the same shape):
import express from "express";
const app = express();
app.get("/api/nextosa/orders", async (req, res) => {
// The header you configured under Headers on the connection.
if (req.header("authorization") !== `Bearer ${process.env.NEXTOSA_TOKEN}`) return res.sendStatus(401);
const daysBack = Number(req.query.daysBack ?? 30);
const orders = await db.orders.findRecent({ daysBack, limit: 50 }); // your own data layer
res.json({ orders }); // keep it under 20,000 characters
});Simple Website and Portfolio connections share the one Form submissions endpoint.
Go-live checklist
- The inbound API key is stored in a server-side environment variable, not in browser code or a repository.
- Every event carries a unique
X-Event-Id, so a retry cannot run an automation twice. - Every command and webhook handler verifies
x-nextosa-signatureagainst the raw body and answers within 8 seconds. - Booking calls use your own
externalBookingIdand handle409 SLOT_UNAVAILABLEby offering the alternatives. - Phone numbers are in international format, so the right contact is found instead of a new lead being created.
- Endpoints you host are public https, protected by a header, and keep their answer under 20,000 characters.
- Large catalogs are synced in batches of at most 500 products.
Questions about a specific integration? Contact us. For the non-technical picture, see the Connected Websites overview.
Ready to run your entire business on one platform?
Join businesses using NEXTOSA to manage billing, staff, and compliance, and automate client communication on WhatsApp — all from one AI operating system.