REST API
Basics
The API lives at https://api.zaproo-search.com. Every request body and response is JSON, every route except the health checks sits under /v1, and every request authenticates with one header:
-H "Authorization: Bearer zs_sk_..."
The bearer is a secret key (zs_sk_…) for a server, a public key (zs_pk_…) for the two storefront routes, or the cabinet's session token for a signed-in user.
Who may call a route is printed under each one:
| Label | Means |
|---|---|
| Anyone | No credentials. |
| No credentials | Sign-in and account recovery: the route takes its own proof (a password, an emailed token, a refresh cookie). |
| Signed-in user | A cabinet session of any user. |
| Organization member, admin, owner | A cabinet session whose role in the organization is at least this one. Roles rank owner, admin, member. |
| Project member or admin (signed in) | A cabinet session with at least that role in the project's organization. API keys cannot call these routes. |
| Project member or any secret key | A cabinet session of a member, or a secret key of the project with read or full access. |
| Project admin or a full-access secret key | A cabinet session of an admin, or a secret key of the project with full access. |
| Public key from an allowed origin, or a secret key | A public key whose request comes from one of its allowed origins, or a secret key of the same project. |
An id that belongs to another organization or project answers 404, never 403, so ids cannot be probed. A key with an index scope gets 404 for every other index.
Errors share one shape:
{"error": {"code": "PROFILE_INVALID", "message": "...", "details": [{"path": "queryFields.title", "message": "..."}]}}
202 with {"taskId": "..."}. Poll the task under Tasks until it is done.Storefront
The two routes a storefront calls. They take a public handle in the path instead of a project id.
POST/v1/search/:profileKeyPublic key from an allowed origin, or a secret keyPOST/v1/suggest/:suggestKeyPublic key from an allowed origin, or a secret keyThese two routes answer the CORS preflight for every origin, without cookies, so a shop's pages can call them from the browser with a public key. The key's allowed origins are checked on the real request. A server sends no Origin header, so call them from a server with a secret key.
Indices
See Indices and languages, Mapping and fields and Reindex. A mapping change, reindex or replace session that would break a profile, rule, facet, autocomplete field or data source answers 409 MAPPING_BREAKS_CONFIG; details lists each use to change first.
A shop platform plugin, such as the Magento 2 module, reports itself with PUT .../integration (body platform, name, optional url and version, settings.manageMapping) each time its settings change, and GET .../:indexId returns it as integration. Only a full-access secret key may connect one; a signed-in user gets 403 INTEGRATION_KEY_ONLY. While settings.manageMapping is on, PUT .../mapping from anyone but the plugin's own key answers 409 MAPPING_MANAGED_BY_INTEGRATION. While any integration is connected, PUT .../feed and POST .../feed/sync answer 409 INDEX_HAS_INTEGRATION. DELETE .../integration disconnects it, answers 204 and is safe to repeat. See Integrations.
/v1/projects/:projectId/indicesProject member or any secret keyPOST/v1/projects/:projectId/indicesProject admin or a full-access secret keyGET/v1/projects/:projectId/indices/:indexIdProject member or any secret keyDELETE/v1/projects/:projectId/indices/:indexIdProject admin or a full-access secret keyGET/v1/projects/:projectId/indices/:indexId/mappingProject member or any secret keyGET/v1/projects/:projectId/indices/:indexId/mapping/usageProject member or any secret keyPUT/v1/projects/:projectId/indices/:indexId/mappingProject admin or a full-access secret keyPUT/v1/projects/:projectId/indices/:indexId/integrationA full-access secret keyDELETE/v1/projects/:projectId/indices/:indexId/integrationProject admin or a full-access secret keyGET/v1/projects/:projectId/indices/:indexId/facetsProject member or any secret keyPUT/v1/projects/:projectId/indices/:indexId/facetsProject admin or a full-access secret keyPOST/v1/projects/:projectId/indices/:indexId/reindexProject admin or a full-access secret keyPOST/v1/projects/:projectId/indices/:indexId/reindex/cancelProject admin or a full-access secret keyDocuments and full sync
POST .../documents takes a bare JSON array of up to 1000 documents; POST .../documents/delete a bare array of ids. Both accept an Idempotency-Key header. POST .../documents/flush takes no body, deletes every document and answers 202 with taskId and previousDocCount; see Delete all documents. Replace sessions upload a whole catalog and swap it in at commit. See Documents and tasks and Full catalog sync.
/v1/projects/:projectId/indices/:indexId/documentsProject admin or a full-access secret keyPOST/v1/projects/:projectId/indices/:indexId/documents/deleteProject admin or a full-access secret keyPOST/v1/projects/:projectId/indices/:indexId/documents/flushProject admin or a full-access secret keyGET/v1/projects/:projectId/indices/:indexId/documentsProject member or any secret keyGET/v1/projects/:projectId/indices/:indexId/documents/:docIdProject member or any secret keyPOST/v1/projects/:projectId/indices/:indexId/replace-sessionsProject admin or a full-access secret keyGET/v1/projects/:projectId/indices/:indexId/replace-sessions/:sessionIdProject member or any secret keyPOST/v1/projects/:projectId/indices/:indexId/replace-sessions/:sessionId/documentsProject admin or a full-access secret keyPOST/v1/projects/:projectId/indices/:indexId/replace-sessions/:sessionId/commitProject admin or a full-access secret keyPOST/v1/projects/:projectId/indices/:indexId/replace-sessions/:sessionId/abortProject admin or a full-access secret keyTasks
GET/v1/projects/:projectId/tasksProject member or any secret keyGET/v1/projects/:projectId/tasks/:taskIdProject member or any secret keySearch and profiles
POST .../indices/:indexId/search is the secret search by index id: a saved profile by profileKey, or an inline profile to try settings before saving them. See Search API and Search profiles.
/v1/projects/:projectId/indices/:indexId/profilesProject member or any secret keyPOST/v1/projects/:projectId/indices/:indexId/profilesProject admin or a full-access secret keyGET/v1/projects/:projectId/indices/:indexId/profiles/:profileIdProject member or any secret keyPUT/v1/projects/:projectId/indices/:indexId/profiles/:profileIdProject admin or a full-access secret keyDELETE/v1/projects/:projectId/indices/:indexId/profiles/:profileIdProject admin or a full-access secret keyPOST/v1/projects/:projectId/indices/:indexId/searchProject member or any secret keySynonyms
See Synonyms.
GET/v1/projects/:projectId/indices/:indexId/synonymsProject member or any secret keyPOST/v1/projects/:projectId/indices/:indexId/synonymsProject admin or a full-access secret keyPOST/v1/projects/:projectId/indices/:indexId/synonyms/importProject admin or a full-access secret keyGET/v1/projects/:projectId/indices/:indexId/synonyms/exportProject member or any secret keyPUT/v1/projects/:projectId/indices/:indexId/synonyms/:synonymIdProject admin or a full-access secret keyDELETE/v1/projects/:projectId/indices/:indexId/synonyms/:synonymIdProject admin or a full-access secret keyRanking rules
See Ranking rules.
GET/v1/projects/:projectId/indices/:indexId/rulesProject member or any secret keyPOST/v1/projects/:projectId/indices/:indexId/rulesProject admin or a full-access secret keyPUT/v1/projects/:projectId/indices/:indexId/rules/orderProject admin or a full-access secret keyPOST/v1/projects/:projectId/indices/:indexId/rules/testProject member or any secret keyGET/v1/projects/:projectId/indices/:indexId/rules/:ruleIdProject member or any secret keyPUT/v1/projects/:projectId/indices/:indexId/rules/:ruleIdProject admin or a full-access secret keyDELETE/v1/projects/:projectId/indices/:indexId/rules/:ruleIdProject admin or a full-access secret keyAutocomplete
See Autocomplete.
GET/v1/projects/:projectId/indices/:indexId/suggestions/configProject member or any secret keyPUT/v1/projects/:projectId/indices/:indexId/suggestions/configProject admin or a full-access secret keyGET/v1/projects/:projectId/indices/:indexId/suggestions/customProject member or any secret keyPOST/v1/projects/:projectId/indices/:indexId/suggestions/customProject admin or a full-access secret keyDELETE/v1/projects/:projectId/indices/:indexId/suggestions/custom/:suggestionIdProject admin or a full-access secret keyPOST/v1/projects/:projectId/indices/:indexId/suggestions/rebuildProject admin or a full-access secret keyPOST/v1/projects/:projectId/indices/:indexId/suggestProject member or any secret keyAnalytics
See Search analytics.
GET/v1/projects/:projectId/indices/:indexId/analyticsProject member or any secret keyAPI keys
Keys are managed from a cabinet session only; no key can create or revoke another key. Creating a key needs a confirmed email. See API keys.
GET/v1/projects/:projectId/api-keysProject member (signed in)POST/v1/projects/:projectId/api-keysProject admin (signed in)DELETE/v1/projects/:projectId/api-keys/:keyIdProject admin (signed in)Account and sign-in
The cabinet's own routes. refresh and logout read the refresh cookie the cabinet holds. impersonate and impersonation/exit serve Zaproo support: they trade a one-time code from an administrator for a session as the account owner, and end it. See Account and sign-in.
/v1/auth/registerNo credentialsGET/v1/auth/verify-emailNo credentialsPOST/v1/auth/resend-verificationSigned-in userPOST/v1/auth/loginNo credentialsPOST/v1/auth/refreshNo credentialsPOST/v1/auth/logoutNo credentialsPOST/v1/auth/forgot-passwordNo credentialsPOST/v1/auth/reset-passwordNo credentialsPOST/v1/auth/impersonateNo credentialsPOST/v1/auth/impersonation/exitSigned-in userGET/v1/auth/meSigned-in userPOST/v1/auth/change-passwordSigned-in userGET/v1/auth/sessionsSigned-in userDELETE/v1/auth/sessions/:familyIdSigned-in userOrganizations, members and projects
See Organizations, members and roles and Projects.
GET/v1/orgsSigned-in userGET/v1/orgs/:orgIdOrganization memberGET/v1/orgs/:orgId/projectsOrganization memberPOST/v1/orgs/:orgId/projectsOrganization adminGET/v1/projects/:projectIdProject member or any secret keyGET/v1/orgs/:orgId/membersOrganization memberPOST/v1/orgs/:orgId/membersOrganization ownerPUT/v1/orgs/:orgId/members/:userIdOrganization ownerDELETE/v1/orgs/:orgId/members/:userIdOrganization ownerMCP
The MCP server, for AI agents. See MCP setup.
POST/mcpSecret keyStatus
GET/v1/statusAnyoneSee Status for what it answers. GET /health and GET /ready are probes for the infrastructure that runs the API.
Not allowed while impersonating
When Zaproo support acts as an account owner, these routes answer 403 IMPERSONATION_FORBIDDEN: creating an API key, changing the password, ending a session, changing the plan, and adding, changing or removing a member.