Import An Obsidian Vault
POST
/imports/obsidian
const url = 'https://markdawn.space/api/v1/imports/obsidian';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"files":[{"path":"Welcome.md","content":"# Welcome\n"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://markdawn.space/api/v1/imports/obsidian \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "files": [ { "path": "Welcome.md", "content": "# Welcome\n" } ] }'Imports a validated Obsidian vault file list and creates its folders, pages, images, and backlinks at the Markdawn root.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
files
required
Array<object>
object
path
required
string
content
string
data
string
mimeType
string
Example
{ "files": [ { "path": "Welcome.md", "content": "# Welcome\n" } ]}Responses
Section titled “Responses”Counts for created folders, pages, images, backlinks, and reported errors.
Media typeapplication/json
object
foldersCreated
required
number
pagesCreated
required
number
imagesUploaded
required
number
backlinksCreated
required
number
errors
required
Array<string>
Examplegenerated
{ "foldersCreated": 1, "pagesCreated": 1, "imagesUploaded": 1, "backlinksCreated": 1, "errors": [ "example" ]}The API token is missing a required scope: pages:write.
Media typeapplication/json
Structured error returned when the request cannot be completed.
object
error
required
Error details for programmatic handling.
object
code
required
Stable error code.
string
message
required
Human-readable explanation.
string
Examplegenerated
{ "error": { "code": "example", "message": "example" }}