Web UI
From your project page, click Upload to select a .md file. You can also drag and drop files directly onto the project page, or paste markdown content into the editor.
Each upload creates a new version. If a document with the same filename already exists, it's updated rather than duplicated.
JSON API
Create a new document with POST (fails with 409 if it already exists):
curl -X POST https://pdrive.io/api/acme/docs/deploy-guide.md \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"content": "# Deploy guide\n\nYour markdown content here."}'
Or use PUT to create-or-update (the most common publishing pattern):
curl -X PUT https://pdrive.io/api/acme/docs/deploy-guide.md \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"content": "# Deploy guide\n\nUpdated content.", "message": "v2 rewrite"}'
Both accept content (required), title, tags, and message fields. PUT also accepts force: true to bypass publish conflict detection.
See the API docs for authentication setup and the full endpoint reference.
MCP
If you've connected the pdrive MCP server to your editor, use the publish_document tool:
{
"tool": "publish_document",
"arguments": {
"account": "acme",
"project": "docs",
"filename": "architecture.md",
"content": "# Architecture\n\nSystem design overview."
}
}
See the MCP docs for installation and configuration.