Documentation
Search for an answer about Platica with q. To read the full article, take the result’s id and use it in the read call. With your assistant, search using search_product_docs.
Example
# Search
curl https://api.platic.ai/v1/docs/search?q=connect%20WhatsApp \
-H "Authorization: Bearer $PLATIC_API_KEY"
# Read one document
curl https://api.platic.ai/v1/docs/$DOC_ID \
-H "Authorization: Bearer $PLATIC_API_KEY" // Search
await platic.docs.search("connect WhatsApp");
// Read one document
await platic.docs.get("doc_123"); It does not require module permissions or accept workspace. The credential authorizes the query; all users search the same documentation.
It accepts both Bearer credentials: an OAuth access token (pl_at_…) or an API key (pl_key_…). See Authentication.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
q | string, 1-200 | — | Text to search for. Required. |
limit | integer 1-8 | 5 | How many results to return. |
Response
{
"status": "success",
"data": [
{
"id": "get_obtener_webhook1aade1",
"name": "get_obtener_webhook1aade1",
"topic": "Get a webhook",
"snippet": "GET https://api.platic.ai/v1/webhooks/{webhookId} returns a webhook of the workspace."
}
]
} data contains the matches, from most to least relevant, up to limit. It is not paginated, so it has no nextPageToken.
| Field | Type | Description |
|---|---|---|
data[].id | string | Identifier of the fragment. |
data[].name | string | Name of the document. |
data[].topic | string | Topic. |
data[].snippet | string | Excerpt, 240 characters at most. It does not include the whole document. |
A search without matches answers 200 with data: [].
This route answers questions about how Platica works. To operate a workspace — messages, contacts, campaigns — use that resource's endpoint.
Read a whole document
The search returns excerpts. To read a whole document, ask for its id:
| Parameter | Type | Description | Required |
|---|---|---|---|
id | string (path) | id of a search result. | Yes |
offset | integer (query) | Where to continue from, 0 to 1000000. Use the nextOffset from the previous response. Default 0. | No |
The response returns the document in data, with title, url, content, and nextOffset:
{
"status": "success",
"data": {
"id": "get_obtener_webhook1aade1",
"title": "Get a webhook",
"url": "https://docs.platica.mx/api/webhooks/get-webhook",
"content": "# Get a webhook\n\n…",
"offset": 0,
"nextOffset": null,
"totalCharacters": 2480
}
} nextOffset marks where to continue reading the document. If it is null, you have received the full text; if it is a number, repeat the call with ?offset= and that value. The get_product_doc MCP tool makes the same query.
Errors
| Status | details.code | When |
|---|---|---|
400 | INVALID_REQUEST | q is missing, q is over 200 characters, limit is not an integer between 1 and 8, or the id or offset of a document is not in a valid format |
401 | UNAUTHENTICATED | The Bearer is missing, or the token/key is not valid |
404 | NOT_FOUND | There is no document with that id |
502 | UPSTREAM_ERROR | The search or the read could not be completed |
503 | TEMPORARILY_UNAVAILABLE | The documentation search is not available |
See Errors for the full shape of an error.