Skip to content
Blode.md

AI agents: fetch the documentation index at llms.txt. Markdown versions are available by appending .md to any page URL, including this page's markdown.

REST API

Programmatic access to projects, deployments, and domains.

The base URL for all requests is https://api.blode.md.

Authentication

Every endpoint uses the Supabase user session token issued by blodemd login:

Authorization: Bearer <token>

The CLI attaches this header automatically.

Error format

All errors return JSON with an error string and an optional issues field for validation errors.

{ "error": "string", "issues": [] }

Health

MethodPathDescription
GET/healthReturns { ok: true, timestamp }

Projects

MethodPathDescription
GET/projects/List all projects for the authenticated user
POST/projects/Create a project
GET/projects/:projectIdGet a project
PATCH/projects/:projectIdUpdate a project

POST /projects/ — request body

FieldTypeDescriptionRequiredDefault
namestringDisplay name for the project.Yes
slugstringURL-safe identifier. Used as the subdomain at `{slug}.blode.md`.Yes
descriptionstringOptional short description.Yesundefined

Returns the created project.

PATCH /projects/:projectId — request body

FieldTypeDescriptionRequiredDefault
namestringNew display name.Yesundefined
descriptionstringNew description.Yesundefined
deploymentNamestringOverride the active deployment label.Yesundefined

Deployments

Deployments follow a three-step flow: create → upload files → finalize.

MethodPathDescription
POST/projects/slug/:slug/deploymentsCreate a deployment
POST/projects/slug/:slug/deployments/:id/files/batchUpload files in batch
POST/projects/slug/:slug/deployments/:id/finalizeFinalize and promote

POST /projects/slug/:slug/deployments — request body

FieldTypeDescriptionRequiredDefault
branchstringGit branch name.Yes"main"
commitMessagestringCommit message attached to this deployment.Yesundefined
environmentstringDeployment environment label.Yesundefined

POST .../files/batch — request body

FieldTypeDescriptionRequiredDefault
files[].pathstringRelative path of the file within the docs directory.Yes
files[].contentBase64stringBase64-encoded file contents.Yes
files[].contentTypestringMIME type. Inferred from the path if omitted.Yesundefined

POST .../finalize — request body

FieldTypeDescriptionRequiredDefault
promotebooleanPromote this deployment to production immediately.Yestrue

Domains

MethodPathDescription
GET/projects/:projectId/domainsList domains
POST/projects/:projectId/domainsAdd a custom domain
DELETE/projects/:projectId/domains/:domainIdRemove a domain
GET/projects/:projectId/domains/:domainId/verificationGet DNS verification records
POST/projects/:projectId/domains/:domainId/verifyTrigger domain verification

POST /projects/:projectId/domains — request body

FieldTypeDescriptionRequiredDefault
hostnamestringThe fully-qualified domain name to add, e.g. `docs.example.com`.Yes
pathPrefixstringMount the docs at a subpath, e.g. `/docs`.Yesundefined