Skip to main content
POST
/
api
/
knowledge-base
/
attach
{
  "documentation_id": "doc_a1b2c3d4e5f6",
  "agent_id": "agent_b2c3d4e5f6a7"
}
{
  "success": true,
  "message": "Document 'Product Manual' attached to agent 'Sales Rep'"
}
Attach a knowledge base document to an agent, allowing the agent to query it during calls.

Headers

X-API-Key
string
required
Your API key for authentication.
X-Organization-Id
string
required
The organization ID.
Content-Type
string
required
Must be application/json.

Request Body

documentation_id
string
required
The ID of the document to attach (format: doc_[a-f0-9]{12,}).
agent_id
string
required
The ID of the agent to attach to (format: agent_[a-f0-9]{12,}).

Permissions

  • kb:update (admin, agent_manager)

Response

success
boolean
Indicates if the attachment was successful.
message
string
Human-readable success message.
{
  "documentation_id": "doc_a1b2c3d4e5f6",
  "agent_id": "agent_b2c3d4e5f6a7"
}
{
  "success": true,
  "message": "Document 'Product Manual' attached to agent 'Sales Rep'"
}

Errors

404
object
Document or agent not found.
403
object
Document or agent belongs to different organization.