Create A Page
POST
/pages
const url = 'https://markdawn.space/api/v1/pages';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"title":"Project notes","markdown":"# Project notes\n\nStart writing here."}'};
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/pages \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "title": "Project notes", "markdown": "# Project notes\n\nStart writing here." }'Creates a page in the requested folder, or at the Markdawn root when parentId is omitted or null. You can include initial markdown in the request body.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Created page metadata.
Media typeapplication/json
object
id
required
string format: uuid
title
required
string
createdAt
required
string
updatedAt
required
string
Example
{ "permission": "view"}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" }}