# Import A Page

`POST /imports/markdown`

Accepts one .md file and creates a page at the Markdawn root. Local image references that cannot be uploaded are returned as warnings.
## Authentication

Use one of the following authentication alternatives:

- **API token** (`bearerToken`) : Send a named API token in the Authorization header. Send it in the `Authorization: Bearer <token>` header.
- **Better Auth browser session** (`browserSession`) : Use the Better Auth session cookie from a signed-in browser session. Send it in the `better-auth.session_token` cookie.
## Token permissions

API tokens must include `pages:write`.
## Request Body

Required.

### `multipart/form-data`

```text
{
  "file": "string"
}
```
## Responses

### 201

The imported page and any local-image warnings.


### `application/json`

```json
{
  "page": {
    "id": "00000000-0000-0000-0000-000000000000",
    "title": "string"
  },
  "warnings": [
    {
      "code": "string",
      "count": 0,
      "message": "string"
    }
  ]
}
```

### 403

The API token is missing a required scope: pages:write.


### `application/json`

```json
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
```
