Skip to content
Home

Add text

Add a raw text snippet directly to an AI Agent’s knowledge base. This is useful for adding private information, internal policies, or any custom content that isn’t available on a public webpage.

POST/knowledge-base/add-text

Body

agent_idstringrequired

The UUID of the agent to add this source to.

titlestringrequired

A descriptive title for this text snippet (e.g. “Refund Policy”).

contentstringrequired

The full text content to add to the knowledge base.

Headers

Authorizationstringrequired

Your API Key formatted as Bearer sk_live_…

Returns the newly created data source object with status pending. The content will be automatically processed in the background.

Terminal window
curl -X POST https://app.picobot.dev/api/knowledge-base/add-text \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"agent_id": "91981020-f783-4544-ad96-39857ac589cb", "title": "Refund Policy", "content": "We offer a 30-day money-back guarantee..."}'
{
"data": {
"id": "ds-0002-0000-0000-0000-000000000002",
"type": "text",
"title": "Refund Policy",
"status": "pending",
"created_at": "2024-06-14T10:00:00+00:00"
}
}