Create a knowledge document upload
Under knowledge:write, creates pending metadata and returns a five-minute direct R2 PUT capability. A document-scoped Workflow expires an unused capability or validates, promotes, and indexes uploaded bytes; callers observe progress with Get a knowledge document. No create idempotency key exists, so retain the returned document after an uncertain response.
POST
/
knowledge
Create a knowledge document upload
curl --request POST \
--url https://api.getarbol.com/v1/knowledge \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fileName": "<string>",
"fileSize": 123,
"mediaType": "application/pdf",
"name": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
fileName: '<string>',
fileSize: 123,
mediaType: 'application/pdf',
name: '<string>'
})
};
fetch('https://api.getarbol.com/v1/knowledge', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.getarbol.com/v1/knowledge"
payload = {
"fileName": "<string>",
"fileSize": 123,
"mediaType": "application/pdf",
"name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"document": {
"createdAt": "2026-08-29T14:30:00Z",
"description": "<string>",
"file": {
"mediaType": "application/pdf",
"name": "<string>",
"sizeBytes": 123
},
"id": "agt_018f47a2-4f4d-7d61-9e2c-1d7b8e9a0c31",
"indexError": "<string>",
"indexedAt": "2026-08-29T14:30:00Z",
"name": "<string>",
"status": "ready",
"updatedAt": "2026-08-29T14:30:00Z"
},
"upload": {
"expiresAt": "2026-08-29T14:30:00Z",
"headers": {},
"method": "PUT",
"url": "<string>"
}
}{
"defined": true,
"inferable": true,
"code": "BAD_REQUEST",
"status": 400,
"message": "<string>",
"data": {
"issues": [
{
"code": "custom",
"message": "<string>",
"path": [
"<string>"
]
}
],
"truncated": true
}
}{
"defined": true,
"inferable": true,
"code": "UNAUTHORIZED",
"status": 401,
"message": "<string>",
"data": "<unknown>"
}{
"defined": true,
"inferable": true,
"code": "FORBIDDEN",
"status": 403,
"message": "<string>",
"data": {
"missingPermissions": [
"agents:read"
]
}
}{
"code": "PAYLOAD_TOO_LARGE",
"defined": false,
"inferable": false,
"message": "<string>",
"data": "<unknown>"
}{
"code": "UNSUPPORTED_MEDIA_TYPE",
"defined": false,
"inferable": false,
"message": "<string>",
"data": "<unknown>"
}{
"defined": true,
"inferable": true,
"code": "TOO_MANY_REQUESTS",
"status": 429,
"message": "<string>",
"data": {
"retryAfterSeconds": 123
}
}{
"defined": true,
"inferable": true,
"code": "SERVICE_UNAVAILABLE",
"status": 503,
"message": "<string>",
"data": "<unknown>"
}Authorizations
userOAuthmachineOAuth
Organization-scoped Auth0 user access token issued to an approved first-party client or exchanged by a trusted OBO resource server.
Body
application/json
Metadata for creating a pending document before bytes are uploaded through a direct capability.
Required string length:
1 - 255Required range:
x <= 4194304Accepted source media type for Knowledge ingestion.
Available options:
application/pdf, text/plain, text/markdown, text/html, application/vnd.openxmlformats-officedocument.wordprocessingml.document Example:
"application/pdf"
Required string length:
1 - 255Maximum string length:
4000⌘I
Create a knowledge document upload
curl --request POST \
--url https://api.getarbol.com/v1/knowledge \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fileName": "<string>",
"fileSize": 123,
"mediaType": "application/pdf",
"name": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
fileName: '<string>',
fileSize: 123,
mediaType: 'application/pdf',
name: '<string>'
})
};
fetch('https://api.getarbol.com/v1/knowledge', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.getarbol.com/v1/knowledge"
payload = {
"fileName": "<string>",
"fileSize": 123,
"mediaType": "application/pdf",
"name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"document": {
"createdAt": "2026-08-29T14:30:00Z",
"description": "<string>",
"file": {
"mediaType": "application/pdf",
"name": "<string>",
"sizeBytes": 123
},
"id": "agt_018f47a2-4f4d-7d61-9e2c-1d7b8e9a0c31",
"indexError": "<string>",
"indexedAt": "2026-08-29T14:30:00Z",
"name": "<string>",
"status": "ready",
"updatedAt": "2026-08-29T14:30:00Z"
},
"upload": {
"expiresAt": "2026-08-29T14:30:00Z",
"headers": {},
"method": "PUT",
"url": "<string>"
}
}{
"defined": true,
"inferable": true,
"code": "BAD_REQUEST",
"status": 400,
"message": "<string>",
"data": {
"issues": [
{
"code": "custom",
"message": "<string>",
"path": [
"<string>"
]
}
],
"truncated": true
}
}{
"defined": true,
"inferable": true,
"code": "UNAUTHORIZED",
"status": 401,
"message": "<string>",
"data": "<unknown>"
}{
"defined": true,
"inferable": true,
"code": "FORBIDDEN",
"status": 403,
"message": "<string>",
"data": {
"missingPermissions": [
"agents:read"
]
}
}{
"code": "PAYLOAD_TOO_LARGE",
"defined": false,
"inferable": false,
"message": "<string>",
"data": "<unknown>"
}{
"code": "UNSUPPORTED_MEDIA_TYPE",
"defined": false,
"inferable": false,
"message": "<string>",
"data": "<unknown>"
}{
"defined": true,
"inferable": true,
"code": "TOO_MANY_REQUESTS",
"status": 429,
"message": "<string>",
"data": {
"retryAfterSeconds": 123
}
}{
"defined": true,
"inferable": true,
"code": "SERVICE_UNAVAILABLE",
"status": 503,
"message": "<string>",
"data": "<unknown>"
}