curl --request POST \
--url "https://api.nixflex.com/v1/knowledge/jobs/$(node -p 'encodeURIComponent(process.env.NXF_RESOURCE_ID)')/retry" \
--header "Authorization: Bearer $NIXFLEX_API_KEY" \
--header "Idempotency-Key: $NXF_IDEMPOTENCY_KEY" \
--header "Content-Type: application/json" \
--data '{}'
import Nixflex from 'nixflex';
const c = new Nixflex({apiKey:process.env.NIXFLEX_API_KEY,baseUrl:'https://api.nixflex.com',maxRetries:0});
const result = await c.knowledge.retryJob(process.env.NXF_RESOURCE_ID, {}, {idempotencyKey:process.env.NXF_IDEMPOTENCY_KEY});
// Keep knowledge and private results out of logs.
import os
from nixflex import Nixflex
with Nixflex(api_key=os.environ["NIXFLEX_API_KEY"], base_url="https://api.nixflex.com", max_retries=0) as c:
result = c.knowledge.retry_job(os.environ["NXF_RESOURCE_ID"], {}, idempotency_key=os.environ["NXF_IDEMPOTENCY_KEY"])
# Keep knowledge and private results out of logs.
# Save the JSON below privately as request-131.json.
nixflex knowledge retryJob "$env:NXF_RESOURCE_ID" --body '@request-131.json' --idempotency-key "$env:NXF_IDEMPOTENCY_KEY" --confirm --json --base-url "https://api.nixflex.com"
{
"id": "11111111-1111-4111-8111-111111111111",
"kb": "11111111-1111-4111-8111-111111111111",
"kind": "import",
"state": "pending",
"stage": "pending",
"progress": {
"percent": 0
},
"result": null,
"error": null,
"next_retry_at": null,
"paid_work_started": false,
"created_at": "2026-11-02T12:00:00Z"
}
Knowledge
Retry knowledge job
Retry a failed knowledge job only when its revision and attempt limit permit it. Review the recorded cause first.
POST
/
knowledge
/
jobs
/
{id}
/
retry
curl --request POST \
--url "https://api.nixflex.com/v1/knowledge/jobs/$(node -p 'encodeURIComponent(process.env.NXF_RESOURCE_ID)')/retry" \
--header "Authorization: Bearer $NIXFLEX_API_KEY" \
--header "Idempotency-Key: $NXF_IDEMPOTENCY_KEY" \
--header "Content-Type: application/json" \
--data '{}'
import Nixflex from 'nixflex';
const c = new Nixflex({apiKey:process.env.NIXFLEX_API_KEY,baseUrl:'https://api.nixflex.com',maxRetries:0});
const result = await c.knowledge.retryJob(process.env.NXF_RESOURCE_ID, {}, {idempotencyKey:process.env.NXF_IDEMPOTENCY_KEY});
// Keep knowledge and private results out of logs.
import os
from nixflex import Nixflex
with Nixflex(api_key=os.environ["NIXFLEX_API_KEY"], base_url="https://api.nixflex.com", max_retries=0) as c:
result = c.knowledge.retry_job(os.environ["NXF_RESOURCE_ID"], {}, idempotency_key=os.environ["NXF_IDEMPOTENCY_KEY"])
# Keep knowledge and private results out of logs.
# Save the JSON below privately as request-131.json.
nixflex knowledge retryJob "$env:NXF_RESOURCE_ID" --body '@request-131.json' --idempotency-key "$env:NXF_IDEMPOTENCY_KEY" --confirm --json --base-url "https://api.nixflex.com"
{
"id": "11111111-1111-4111-8111-111111111111",
"kb": "11111111-1111-4111-8111-111111111111",
"kind": "import",
"state": "pending",
"stage": "pending",
"progress": {
"percent": 0
},
"result": null,
"error": null,
"next_retry_at": null,
"paid_work_started": false,
"created_at": "2026-11-02T12:00:00Z"
}
FIXED · agent One live knowledge base belongs to an agent. Its attached numbers use that base on enabled channels. Only the active revision and eligible, unsuppressed pieces enter live retrieval.
NOT OFFERED → do this instead · number Knowledge and its enabled channels belong to the agent. Retired per-number knowledge operations return 410 number_knowledge_removed. Use separate agents when a number needs different knowledge or none.
YOU CAN CHANGE · source Use pasted text, PDF, DOCX or plain UTF-8 text, or discover a website and import selected pages. API submissions can request review.
SCOPE · agent Review knowledge drafts and publish approved material. Limits per base:
Send a JSON object.
At most three processing attempts in total. Old revisions still refuse. An expired quarantined file needs a fresh upload. Safety retries use next_retry_at and do not spend the normal processing-attempt counter.
MCP does not offer this operation because this operation is outside the approved tool permissions. Use the documented Node, Python, CLI or HTTP operation with the required authority.
sources 50 · kbTokens 100,000 · topics 1,000.
Read the compact AI rules
Retry a failed job when its revision and attempt limit still permit it.
Method: POST ·
Success: 202 ·
Scope: Owning account
The important part
- Retry only a job that the API permits to retry.
- Fix its recorded failure first; a new request is not a universal recovery mechanism.
Authentication
Send Authorization: Bearer KEY_ID:KEY_SECRET using the owning account’s server-side API credential. API keys have Owner authority. Personal Owner and Admin may perform this action; Member is refused. Personal dashboard visibility can hide API-origin agents. Never send owner fields to select another account.Request fields
| Field | Type | Required | Default | Limits and meaning |
|---|---|---|---|---|
id (path) | string | Yes | None | Opaque identifier. Keep it as a string. Format: uuid. |
Idempotency-Key (header) | string | Yes | None | Unique 8–128-character operation key: letters, numbers, dot, underscore, colon or hyphen. The prompt: prefix is reserved. Reuse only with the identical operation and payload. Maximum 128 characters. Minimum 8 characters. Pattern: ^[A-Za-z0-9_.:-]{8,128}$. |
| Field | Type | Required | Default | Limits and meaning |
|---|
Response fields
202 Accepted returns the fields below. Where this operation queues work, follow the job and current revision until it finishes (accepted is not confirmed).
| Field | Type | Meaning |
|---|---|---|
id | string | Opaque identifier. Keep it as a string. Format: uuid. |
kb | string | Opaque identifier. Keep it as a string. Format: uuid. |
kind | string | Work type; includes import, discovery, publish, manual, export, delete and automatic-term maintenance. |
state | string | Allowed: "pending", "running", "needs_review", "ready", "failed", "cancelled", "deleted". |
stage | string | Current work stage, including reading, preparing, indexing, safety_check or safety_waiting. |
progress | object | Saved value. |
progress.percent | integer | Completed-stage progress, not elapsed-time prediction. Minimum 0. Maximum 100. |
progress.phase | string | Reading or naming phase. |
progress.page | integer | Current page number. |
progress.pages | integer | Total input pages or entries. |
progress.completed | integer | Completed preparation units. |
progress.total | integer | Total preparation units. |
result | object or null | Fields depend on job kind. Poll the job until a terminal state or needs_review; ready alone is not a claim that new text was published. |
result.draft_id | string | Opaque identifier. Keep it as a string. Format: uuid. |
result.warnings | array of string | Saved value. |
result.summary | object | Saved value. |
result.summary.pages | integer | Website pages processed. |
result.summary.pieces | integer | Prepared pieces. |
result.summary.duplicates_skipped | integer | Duplicate pieces or repeated source skipped. |
result.unchanged | boolean | No new publishable content was produced. |
result.revision | one of the shapes below | Saved value. |
result.expected_revision | integer | Latest integer revision read from this resource; it must still match when the request runs. Minimum 1. |
result.expires_at | string | UTC timestamp. Format: date-time. |
result.deleted | boolean | Saved value. |
result.private_objects_remaining | integer | Saved value. |
result.pages | array of object | Saved value. |
result.pages[].id | string | Discovery page ID, use exactly as returned. |
result.pages[].url | string | Discovered public page URL. |
result.pages[].title | string | Discovered page title. |
error | object or null | Saved value. |
error.code | string | Machine-readable failure code; see the error catalog. |
error.message | string | Display as escaped text; never execute or insert as HTML. |
next_retry_at | string or null | UTC timestamp. Format: date-time. |
paid_work_started | boolean | Whether paid preparation work began; not an invoice or an additional charge. |
created_at | string | UTC timestamp. Format: date-time. |
Example request
These examples target Node/CLI 0.11.0 and Python 0.4.0; confirm the installed version supports the method before use. The cURL tab uses Bash; CLI uses PowerShell. Python shows sync usage; AsyncNixflex uses the same JSON methods with async with and await. Set the account credential inNIXFLEX_API_KEY and the owned path identifiers shown below in environment variables. Set NXF_IDEMPOTENCY_KEY to a new valid key for one intended operation. This operation changes state. Review the request and disable automatic write retries.
request-131.json
{}
curl --request POST \
--url "https://api.nixflex.com/v1/knowledge/jobs/$(node -p 'encodeURIComponent(process.env.NXF_RESOURCE_ID)')/retry" \
--header "Authorization: Bearer $NIXFLEX_API_KEY" \
--header "Idempotency-Key: $NXF_IDEMPOTENCY_KEY" \
--header "Content-Type: application/json" \
--data '{}'
import Nixflex from 'nixflex';
const c = new Nixflex({apiKey:process.env.NIXFLEX_API_KEY,baseUrl:'https://api.nixflex.com',maxRetries:0});
const result = await c.knowledge.retryJob(process.env.NXF_RESOURCE_ID, {}, {idempotencyKey:process.env.NXF_IDEMPOTENCY_KEY});
// Keep knowledge and private results out of logs.
import os
from nixflex import Nixflex
with Nixflex(api_key=os.environ["NIXFLEX_API_KEY"], base_url="https://api.nixflex.com", max_retries=0) as c:
result = c.knowledge.retry_job(os.environ["NXF_RESOURCE_ID"], {}, idempotency_key=os.environ["NXF_IDEMPOTENCY_KEY"])
# Keep knowledge and private results out of logs.
# Save the JSON below privately as request-131.json.
nixflex knowledge retryJob "$env:NXF_RESOURCE_ID" --body '@request-131.json' --idempotency-key "$env:NXF_IDEMPOTENCY_KEY" --confirm --json --base-url "https://api.nixflex.com"
Example response
Illustrative response; identifiers are placeholders and optional fields can be absent.{
"id": "11111111-1111-4111-8111-111111111111",
"kb": "11111111-1111-4111-8111-111111111111",
"kind": "import",
"state": "pending",
"stage": "pending",
"progress": {
"percent": 0
},
"result": null,
"error": null,
"next_retry_at": null,
"paid_work_started": false,
"created_at": "2026-11-02T12:00:00Z"
}
Errors
Failures useerror.type, error.code, error.message, error.doc_url and optional error.details. Knowledge failures include a request ID in details when available. Read the safe message as text. A job can return HTTP 200 with state failed and error; that is a job failure, not an HTTP error. Source failures can arise during preparation after the initial accepted response.
| Status | Code | Meaning | What to do |
|---|---|---|---|
| 400 | invalid_input | Check the information and try again. | Correct the named fields or reduce the input before retrying. |
| 404 | not_found | That topic is not available. | Check the owned identifier and feature availability. |
| 409 | deleting | This knowledge base is being deleted. | Read current state and resolve the conflict before sending a new request. |
| 503 | unavailable | Knowledge is unavailable right now. Your saved information is safe. Try again. | Retry reads with bounded backoff; reconcile writes before repeating. |
| 503 | knowledge_unconfigured | Knowledge is not available yet. | Retry reads with bounded backoff; reconcile writes before repeating. |
| 503 | knowledge_not_released | Knowledge is not released yet. | Retry reads with bounded backoff; reconcile writes before repeating. |
| 403 | permission_denied | Your personal role does not allow this action. | Use a permitted personal account; do not share the organisation key. |
| 403 | membership_revoked | Your membership has ended. | Use a permitted personal account; do not share the organisation key. |
| 401 | unauthorized | The credential is missing or invalid. | Check the full account credential. |
| 429 | rate_limit_exceeded | The account request limit was reached. | Wait for the stated retry/reset time. |
| 409 | retry_unavailable | That file has expired. Upload it again or paste its text. | Read current state and resolve the conflict before sending a new request. |
| 410 | training_removed | Training has been removed. Edit a piece instead. | Correct the named fields or reduce the input before retrying. |
| 409 | idempotency_conflict | Use a new Idempotency-Key for different information. | Read current state and resolve the conflict before sending a new request. |
| 409 | stale_revision | The list changed. Reload it to see the latest pieces. | Read current state, review the changes and use the fresh revision. |
| 413 | storage_limit | Your account has reached its private storage limit. Remove old sources first. | Correct the named fields or reduce the input before retrying. |
| 400 | invalid_body | The request body could not be read. | Correct the named fields or reduce the input before retrying. |
| 413 | invalid_body | The request body is too large. | Keep the transport body within 10 MiB. |
Retry and idempotency
Use a new Idempotency-Key for each intended change. The same key with the identical operation and payload replays the stored result; a different payload conflicts. Do not automatically repeat an uncertain write. Read the current job/resource first, then reconcile with the original key. Check expected_revision against current state; a fresh key does not bypass revision checks.Related endpoints
Authorizations
Headers
Body
application/json
Response
Accepted; inspect the job before claiming completion.