List chatbot scripts

Return saved website scripts (the chatbot widget and vehicle-page scripts), one page at a time. The receptionist's "Chatbot Script" task uses this list to decide whether it is done.

GEThttps://api.spyne.ai/central-config/v1/smartview-scripts
AuthBearer token (console user)Rate limitNot documentedProcessingSynchronous, one database query and count

Filter by dealer group, rooftop, website and other fields. enterpriseId and teamId are optional: without them the list covers every rooftop. Nothing is stored.

Auth: Bearer token of a signed-in user, checked with the identity service. The route does not limit results to the caller's dealer group. Rate limit: not documented. Processing: synchronous, one database query and count.

Before you call it

  • Pass enterpriseId and teamId to see only one rooftop's scripts.
  • The Get Started page calls it with enterpriseId, teamId, pageNo=1 and batch=100. It then picks the script whose website matches the rooftop's website and has the chatbot on. The task shows as done when that script has a scriptUrl.

Query parameters

Optionalcan be left out
ParameterTypeRequiredDescription
pageNointegerOptionalPage number, starting at 1. Default: 1.
batchintegerOptionalPage size, 1 to 100. Default: 10.
enterpriseIdstringOptionalExact match.
teamIdstringOptionalExact match.
enterpriseName, teamNamestringOptionalContains, not case-sensitive.
websiteUrlstringOptionalContains, not case-sensitive. http(s):// and a trailing / are ignored.
scriptUrl, scriptId, createdBystringOptionalExact match.
websiteProviderstringOptionalContains, not case-sensitive.
sortBystringOptionalcreatedAt (default) or updatedAt.
orderstringOptionalasc or desc (default).
startDate, endDatestringOptionalYYYY-MM-DD. Filters on created date (UTC, inclusive).

Sample request

curl -G "https://api.spyne.ai/central-config/v1/smartview-scripts" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  --data-urlencode "enterpriseId=<enterpriseId>" \
  --data-urlencode "teamId=<teamId>" \
  --data-urlencode "pageNo=1" \
  --data-urlencode "batch=100"
import requests

res = requests.get(
    "https://api.spyne.ai/central-config/v1/smartview-scripts",
    headers={"Authorization": "Bearer YOUR_TOKEN"},
    params={"enterpriseId": "<enterpriseId>", "teamId": "<teamId>", "pageNo": 1, "batch": 100},
)
print(res.status_code, res.json())
const params = new URLSearchParams({ enterpriseId: '<enterpriseId>', teamId: '<teamId>', pageNo: '1', batch: '100' });
const res = await fetch(`https://api.spyne.ai/central-config/v1/smartview-scripts?${params}`, {
  headers: { Authorization: 'Bearer YOUR_TOKEN' },
});
console.log(res.status, await res.json());

Sample response

{
  "success": true,
  "message": "Smartview scripts retrieved successfully",
  "data": {
    "scripts": [
      {
        "_id": "<id>",
        "enterpriseId": "<enterpriseId>",
        "teamId": "<teamId>",
        "enterpriseName": "Example Motors Group",
        "teamName": "Example Motors",
        "userId": "<userId>",
        "domain": "publish",
        "entity": "SMARTVIEW",
        "type": "single",
        "entityconfig": {
          "scriptId": "<scriptId>",
          "scriptUrl": "https://example.com/script.js",
          "websiteUrl": "https://www.examplemotors.example",
          "websiteProvider": "dealeron",
          "active": 1,
          "selectedTeamId": ["<teamId>"],
          "globalConfigs": { "chatbotConfigs": { "enabled": true } },
          "version": "v2"
        },
        "createdAt": "2026-10-01T00:00:00.000Z",
        "updatedAt": "2026-10-12T00:00:00.000Z"
      }
    ],
    "pageNo": 1,
    "batch": 100,
    "total": 1
  }
}
{ "success": false, "message": "Validation error", "error": "Invalid query parameters", "errors": [{ "code": "too_big", "path": ["batch"], "message": "Number must be less than or equal to 100" }] }
{ "status": "401", "message": "Invalid Auth key" }
{ "success": false, "message": "Failed to fetch smartview scripts", "error": "<error message>" }

Response parameters (200)

ParameterTypeDescription
data.scripts[]arrayScript records.
entityconfig.scriptUrlstringScript to embed on the dealer website. Its presence marks the Chatbot Script task done in the console UI.
entityconfig.scriptIdstringScript id. Send it back to update this script.
entityconfig.websiteUrl, websiteProviderstringWebsite the script is for.
entityconfig.globalConfigs.chatbotConfigs.enabledbooleanChatbot is on.
entityconfig.vdpConfigs, vlpConfigsobjectVehicle-page script settings, when set.
data.pageNo, data.batch, data.totalnumberPaging. total counts all matches.

Errors

StatusReasonWhen it happens
400Validation errorpageNo or batch is out of range, or a date is not YYYY-MM-DD.
401Invalid Auth keyMissing or rejected token.
500Failed to fetch smartview scriptsThe database query failed.

What happens next

If there is no chatbot script for the rooftop's website, create one with Save a chatbot script. The console UI never writes the Chatbot Script task to the checklist. It works out "done" from this list each time.


Did this page help you?