Skip to content

API basics

Typemo has two HTTP APIs: the management API for collections, documents and settings, and the search API that answers searches. This page lists what they share and where they differ. To write data, start with Push over the API or Index your build.

APIBase URLWhat it serves
Managementhttps://api.typemo.com/v1Collections, documents, synonyms, stopwords, custom results, boost rules, knowledge, analytics.
Searchhttps://search.typemo.com/v1Search, suggestions and analytics events. See Search API.
MCPhttps://api.typemo.com/mcpAI agents. See Connect an AI agent.

Every endpoint, with its request and response schemas, is in the API reference. Its OpenAPI document is at https://api.typemo.com/v1/openapi.json.

A project’s search runs in one region, chosen when the project is created. Project settings shows it as Search region. Moving a project to another region takes a migration by Typemo. The management API has one address for every region.

search.typemo.com reaches every region. When your project runs in another region than the one that answers, the request gets a 307 redirect to your region’s address.

CallerWhat to do
Your server, a script, curlFollow the redirect. Most HTTP clients do; curl needs -L.
A browserCall your region’s address directly. searchUrl in https://search.typemo.com/init/{key} names it.

A browser sends Origin: null after a cross-site redirect, and no allowed domains list admits it. The widget reads searchUrl for this reason.

Every request carries an API key from API keys. Keys start with sq_.

How you send itManagement APISearch APIMCP
X-API-Key: sq_… headerYesYesYes
Authorization: Bearer sq_… headerYesYesYes
?key=sq_… query parameterNoRead only keys; a Write & Read key gets 401No: a Read only key goes at the end of the path
A sign-in (OAuth access token)YesNoYes

When a request carries more than one, X-API-Key wins, then the Authorization header, then ?key=.

KeyIt canWhere it belongs
Read onlySearch, read suggestions, send analytics events, read synonyms, stopwords, custom results, boost rules and knowledge.Browsers, apps, the widget: anywhere.
Write & ReadAll of that, plus push and delete documents, change merchandising, read analytics, and call the AI assistant from a server.Your server only.

A key can also be limited to one collection; any other collection refuses it. Project settings and collection settings are never editable with a key. API keys has the full table.

A request from a browser carries an Origin header. The search API answers it only when the site is on the project’s allowed domains. A request without an Origin, from your server, needs the key alone.

Every error has the same shape. param names the input at fault, when there is one:

{
"error": {
"code": "BAD_REQUEST",
"message": "sort: Expected \"field:asc\" or \"field:desc\"",
"param": "sort"
}
}
StatuscodeWhen
400BAD_REQUESTAn input is missing, has the wrong type, or names a field the collection doesn’t have.
400VALIDATION_FAILEDA document push holds an invalid document. Nothing is indexed, and report lists each document’s problem.
401UNAUTHORIZEDNo key, an unknown or revoked key, a Read only key on a write, or a Write & Read key in a URL. On the search API, also a key that can’t reach the collection.
403FORBIDDENThe browser’s site is not on the allowed domains, an IP or country rule blocks the caller, or a plan limit is reached.
404NOT_FOUNDThe collection or document doesn’t exist. On the management API, also a collection the key can’t reach.
409CONFLICTA sync or another import is writing to the collection. Retry shortly.
413PAYLOAD_TOO_LARGEA snapshot is over 50 MB unzipped.
429RATE_LIMITEDOver the rate limit. Retry-After says how many seconds to wait.
503SERVICE_UNAVAILABLEThe project’s search is unavailable.

The two APIs count differently and name their headers differently.

APIWhat is countedHeaders
SearchRequests per minute from one IP address, per collectionX-RateLimit-Limit, X-RateLimit-Reset; on a 429, Retry-After
ManagementRequests per caller (key, user or IP), per endpointRateLimit-Limit, RateLimit-Remaining, RateLimit-Reset; on a 429, Retry-After

X-RateLimit-Reset and RateLimit-Reset are Unix times in seconds. The search limit is the same for every project, and a cached answer counts like any other: see Rate limiting.

The management endpoints that write documents have their own limits:

EndpointLimit
POST /collections/{id}/documents (push)100 a minute
POST /collections/{id}/documents/delete100 a minute
GET /collections/{id}/documents/{documentId}200 a minute
DELETE /collections/{id}/documents/{documentId}200 a minute
PUT /collections/{id}/documents (replace every document)15 every 10 minutes
POST /collections/{id}/source/sync5 every 10 minutes
APIParametersResponse
Managementpage from 1, default 1; perPage 1–100, default 20{ "data": [...], "page", "perPage", "total" }
Searchpage from 1, default 1; perPage 1–100, default 10found is the total; hits holds the page

Analytics lists add a meta object to the management shape.

Next: Search API to query a collection, or the TypeScript SDK to call both APIs from one client.