pctx0
from pctx0 import Pctx0Client
client = Pctx0Client(
access_key="YOUR_ACCESS_KEY",
workspace_id="YOUR_WORKSPACE_ID",
)
doc = client.knowledge.upload(
file="notes.txt",
title="Onboarding notes",
labels={"tag": "docs", "team": "platform"},
)
import { Nctx0Client } from "@actx0/nctx0";
const client = new Nctx0Client({
accessKey: "YOUR_ACCESS_KEY",
workspaceId: "YOUR_WORKSPACE_ID",
});
const doc = await client.knowledge.upload({
file: "notes.txt",
title: "Onboarding notes",
labels: { tag: "docs", team: "platform" },
});
package main
import (
"context"
"github.com/Actx0/Gctx0"
)
func main() {
client := gctx0.NewClient(
gctx0.WithAccessKey("YOUR_ACCESS_KEY"),
gctx0.WithWorkspaceId("YOUR_WORKSPACE_ID"),
)
defer client.Close()
ctx := context.Background()
doc, err := client.Knowledge.Upload(
ctx,
"notes.txt",
"Onboarding notes",
map[string]string{"tag": "docs", "team": "platform"},
)
_ = doc
_ = err
}
curl -X POST 'https://app.actx0.com/api/v1/workspaces/<workspaceId>/documents' \
-H "X-Access-Key: YOUR_ACCESS_KEY" \
-H "Accept: application/json" \
-F "title=Onboarding notes" \
-F "[email protected]"
# ---
# acli
export ACTX0_ACCESS_KEY="YOUR_ACCESS_KEY"
export ACTX0_WORKSPACE_ID="YOUR_WORKSPACE_ID"
acli knowledge upload notes.txt \
--title "Onboarding notes" \
--label tag=docs \
--label team=platform
{
"id": "88888888-8888-8888-8888-888888888888",
"workspaceId": "11111111-1111-1111-1111-111111111111",
"title": "Product FAQ",
"filename": "faq.md",
"contentType": "text/markdown",
"checksum": "e3b0c44298fc1c149afbf4c8996fb924",
"size": {
"value": 2048,
"unit": "bytes"
},
"charCount": 1800,
"status": "processing",
"createdAt": "2026-07-01T12:00:00Z",
"updatedAt": "2026-07-01T12:00:00Z",
"labels": [
"faq",
"support"
],
"chunkingStrategy": "recursive",
"chunkSize": 800,
"chunkOverlap": 100
}{
"errorMessage": "Name is required"
}{
"errorMessage": "Name is required"
}{
"errorMessage": "Name is required"
}{
"errorMessage": "Name is required"
}{
"errorMessage": "Name is required"
}Knowledge
Upload Document
Upload a knowledge document as multipart/form-data. Accepted files: .txt or .md, UTF-8, max 2 MB. labels may be a JSON array string or comma/semicolon-delimited values. Label keys must not start with _.
POST
/
workspaces
/
{workspaceId}
/
documents
pctx0
from pctx0 import Pctx0Client
client = Pctx0Client(
access_key="YOUR_ACCESS_KEY",
workspace_id="YOUR_WORKSPACE_ID",
)
doc = client.knowledge.upload(
file="notes.txt",
title="Onboarding notes",
labels={"tag": "docs", "team": "platform"},
)
import { Nctx0Client } from "@actx0/nctx0";
const client = new Nctx0Client({
accessKey: "YOUR_ACCESS_KEY",
workspaceId: "YOUR_WORKSPACE_ID",
});
const doc = await client.knowledge.upload({
file: "notes.txt",
title: "Onboarding notes",
labels: { tag: "docs", team: "platform" },
});
package main
import (
"context"
"github.com/Actx0/Gctx0"
)
func main() {
client := gctx0.NewClient(
gctx0.WithAccessKey("YOUR_ACCESS_KEY"),
gctx0.WithWorkspaceId("YOUR_WORKSPACE_ID"),
)
defer client.Close()
ctx := context.Background()
doc, err := client.Knowledge.Upload(
ctx,
"notes.txt",
"Onboarding notes",
map[string]string{"tag": "docs", "team": "platform"},
)
_ = doc
_ = err
}
curl -X POST 'https://app.actx0.com/api/v1/workspaces/<workspaceId>/documents' \
-H "X-Access-Key: YOUR_ACCESS_KEY" \
-H "Accept: application/json" \
-F "title=Onboarding notes" \
-F "[email protected]"
# ---
# acli
export ACTX0_ACCESS_KEY="YOUR_ACCESS_KEY"
export ACTX0_WORKSPACE_ID="YOUR_WORKSPACE_ID"
acli knowledge upload notes.txt \
--title "Onboarding notes" \
--label tag=docs \
--label team=platform
{
"id": "88888888-8888-8888-8888-888888888888",
"workspaceId": "11111111-1111-1111-1111-111111111111",
"title": "Product FAQ",
"filename": "faq.md",
"contentType": "text/markdown",
"checksum": "e3b0c44298fc1c149afbf4c8996fb924",
"size": {
"value": 2048,
"unit": "bytes"
},
"charCount": 1800,
"status": "processing",
"createdAt": "2026-07-01T12:00:00Z",
"updatedAt": "2026-07-01T12:00:00Z",
"labels": [
"faq",
"support"
],
"chunkingStrategy": "recursive",
"chunkSize": 800,
"chunkOverlap": 100
}{
"errorMessage": "Name is required"
}{
"errorMessage": "Name is required"
}{
"errorMessage": "Name is required"
}{
"errorMessage": "Name is required"
}{
"errorMessage": "Name is required"
}Authorizations
AccessKeyAuthApiKeyAuth
Workspace access key for agent/runtime integrations.
Path Parameters
Body
multipart/form-data
Response
Created
Example:
"88888888-8888-8888-8888-888888888888"
Example:
"11111111-1111-1111-1111-111111111111"
Example:
"Product FAQ"
Example:
"faq.md"
Example:
"text/markdown"
Example:
"e3b0c44298fc1c149afbf4c8996fb924"
Show child attributes
Show child attributes
Example:
1800
Available options:
processing, indexed, failed Example:
"processing"
Example:
"2026-07-01T12:00:00Z"
Example:
"2026-07-01T12:00:00Z"
Example:
["faq", "support"]
Example:
"recursive"
Example:
800
Example:
100
Was this page helpful?
