create_doc
Create a document and return its public URL. Re-using an existing name adds a new immutable version. Omit the name to get a random one. For content larger than ~10KB or any file already on disk, do NOT inline it here - run docbin push <file> [--name <doc>] in your shell instead (set DOCBIN_TOKEN to an API key from https://docbin.app/settings/keys). Inlining large content streams it through the model token-by-token and will time out.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Document name. A random slug is generated if omitted. | |
| files | No | Optional: a multi-file group. When provided, supersedes content/content_type. The entry file is auto-selected (index/readme/main, else first). CROSS-FILE LINKS: to link from one file in the group to another, use a bare relative link to the sibling's filename, exactly as given in this `files` array - e.g. <a href="page2.html">. The viewer intercepts it and switches the active file (updating the left-pane selection and the URL). Do NOT use absolute URLs, slugs, ./ prefixes, or #file- hashes for cross-file links. In-page anchor links within a file (e.g. #section) work as normal. | |
| content | No | The HTML, Markdown, MDX, or code body of the document. | |
| language | No | Syntax-highlight language hint, used when content_type is 'code' (e.g. 'rust'). | |
| visibility | No | Defaults to public. private = owner only; unlisted = anyone with the link; public = listed, searchable, and crawlable. | |
| content_type | No | Defaults to html. 'mdx' renders Markdown with JSX components; 'code' renders a single syntax-highlighted block. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| appUrl | Yes | ||
| handle | Yes | ||
| rawUrl | Yes | ||
| deleted | No | ||
| snippet | No | ||
| version | Yes | ||
| language | No | ||
| visibility | No | ||
| contentType | No |