Errors
Status codes and exact message strings the Knowledge Docs module returns.
Status codes
| Status | When | Exact body |
|---|---|---|
401 | Missing or invalid token | {"message":"Unauthenticated."} |
403 | Policy denied (not your library/document, insufficient role) | {"message":"This action is unauthorized."} |
403 | Assistant belongs to a different organization | {"message":"Assistant does not belong to your organization."} |
403 | Assistant not owned by the caller (non-admin) | {"message":"You can only assign documents to assistants you own."} |
404 | Unknown library | {"message":"No query results for model [App\\Models\\KnowledgeBase] <id>."} |
404 | Unknown document, or it belongs to a different library than the URL's | {"message":"No query results for model [App\\Models\\KnowledgeArticle] <id>."} |
404 | Unknown assignment | {"message":"No query results for model [App\\Models\\KnowledgeArticleAssignment] <id>."} |
404 | Permission-change target email has no share or invite | {"message":"This document is not shared with that email."} |
422 | Caller already owns a library | {"message":"You already have a library. Add documents to it instead of creating another."} |
422 | No reseller resolvable for a new library (super admin, no override) | {"message":"reseller_id required"} |
422 | ensure-default could not create/resolve a library | {"message":"Could not create or resolve a library. Try opening Knowledge Docs once, or contact support."} |
422 | Document is not published (sync or assign) | {"message":"Only published documents can be synced to search indexes."} or {"message":"Only published documents can be assigned to assistants."} |
422 | Assigning from a non-assistant-audience library | {"message":"Only documents from voice libraries can be assigned to assistants."} |
422 | Assistant and document in different organizations | {"message":"Assistant and document must belong to the same organization."} |
422 | Neither document nor assistant identifier supplied on assign | {"message":"knowledge_article_id or knowledge_article_ids is required."} or {"message":"assistant_id or assistant_ids is required."} |
422 | Sharing with the document's owner, or with yourself, or granting no permission | {"message":"This person already owns the document."} or a validation-style single-field message, e.g. {"message":"Enter a valid email address."} |
422 | Validation failed | {"message":"…","errors":{"field":["…"]}} |
500 | Removal from search indexes failed on delete | {"message":"Could not remove article from search indexes. Please try again."} |
500 | Sync failed | {"message":"Sync failed. <exception message>","data":{…}} |
403 | Feature knowledge_docs not enabled for the account | {"message":"This feature is not enabled for your account. Please contact your administrator.","feature":"knowledge_docs"} |
Platform-wide 401/409/429 responses are documented once in the Introduction. Model-not-found messages above show the framework's default wording, which embeds the model class and the identifier that was looked up.