# Import An Obsidian Vault

`POST /imports/obsidian`

Imports a validated Obsidian vault file list and creates its folders, pages, images, and backlinks at the Markdawn root.
## 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.

### `application/json`

```json
{
  "files": [
    {
      "path": "Welcome.md",
      "content": "# Welcome\n"
    }
  ]
}
```
## Responses

### 201

Counts for created folders, pages, images, backlinks, and reported errors.


### `application/json`

```json
{
  "foldersCreated": 0,
  "pagesCreated": 0,
  "imagesUploaded": 0,
  "backlinksCreated": 0,
  "errors": [
    "string"
  ]
}
```

### 403

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


### `application/json`

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