3AI Desktop REST API
Transform your AI assistant into a website builder. This API lets you manage files and build full websites inside your 3AI Desktop workspace — and the real magic is that any AI with web/HTTP tool access can do the building for you.
/wp-json/3ai/v1 Requires Basic Auth (WP App Password)Overview
Quick Start (5 minutes)
Get an Application Password and give your AI a “setup prompt” so it can build sites directly in your workspace.
Step 1 — Create your API credentials
- Log into your WordPress account (Admin).
- Go to Users → Profile.
- Scroll to Application Passwords.
- Create a new password named:
My AI Assistant. - Copy it immediately — it won’t be shown again.
Step 2 — Give your AI the setup prompt
Copy-paste this into your AI. Replace the placeholders:
I have access to a REST API for managing website files in my 3AI Desktop workspace. Here are the details:
BASE URL: https://buildingabot.com/wp-json/3ai/v1/
AUTHENTICATION (use Basic Auth):
Username: YOUR_USERNAME_HERE
Password: YOUR_APP_PASSWORD_HERE
AVAILABLE ENDPOINTS:
1) CREATE DIRECTORY
POST /mkdir
Body: {"path": "/workspace/sites/SITE-NAME/pages"}
2) CREATE/UPDATE FILE
POST /files
Body: {"path": "/workspace/sites/SITE-NAME/pages/FILENAME.html", "content": "HTML_CONTENT"}
3) LIST FILES
GET /files?path=/workspace/sites
4) READ FILE
GET /files?path=/workspace/sites/SITE-NAME/pages/FILENAME.html&action=read
IMPORTANT RULES:
- All websites go in /workspace/sites/SITE-NAME/
- Each site must have a pages/ subdirectory
- Each site must have an index.json navigation file
- Allowed file types: html, json, txt, md, js, css
- Max file size: 5MB per file
NAVIGATION FILE FORMAT (index.json):
{
"pages": [
{ "id": "unique-id", "title": "Page Title", "path": "pages/filename.html", "parentId": null }
]
}
EXAMPLE WORKFLOW - Creating a 2-page site:
1) Create directory:
POST /mkdir
{"path": "/workspace/sites/example-site/pages"}
2) Create home page:
POST /files
{"path": "/workspace/sites/example-site/pages/home.html", "content": "<!DOCTYPE html><html><head><title>Home</title></head><body><h1>Welcome</h1></body></html>"}
3) Create about page:
POST /files
{"path": "/workspace/sites/example-site/pages/about.html", "content": "<!DOCTYPE html><html><head><title>About</title></head><body><h1>About Us</h1></body></html>"}
4) Create navigation:
POST /files
{"path": "/workspace/sites/example-site/index.json", "content": "{\"pages\":[{\"id\":\"home\",\"title\":\"Home\",\"path\":\"pages/home.html\",\"parentId\":null},{\"id\":\"about\",\"title\":\"About\",\"path\":\"pages/about.html\",\"parentId\":\"home\"}]}"}
From now on, whenever I ask you to create a website or save content to my workspace, automatically use these API endpoints to do it. Always confirm what you're creating before making the API calls.
Step 3 — Start building
Once your AI has the prompt, you can say:
- “Create a portfolio website for me”
- “Build a documentation site with 5 pages”
- “Make a landing page for my product”
- “Organize these notes into a knowledge base website”
What you can build
| Time | Examples |
|---|---|
| ~5 minutes | Personal homepage, resume/CV, product landing page, photo gallery, recipe collection |
| ~15 minutes | Multi-page portfolio, documentation site, business website, FAQ knowledge base |
| ~30 minutes | Full business site, comprehensive docs, catalogs, tutorials, multi-section knowledge bases |
Example prompts to use
Create a professional portfolio website in my workspace with these pages:
- Home (hero section, featured work)
- About (bio, skills, timeline)
- Projects (3 sample projects with descriptions)
- Contact (contact form layout)
Use modern design with gradients and cards. Save as "my-portfolio".
Create a documentation site for a JavaScript library with:
- Getting Started page
- Installation guide
- API Reference with code examples
- FAQ page
Make it clean and developer-friendly. Save as "js-docs".
Create a SaaS landing page for an AI writing tool with:
- Hero section with value proposition
- Features section (3 key features)
- Pricing table (3 tiers)
- Call-to-action section
Modern, conversion-focused design. Save as "saas-landing".
Take these notes and create a knowledge base site:
[paste your notes]
Organize into logical sections, create a page for each topic,
and build navigation. Save as "knowledge-base".
How it works (workspace structure)
Your files live under /workspace/. Websites go under /workspace/sites/.
/workspace/
├── sites/
│ ├── my-portfolio/
│ │ ├── index.json
│ │ └── pages/
│ │ ├── home.html
│ │ ├── about.html
│ │ └── contact.html
├── apps/
└── memory/
Navigation file: index.json
Every site needs an index.json that defines navigation.
{
"pages": [
{ "id": "home", "title": "Home", "path": "pages/home.html", "parentId": null },
{ "id": "about", "title": "About", "path": "pages/about.html", "parentId": "home" },
{ "id": "contact", "title": "Contact", "path": "pages/contact.html", "parentId": "home" }
]
}
API reference
https://buildingabot.com/wp-json/3ai/v1/All requests require HTTP Basic Auth using your WP username + Application Password.
Authentication
curl -u "username:app-password" "https://buildingabot.com/wp-json/3ai/v1/..."
Endpoints
Create a directory (parents auto-created).
{
"path": "/workspace/sites/my-site/pages"
}
Create or update a file.
{
"path": "/workspace/sites/my-site/pages/home.html",
"content": "<!DOCTYPE html>..."
}
List files and folders in a directory.
GET /files?path=/workspace/sites
Read file contents.
GET /files?path=/workspace/sites/my-site/pages/home.html&action=read
Which AI assistants work?
This works with any AI that can make HTTP requests (directly or via tools):
- ChatGPT (with web/HTTP-capable tools)
- Claude (with tool/API capability)
- Custom agents (LangChain / AutoGPT / scripts)
- Automation platforms (Zapier / Make / n8n)
Security & permissions
- All file operations require authentication.
- Users are limited to their own workspace paths.
- Application Passwords are API-only (they do not grant WP admin access by themselves).
Complete workflow example
When you say “Create a 3-page site,” your AI can run:
POST /mkdir
{"path":"/workspace/sites/business-site/pages"}
POST /files
{"path":"/workspace/sites/business-site/pages/home.html","content":"..."}
POST /files
{"path":"/workspace/sites/business-site/pages/services.html","content":"..."}
POST /files
{"path":"/workspace/sites/business-site/pages/contact.html","content":"..."}
POST /files
{"path":"/workspace/sites/business-site/index.json","content":"{\"pages\":[...]}"}
sites/business-site → your site is ready.Troubleshooting
Credentials incorrect or password revoked.
- Verify username (case-sensitive)
- Use the full Application Password exactly as provided
- Generate a new Application Password if needed
Attempted path outside /workspace/ or not permitted.
- Ensure all paths start with
/workspace/ - Don’t target system directories
- Refresh the 3AI Desktop file manager
- Confirm the exact path used
- Verify the site has
index.json
- Your AI may not have HTTP tool access enabled
- Use an AI/agent setup that supports external requests
Need help?
- Start small: ask your AI to create a 2-page test site first.
- Always include navigation: every site needs
index.json. - Have the AI confirm first: “Here’s the plan + file list” before it writes.
- Keep passwords private: never paste credentials into public chats/screenshots.
- Best workflow: build → browse in 3AI Desktop → tweak HTML as needed.
Powerful, Simple REST API
Full-featured authenticated API for creating, reading, and updating pages programmatically. Real-time automation, complete control.
