cURL
curl -X POST "https://api.alura.io/v1/workspace/knowledge/articles/6e5d4c3b-2a1f-4e0d-9c8b-7a6f5e4d3c27/approve" \
-H "Authorization: Bearer $ALURA_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 5f0c8e2a-4b1d-4c3e-9a7f-2b5d6e8f0a1c" \
-d '{"version":"2026-10-15T11:00:00.000000Z"}'const res = await fetch('https://api.alura.io/v1/workspace/knowledge/articles/6e5d4c3b-2a1f-4e0d-9c8b-7a6f5e4d3c27/approve', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.ALURA_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': '5f0c8e2a-4b1d-4c3e-9a7f-2b5d6e8f0a1c',
},
body: JSON.stringify({
"version": "2026-10-15T11:00:00.000000Z"
}),
});
console.log(await res.json());import json
import os
import urllib.request
request = urllib.request.Request(
"https://api.alura.io/v1/workspace/knowledge/articles/6e5d4c3b-2a1f-4e0d-9c8b-7a6f5e4d3c27/approve",
method="POST",
data=json.dumps({
"version": "2026-10-15T11:00:00.000000Z"
}).encode(),
headers={
"Authorization": f"Bearer {os.environ['ALURA_API_KEY']}",
"Content-Type": "application/json",
"Idempotency-Key": "5f0c8e2a-4b1d-4c3e-9a7f-2b5d6e8f0a1c",
},
)
with urllib.request.urlopen(request) as response:
print(json.load(response)){
"object": "workspace.article",
"id": "6e5d4c3b-2a1f-4e0d-9c8b-7a6f5e4d3c27",
"title": "Personalised name length",
"body_html": "<p>Names up to 12 characters fit on the mug.</p>",
"topics": [
"personalisation"
],
"status": "active",
"shop_ids": null,
"language": "en",
"source": "user",
"suggested_by": "grant:mock",
"evidence_conversation_ids": [
"1900000001"
],
"reviewed_by": "1",
"reviewed_at": "2026-10-17T12:00:00.654Z",
"expires_at": "2026-11-14T12:00:00.000Z",
"used_count": 0,
"created_at": "2026-10-17T08:00:00.000Z",
"updated_at": "2026-10-17T12:00:00.654Z",
"version": "2026-10-17T12:00:00.654321Z"
}{
"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": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"suggestion": "<string>",
"retryable": true,
"request_id": "<string>",
"upgrade_url": "<string>",
"credits_needed": 123,
"credits_remaining": 123,
"resets_at": "2023-11-07T05:31:56Z",
"shop_id": "<string>",
"state": "login_expired",
"holder": {
"label": "<string>",
"last_seen_at": "<string>"
},
"last_served_at": "<string>",
"action": "<string>"
}{
"type": "https://docs.alura.io/errors/margin_required",
"title": "Margin required",
"status": 422,
"code": "margin_required",
"detail": "Margin required",
"suggestion": "This strategy judges listings against break-even, which needs the shop's margin. Save a margin in the optimizer settings, send `overrides.margin_pct`, or use a strategy without break-even rules (Budget Saver needs none).",
"retryable": false,
"request_id": "req_01JQ5W3H8M2N4P6R8T0V2X4Z6B"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"suggestion": "<string>",
"retryable": true,
"request_id": "<string>",
"upgrade_url": "<string>",
"credits_needed": 123,
"credits_remaining": 123,
"resets_at": "2023-11-07T05:31:56Z",
"retry_after_seconds": 2
}{
"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
Approve article
Approve an article suggestion as the seller does in Alura: it becomes active and the assistant uses it at once.
cURL
curl -X POST "https://api.alura.io/v1/workspace/knowledge/articles/6e5d4c3b-2a1f-4e0d-9c8b-7a6f5e4d3c27/approve" \
-H "Authorization: Bearer $ALURA_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 5f0c8e2a-4b1d-4c3e-9a7f-2b5d6e8f0a1c" \
-d '{"version":"2026-10-15T11:00:00.000000Z"}'const res = await fetch('https://api.alura.io/v1/workspace/knowledge/articles/6e5d4c3b-2a1f-4e0d-9c8b-7a6f5e4d3c27/approve', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.ALURA_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': '5f0c8e2a-4b1d-4c3e-9a7f-2b5d6e8f0a1c',
},
body: JSON.stringify({
"version": "2026-10-15T11:00:00.000000Z"
}),
});
console.log(await res.json());import json
import os
import urllib.request
request = urllib.request.Request(
"https://api.alura.io/v1/workspace/knowledge/articles/6e5d4c3b-2a1f-4e0d-9c8b-7a6f5e4d3c27/approve",
method="POST",
data=json.dumps({
"version": "2026-10-15T11:00:00.000000Z"
}).encode(),
headers={
"Authorization": f"Bearer {os.environ['ALURA_API_KEY']}",
"Content-Type": "application/json",
"Idempotency-Key": "5f0c8e2a-4b1d-4c3e-9a7f-2b5d6e8f0a1c",
},
)
with urllib.request.urlopen(request) as response:
print(json.load(response)){
"object": "workspace.article",
"id": "6e5d4c3b-2a1f-4e0d-9c8b-7a6f5e4d3c27",
"title": "Personalised name length",
"body_html": "<p>Names up to 12 characters fit on the mug.</p>",
"topics": [
"personalisation"
],
"status": "active",
"shop_ids": null,
"language": "en",
"source": "user",
"suggested_by": "grant:mock",
"evidence_conversation_ids": [
"1900000001"
],
"reviewed_by": "1",
"reviewed_at": "2026-10-17T12:00:00.654Z",
"expires_at": "2026-11-14T12:00:00.000Z",
"used_count": 0,
"created_at": "2026-10-17T08:00:00.000Z",
"updated_at": "2026-10-17T12:00:00.654Z",
"version": "2026-10-17T12:00:00.654321Z"
}{
"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": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"suggestion": "<string>",
"retryable": true,
"request_id": "<string>",
"upgrade_url": "<string>",
"credits_needed": 123,
"credits_remaining": 123,
"resets_at": "2023-11-07T05:31:56Z",
"shop_id": "<string>",
"state": "login_expired",
"holder": {
"label": "<string>",
"last_seen_at": "<string>"
},
"last_served_at": "<string>",
"action": "<string>"
}{
"type": "https://docs.alura.io/errors/margin_required",
"title": "Margin required",
"status": 422,
"code": "margin_required",
"detail": "Margin required",
"suggestion": "This strategy judges listings against break-even, which needs the shop's margin. Save a margin in the optimizer settings, send `overrides.margin_pct`, or use a strategy without break-even rules (Budget Saver needs none).",
"retryable": false,
"request_id": "req_01JQ5W3H8M2N4P6R8T0V2X4Z6B"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"suggestion": "<string>",
"retryable": true,
"request_id": "<string>",
"upgrade_url": "<string>",
"credits_needed": 123,
"credits_remaining": 123,
"resets_at": "2023-11-07T05:31:56Z",
"retry_after_seconds": 2
}{
"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.
Approves a suggestion (
curl -X POST "https://api.alura.io/v1/workspace/knowledge/articles/6e5d4c3b-2a1f-4e0d-9c8b-7a6f5e4d3c27/approve" \
-H "Authorization: Bearer $ALURA_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 5f0c8e2a-4b1d-4c3e-9a7f-2b5d6e8f0a1c" \
-d '{"version":"2026-10-15T11:00:00.000000Z"}'
status: suggested) as the seller does in Alura: it becomes active and the assistant uses it at once (it counts against the limit: At most 100 entries of each kind may be active at once: one more is 422 knowledge_limit_reached (save it paused instead).). Anything else is 409 suggestion_not_pending, a second approves included, and so is approving a suggestion past its expires_at (it can still be rejected). Send the version you read to review only what you saw (a newer save is 409 conflict). A key or connection never approves a suggestion it made itself (403 self_approval): approve it in Alura or with another key. These are the entries of Alura’s Messages Assistant: what is saved here is what the assistant in Alura uses, and a change in Alura shows here. Needs the knowledge:write scope and the workspace owner or admin role (403 role_required). Retry safely with Idempotency-Key.Headers
Makes a retry safe: the same key with the same request within 24 hours returns the first result (with Idempotent-Replayed: true) instead of writing again. The same key with a different request is a 409 conflict; while the first request still runs, 409 idempotency_processing.
Required string length:
1 - 255Path Parameters
Body
application/json
Response
OK
active: the assistant uses it. paused: kept but not used (a Draft in Alura). suggested: an agent suggested it and it waits for the seller to approve it in Alura; never used until then. rejected: the seller turned the suggestion down, or it expired.
Available options:
active, paused, suggested, rejected