К содержанию
TelegaFirst

Для AI-агентов: markdown этой страницы — /docs/api-op-updateknowledge.mdиндекс документации — /llms.txt

updateKnowledge

Обновлено

PATCH /api/v1/tools/kb

Edit tenant knowledge by board and tenant sequence

Авторизация и права

Scopes: ALL. Auth alternatives: OR; scopes внутри альтернативы: ALL.

ПолеЗначение
security.0.hubApiKey[]
security.1.hubBearer[]
securitySchemes.hubApiKey.in"header"
securitySchemes.hubApiKey.name"X-Api-Key"
securitySchemes.hubApiKey.type"apiKey"
securitySchemes.hubBearer.scheme"bearer"
securitySchemes.hubBearer.type"http"
x-required-scopes["kb:write"]

Параметры запроса

ПолеЗначение
0.description"Replay the same tenant, credential, route and request for 24 hours."
0.in"header"
0.name"Idempotency-Key"
0.requiredfalse
0.schema0.schema

Тело запроса

ПолеЗначение
content.application/json.schemaKnowledgeUpdateRequest
requiredtrue

Ответы

ПолеЗначение
200.content.application/json.schemaKnowledgeEntry
200.description"Updated knowledge entry."
200.headers.X-Bot-Username.schema200.headers.X-Bot-Username.schema
200.headers.X-Client-Slug.schema200.headers.X-Client-Slug.schema
200.headers.X-RateLimit-Limit.schema200.headers.X-RateLimit-Limit.schema
200.headers.X-RateLimit-Remaining.schema200.headers.X-RateLimit-Remaining.schema
200.headers.X-RateLimit-Reset.schema200.headers.X-RateLimit-Reset.schema

Ошибки

ПолеЗначение
400.content.application/problem+json.schemaProblemDetails
400.description"Strict request validation failed."
400.x-error-codes["VALIDATION_ERROR"]
401.content.application/problem+json.schemaProblemDetails
401.description"Missing, invalid, revoked or expired API credential. Surface-session JWTs are not accepted."
401.x-error-codes["INVALID_API_KEY"]
403.content.application/problem+json.schemaProblemDetails
403.description"Missing effective scope, forbidden publishable key, inaccessible tenant or no active bot."
403.x-error-codes["INSUFFICIENT_SCOPE","PUBLISHABLE_KEY_NOT_ALLOWED","FORBIDDEN","NO_ACTIVE_BOT"]
404.content.application/problem+json.schemaProblemDetails
404.description"No live knowledge entry with this tenant, board and sequence."
404.x-error-codes["NOT_FOUND"]
409.content.application/problem+json.schemaProblemDetails
409.description"The entry changed while it was being written, or a request with this key is still processing."
409.x-error-codes["CONFLICT"]
413.content.application/problem+json.schemaProblemDetails
413.description"Per-tool payload size or item-count limit exceeded before validation."
413.x-error-codes["PAYLOAD_TOO_LARGE","ITEM_COUNT_EXCEEDED"]
422.content.application/problem+json.schemaProblemDetails
422.description"Idempotency-Key reused with different inputs."
422.x-error-codes["IDEMPOTENCY_KEY_MISMATCH"]
429.content.application/problem+json.schemaProblemDetails
429.description"Per-tool rate limit exceeded or unavailable; fail closed."
429.headers.Retry-After.requiredfalse
429.headers.Retry-After.schema429.headers.Retry-After.schema
429.x-error-codes["RATE_LIMIT_EXCEEDED","RATE_LIMIT_UNAVAILABLE"]
500.content.application/problem+json.schemaProblemDetails
500.description"Unexpected internal failure."
500.x-error-codes["INTERNAL_ERROR"]

Дополнительные условия

ПолеЗначение
description"kb_type plus numeric positive-int4 seq_num (1–2147483647) addresses the entry inside the authenticated tenant. patch carries at least one of title (1–200), content (1–4000), tags, prepared_step_seq_nums ([] clears binding), is_active, is_public. A text change or switching the entry back on queues re-indexing and returns status indexing; switching it off takes it out of the agent search and returns status pending with null graph statistics. Idempotency-Key is optional on PATCH. 409 CONFLICT means the entry changed while it was being written (for example the indexer finished): read it again and retry. No If-Match or ETag contract."
operationId"updateKnowledge"
summary"Edit tenant knowledge by board and tenant sequence"
tags["kb"]
x-idempotency.mismatchStatus422
x-idempotency.requiredfalse
x-idempotency.ttlSeconds86400
x-pagination.kind"none"