Create A Folder
POST
/folders
const url = 'https://markdawn.space/api/v1/folders';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"Project notes"}'};
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/folders \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Project notes" }'Creates a folder in the requested parent, or at the Markdawn root when parentId is omitted or null.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Created folder metadata.
Media typeapplication/json
object
id
required
string format: uuid
name
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" }}