> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt. # Create Document POST https://fai.buildwithfern.com/document/{domain}/create Content-Type: application/json Reference: https://buildwithfern.com/learn/docs/ai-features/ask-fern/api-reference/document/create-document ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Servers - `https://fai.buildwithfern.com` (Production, default) - `https://fai-dev.buildwithfern.com` (Development) - `http://localhost:8080` (Local) ## Request ### Path parameters - `domain` (string, required) ### Headers - `x-fern-basepath` (string, optional, nullable) — The basepath of the docs site that the document belongs to, e.g. `/plants` for a site served at `docs.example.com/plants`. Omit this for sites served at the root of the domain. Documents are only retrieved by Ask Fern on the site matching the domain and basepath they were created with. ### Body (application/json) This endpoint expects an any. - `any` ## Response ### 200 Successful Response - `list of object` - `document_id` (string, required) — The unique identifier of the created document ## Errors ### 422 Unprocessable Entity Error Validation Error - `detail` (list of object, optional) - `loc` (list of string or integer, required) - `msg` (string, required) - `type` (string, required) ## Examples **Request** ```json undefined ``` **Response** ```json [ { "document_id": "string" } ] ```