Documents Create From Content
po_documents_create_from_contentWRITES DATA. Creates or changes data in the workspace. Create a PDF document from Markdown or HTML content in a workspace (output is always PDF; optional idempotency_key makes retries safe).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"content": "<content>",
"workspace_id": "<workspace_id>"
},
"name": "po_documents_create_from_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Document title (also used as the filename) | |
| content | Yes | Markdown or HTML source (required). Not html_content. | |
| language | No | Language for formatting (de/en) | de |
| metadata | No | Metadata as key-value pairs (stored as IDP fields). | |
| priority | No | LEGACY queue weight (numeric). Prefer processing_lane (Start-SLA). If processing_lane is set, the lane wins. Do not use as the public SLA product. | |
| custom_css | No | Additionals CSS for the PDF-Layout | |
| footer_html | No | HTML for footer | |
| header_html | No | HTML for page header | |
| content_type | No | Input format: markdown (default) or html. HTML is sanitized: scripts, frames, forms, event handlers and remote resources are removed. | markdown |
| workspace_id | Yes | Target workspace ID (required). Use po_workspaces_list to find valid workspace IDs. | |
| auto_classify | No | Request an additional explicit classification run after creation. This flag does NOT switch off the workspace AI-DMS automation: if the target workspace has AI-DMS enabled, the new document is processed and charged regardless of this flag (see processing_policy in the response). Check the workspace with po_workspaces_list (ai_dms_mode) before creating. | |
| output_format | No | Only "pdf" is supported; any other value is rejected with UNSUPPORTED_FORMAT. | |
| idempotency_key | No | Optional client-chosen key (8-128 chars). Same key + same payload within 24h replays the stored document (idempotent_replay=true, charged_this_request=0). Same key + changed payload is rejected with IDEMPOTENCY_CONFLICT (HTTP 409) — no second document, no charge. Use a new key for changed content. | |
| processing_lane | No | Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hint | No | ||
| text | No | ||
| pofid | No | ||
| job_id | No | ||
| status | No | ||
| details | No | ||
| message | No | ||
| _warnings | No | ||
| file_name | No | ||
| retryable | No | ||
| error_code | No | ||
| http_status | No | ||
| display_name | No | ||
| documents_id | No | ||
| workspace_id | No | ||
| _billing_summary | No |