Skip to content

Import A Page

POST
/imports/markdown
curl --request POST \
--url https://markdawn.space/api/v1/imports/markdown \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@file

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

Media typemultipart/form-data
object
file
required
string format: binary

The imported page and any local-image warnings.

Media typeapplication/json
object
page
required
object
id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
title
required
string
warnings
required
Array<object>
object
code
required
string
Allowed value: LOCAL_IMAGES_NOT_IMPORTED
count
required
integer
> 0 <= 9007199254740991
message
required
string
Example
{
"warnings": [
{
"code": "LOCAL_IMAGES_NOT_IMPORTED"
}
]
}

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"
}
}