cURL
curl -X POST "https://api.alura.io/v1/workspace/knowledge/search" \
-H "Authorization: Bearer $ALURA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query":"refund on a personalised mug"}'const res = await fetch('https://api.alura.io/v1/workspace/knowledge/search', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.ALURA_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"query": "refund on a personalised mug"
}),
});
console.log(await res.json());import json
import os
import urllib.request
request = urllib.request.Request(
"https://api.alura.io/v1/workspace/knowledge/search",
method="POST",
data=json.dumps({
"query": "refund on a personalised mug"
}).encode(),
headers={
"Authorization": f"Bearer {os.environ['ALURA_API_KEY']}",
"Content-Type": "application/json",
},
)
with urllib.request.urlopen(request) as response:
print(json.load(response)){
"object": "workspace.knowledge_search",
"data": [
{
"type": "guidance",
"id": "7b0f5e3a-2c41-4e8b-9d6a-1f2e3c4d5a61",
"shop_id": null,
"key": null,
"title": "No refunds on personalised mugs",
"snippet": "Personalised mugs are made to order: offer a remake for a printing fault, never a refund for a change of mind.",
"score": 4.4,
"status": "active",
"shop_ids": null,
"source": null,
"read_only": false,
"updated_at": "2026-10-15T09:30:00.123Z"
},
{
"type": "article",
"id": "3c9d2e1f-5a6b-4c7d-8e9f-0a1b2c3d4e52",
"shop_id": null,
"key": null,
"title": "Mug care",
"snippet": "Care Dishwasher safe on the top rack. Not for the microwave: the gold rim sparks.",
"score": 1.4,
"status": "active",
"shop_ids": null,
"source": null,
"read_only": false,
"updated_at": "2026-10-11T08:00:00.000Z"
},
{
"type": "saved_reply",
"id": "d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f85",
"shop_id": null,
"key": null,
"title": "Proof before printing",
"snippet": "We will send you a proof of your name on the mug before we print it.",
"score": 1.2,
"status": null,
"shop_ids": [
"30577120"
],
"source": null,
"read_only": true,
"updated_at": "2026-10-13T08:00:00.000Z"
},
{
"type": "policy",
"id": null,
"shop_id": "22841907",
"key": "gift_wrap",
"title": "Gift Wrap",
"snippet": "Gift wrapping is free on every mug.",
"score": 0.8,
"status": null,
"shop_ids": null,
"source": "seller",
"read_only": true,
"updated_at": "2026-10-15T09:30:00.123Z"
},
{
"type": "saved_reply",
"id": "c4d5e6f7-a8b9-4c0d-9e1f-2a3b4c5d6e74",
"shop_id": null,
"key": null,
"title": "Order shipped",
"snippet": "Good news: your mug is on its way. Your tracking link is in your Etsy purchases.",
"score": 0.8,
"status": null,
"shop_ids": null,
"source": null,
"read_only": true,
"updated_at": "2026-10-12T08:00:00.000Z"
}
],
"results": [
{
"type": "guidance",
"id": "7b0f5e3a-2c41-4e8b-9d6a-1f2e3c4d5a61",
"shop_id": null,
"key": null,
"title": "No refunds on personalised mugs",
"snippet": "Personalised mugs are made to order: offer a remake for a printing fault, never a refund for a change of mind.",
"score": 4.4,
"status": "active",
"shop_ids": null,
"source": null,
"read_only": false,
"updated_at": "2026-10-15T09:30:00.123Z"
},
{
"type": "article",
"id": "3c9d2e1f-5a6b-4c7d-8e9f-0a1b2c3d4e52",
"shop_id": null,
"key": null,
"title": "Mug care",
"snippet": "Care Dishwasher safe on the top rack. Not for the microwave: the gold rim sparks.",
"score": 1.4,
"status": "active",
"shop_ids": null,
"source": null,
"read_only": false,
"updated_at": "2026-10-11T08:00:00.000Z"
},
{
"type": "saved_reply",
"id": "d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f85",
"shop_id": null,
"key": null,
"title": "Proof before printing",
"snippet": "We will send you a proof of your name on the mug before we print it.",
"score": 1.2,
"status": null,
"shop_ids": [
"30577120"
],
"source": null,
"read_only": true,
"updated_at": "2026-10-13T08:00:00.000Z"
},
{
"type": "policy",
"id": null,
"shop_id": "22841907",
"key": "gift_wrap",
"title": "Gift Wrap",
"snippet": "Gift wrapping is free on every mug.",
"score": 0.8,
"status": null,
"shop_ids": null,
"source": "seller",
"read_only": true,
"updated_at": "2026-10-15T09:30:00.123Z"
},
{
"type": "saved_reply",
"id": "c4d5e6f7-a8b9-4c0d-9e1f-2a3b4c5d6e74",
"shop_id": null,
"key": null,
"title": "Order shipped",
"snippet": "Good news: your mug is on its way. Your tracking link is in your Etsy purchases.",
"score": 0.8,
"status": null,
"shop_ids": null,
"source": null,
"read_only": true,
"updated_at": "2026-10-12T08:00:00.000Z"
}
]
}{
"type": "https://docs.alura.io/errors/invalid_request",
"title": "Invalid request",
"status": 400,
"code": "invalid_request",
"detail": "Invalid request",
"suggestion": "Fix the request as the detail says, then send it again.",
"retryable": false,
"request_id": "req_01JQ5W3H8M2N4P6R8T0V2X4Z6B"
}{
"type": "https://docs.alura.io/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"code": "unauthorized",
"detail": "Unauthorized",
"suggestion": "Send a valid API key as `Authorization: Bearer alura_sk_...`.",
"retryable": false,
"request_id": "req_01JQ5W3H8M2N4P6R8T0V2X4Z6B"
}{
"type": "https://docs.alura.io/errors/credits_exhausted",
"title": "API credits exhausted",
"status": 402,
"code": "credits_exhausted",
"detail": "API credits exhausted",
"suggestion": "Upgrade the plan or wait for the monthly reset.",
"retryable": false,
"request_id": "req_01JQ5W3H8M2N4P6R8T0V2X4Z6B"
}{
"type": "https://docs.alura.io/errors/plan_required",
"title": "Plan required",
"status": 403,
"code": "plan_required",
"detail": "Plan required",
"suggestion": "Upgrade the workspace plan to use this operation.",
"retryable": false,
"request_id": "req_01JQ5W3H8M2N4P6R8T0V2X4Z6B"
}{
"type": "https://docs.alura.io/errors/not_found",
"title": "Not found",
"status": 404,
"code": "not_found",
"detail": "Not found",
"suggestion": "Check the ID, or search for it first.",
"retryable": false,
"request_id": "req_01JQ5W3H8M2N4P6R8T0V2X4Z6B"
}{
"type": "https://docs.alura.io/errors/method_not_allowed",
"title": "Method not allowed",
"status": 405,
"code": "method_not_allowed",
"detail": "Method not allowed",
"suggestion": "Use one of the methods in the Allow header.",
"retryable": false,
"request_id": "req_01JQ5W3H8M2N4P6R8T0V2X4Z6B"
}{
"type": "https://docs.alura.io/errors/rate_limited",
"title": "Rate limited",
"status": 429,
"code": "rate_limited",
"detail": "Rate limited",
"suggestion": "Wait for Retry-After, then retry.",
"retryable": true,
"request_id": "req_01JQ5W3H8M2N4P6R8T0V2X4Z6B"
}{
"type": "https://docs.alura.io/errors/internal_error",
"title": "Internal error",
"status": 500,
"code": "internal_error",
"detail": "Internal error",
"suggestion": "Retry; if it keeps failing, report the request_id.",
"retryable": true,
"request_id": "req_01JQ5W3H8M2N4P6R8T0V2X4Z6B"
}{
"type": "https://docs.alura.io/errors/base_unverifiable",
"title": "Base not verifiable",
"status": 503,
"code": "base_unverifiable",
"detail": "Base not verifiable",
"suggestion": "Alura could not read from Etsy the text or inventory this write names a version of, so it could not check it, and nothing was written. Retry after Retry-After.",
"retryable": true,
"request_id": "req_01JQ5W3H8M2N4P6R8T0V2X4Z6B"
}Knowledge
Search knowledge
Search what the seller wrote for the assistant about a subject: guidance, articles, saved replies and shop policies, best match first.
cURL
curl -X POST "https://api.alura.io/v1/workspace/knowledge/search" \
-H "Authorization: Bearer $ALURA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query":"refund on a personalised mug"}'const res = await fetch('https://api.alura.io/v1/workspace/knowledge/search', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.ALURA_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"query": "refund on a personalised mug"
}),
});
console.log(await res.json());import json
import os
import urllib.request
request = urllib.request.Request(
"https://api.alura.io/v1/workspace/knowledge/search",
method="POST",
data=json.dumps({
"query": "refund on a personalised mug"
}).encode(),
headers={
"Authorization": f"Bearer {os.environ['ALURA_API_KEY']}",
"Content-Type": "application/json",
},
)
with urllib.request.urlopen(request) as response:
print(json.load(response)){
"object": "workspace.knowledge_search",
"data": [
{
"type": "guidance",
"id": "7b0f5e3a-2c41-4e8b-9d6a-1f2e3c4d5a61",
"shop_id": null,
"key": null,
"title": "No refunds on personalised mugs",
"snippet": "Personalised mugs are made to order: offer a remake for a printing fault, never a refund for a change of mind.",
"score": 4.4,
"status": "active",
"shop_ids": null,
"source": null,
"read_only": false,
"updated_at": "2026-10-15T09:30:00.123Z"
},
{
"type": "article",
"id": "3c9d2e1f-5a6b-4c7d-8e9f-0a1b2c3d4e52",
"shop_id": null,
"key": null,
"title": "Mug care",
"snippet": "Care Dishwasher safe on the top rack. Not for the microwave: the gold rim sparks.",
"score": 1.4,
"status": "active",
"shop_ids": null,
"source": null,
"read_only": false,
"updated_at": "2026-10-11T08:00:00.000Z"
},
{
"type": "saved_reply",
"id": "d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f85",
"shop_id": null,
"key": null,
"title": "Proof before printing",
"snippet": "We will send you a proof of your name on the mug before we print it.",
"score": 1.2,
"status": null,
"shop_ids": [
"30577120"
],
"source": null,
"read_only": true,
"updated_at": "2026-10-13T08:00:00.000Z"
},
{
"type": "policy",
"id": null,
"shop_id": "22841907",
"key": "gift_wrap",
"title": "Gift Wrap",
"snippet": "Gift wrapping is free on every mug.",
"score": 0.8,
"status": null,
"shop_ids": null,
"source": "seller",
"read_only": true,
"updated_at": "2026-10-15T09:30:00.123Z"
},
{
"type": "saved_reply",
"id": "c4d5e6f7-a8b9-4c0d-9e1f-2a3b4c5d6e74",
"shop_id": null,
"key": null,
"title": "Order shipped",
"snippet": "Good news: your mug is on its way. Your tracking link is in your Etsy purchases.",
"score": 0.8,
"status": null,
"shop_ids": null,
"source": null,
"read_only": true,
"updated_at": "2026-10-12T08:00:00.000Z"
}
],
"results": [
{
"type": "guidance",
"id": "7b0f5e3a-2c41-4e8b-9d6a-1f2e3c4d5a61",
"shop_id": null,
"key": null,
"title": "No refunds on personalised mugs",
"snippet": "Personalised mugs are made to order: offer a remake for a printing fault, never a refund for a change of mind.",
"score": 4.4,
"status": "active",
"shop_ids": null,
"source": null,
"read_only": false,
"updated_at": "2026-10-15T09:30:00.123Z"
},
{
"type": "article",
"id": "3c9d2e1f-5a6b-4c7d-8e9f-0a1b2c3d4e52",
"shop_id": null,
"key": null,
"title": "Mug care",
"snippet": "Care Dishwasher safe on the top rack. Not for the microwave: the gold rim sparks.",
"score": 1.4,
"status": "active",
"shop_ids": null,
"source": null,
"read_only": false,
"updated_at": "2026-10-11T08:00:00.000Z"
},
{
"type": "saved_reply",
"id": "d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f85",
"shop_id": null,
"key": null,
"title": "Proof before printing",
"snippet": "We will send you a proof of your name on the mug before we print it.",
"score": 1.2,
"status": null,
"shop_ids": [
"30577120"
],
"source": null,
"read_only": true,
"updated_at": "2026-10-13T08:00:00.000Z"
},
{
"type": "policy",
"id": null,
"shop_id": "22841907",
"key": "gift_wrap",
"title": "Gift Wrap",
"snippet": "Gift wrapping is free on every mug.",
"score": 0.8,
"status": null,
"shop_ids": null,
"source": "seller",
"read_only": true,
"updated_at": "2026-10-15T09:30:00.123Z"
},
{
"type": "saved_reply",
"id": "c4d5e6f7-a8b9-4c0d-9e1f-2a3b4c5d6e74",
"shop_id": null,
"key": null,
"title": "Order shipped",
"snippet": "Good news: your mug is on its way. Your tracking link is in your Etsy purchases.",
"score": 0.8,
"status": null,
"shop_ids": null,
"source": null,
"read_only": true,
"updated_at": "2026-10-12T08:00:00.000Z"
}
]
}{
"type": "https://docs.alura.io/errors/invalid_request",
"title": "Invalid request",
"status": 400,
"code": "invalid_request",
"detail": "Invalid request",
"suggestion": "Fix the request as the detail says, then send it again.",
"retryable": false,
"request_id": "req_01JQ5W3H8M2N4P6R8T0V2X4Z6B"
}{
"type": "https://docs.alura.io/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"code": "unauthorized",
"detail": "Unauthorized",
"suggestion": "Send a valid API key as `Authorization: Bearer alura_sk_...`.",
"retryable": false,
"request_id": "req_01JQ5W3H8M2N4P6R8T0V2X4Z6B"
}{
"type": "https://docs.alura.io/errors/credits_exhausted",
"title": "API credits exhausted",
"status": 402,
"code": "credits_exhausted",
"detail": "API credits exhausted",
"suggestion": "Upgrade the plan or wait for the monthly reset.",
"retryable": false,
"request_id": "req_01JQ5W3H8M2N4P6R8T0V2X4Z6B"
}{
"type": "https://docs.alura.io/errors/plan_required",
"title": "Plan required",
"status": 403,
"code": "plan_required",
"detail": "Plan required",
"suggestion": "Upgrade the workspace plan to use this operation.",
"retryable": false,
"request_id": "req_01JQ5W3H8M2N4P6R8T0V2X4Z6B"
}{
"type": "https://docs.alura.io/errors/not_found",
"title": "Not found",
"status": 404,
"code": "not_found",
"detail": "Not found",
"suggestion": "Check the ID, or search for it first.",
"retryable": false,
"request_id": "req_01JQ5W3H8M2N4P6R8T0V2X4Z6B"
}{
"type": "https://docs.alura.io/errors/method_not_allowed",
"title": "Method not allowed",
"status": 405,
"code": "method_not_allowed",
"detail": "Method not allowed",
"suggestion": "Use one of the methods in the Allow header.",
"retryable": false,
"request_id": "req_01JQ5W3H8M2N4P6R8T0V2X4Z6B"
}{
"type": "https://docs.alura.io/errors/rate_limited",
"title": "Rate limited",
"status": 429,
"code": "rate_limited",
"detail": "Rate limited",
"suggestion": "Wait for Retry-After, then retry.",
"retryable": true,
"request_id": "req_01JQ5W3H8M2N4P6R8T0V2X4Z6B"
}{
"type": "https://docs.alura.io/errors/internal_error",
"title": "Internal error",
"status": 500,
"code": "internal_error",
"detail": "Internal error",
"suggestion": "Retry; if it keeps failing, report the request_id.",
"retryable": true,
"request_id": "req_01JQ5W3H8M2N4P6R8T0V2X4Z6B"
}{
"type": "https://docs.alura.io/errors/base_unverifiable",
"title": "Base not verifiable",
"status": 503,
"code": "base_unverifiable",
"detail": "Base not verifiable",
"suggestion": "Alura could not read from Etsy the text or inventory this write names a version of, so it could not check it, and nothing was written. Retry after Retry-After.",
"retryable": true,
"request_id": "req_01JQ5W3H8M2N4P6R8T0V2X4Z6B"
}Cost: Free.
Finds what the seller wrote about a subject: guidance, articles, saved replies and the shops’ policies, best match first, each with a short snippet of the passage that matched. Words are matched whole in any language (no stemming, so include the forms you expect, such as
curl -X POST "https://api.alura.io/v1/workspace/knowledge/search" \
-H "Authorization: Bearer $ALURA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query":"refund on a personalised mug"}'
refund refunds). Only active guidance and articles, the ones the assistant uses, unless an owner or admin sends include_suggested (a suggestion past its expiry never shows). The first 10,000 characters of each text are searched. shop_id narrows it to entries for every shop or for that shop, and that shop’s policies; types to some kinds; limit (at most 20, default 10) to the best few. A POST because the words can be buyer text and URLs are kept in request logs: query (at most 500 characters) stays in the JSON body and is never logged; it reads only, nothing changes. Needs the knowledge:read scope; any workspace member may search.Body
application/json
Response
OK