Docs
API ReferenceReferenceAgents

Set an agent's knowledge

PUT
/agents/{agentId}/knowledge

Replaces the knowledgebases the Agent draws on, in the order given (pass [] to detach all). Knowledgebases must belong to this organization. Requires the agents:write scope; a personal key also needs the member role or above. Edits change the DRAFT only: nothing reaches end users until POST …/publish.

AuthorizationBearer <token>

An organization API key, created from a Portal's Webhooks page (Provisioning API card). The secret is shown once at creation and stored only as a hash. Keys are organization-wide and carry scopes (end_users:read, end_users:write). Rate limit: 120 requests per minute per key (sliding 60-second window).

In: header

Path Parameters

agentId*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08/knowledge" \  -H "Content-Type: application/json" \  -d '{    "knowledgebaseIds": [      "03db0f85-e221-4ccf-9219-eddc8b9c7004"    ]  }'
{  "knowledge": [    {      "knowledgebaseId": "2eaa043e-18a5-42f0-bbe8-1ad77d6f870c",      "title": "string"    }  ]}