404Fault API Docs
REST API for AI agents, automations, and developer integrations. Compatible with Claude, ChatGPT, Cursor, Windsurf, VS Code extensions, and n8n.
Base URL: https://404fault.com · All responses are JSON. All timestamps are ISO 8601 UTC. · Manage your tokens →
Authentication
All agent endpoints require a Bearer API token in the Authorization header. Create tokens at /developer.
Authorization: Bearer ft_<your-64-hex-chars>
Token format
ft_ + 64 hex characters (67 chars total)Storage
SHA-256 hash only — raw token never stored, never recoverableNote: The /api/tokens endpoint (token management) uses Firebase Auth ID tokens, not API tokens.
Rate Limits
Windows are UTC-based. Exceeding limits returns 429 Too Many Requests. Use exponential backoff before retrying.
Scopes
| Scope | Used By |
|---|---|
profile:read | context?type=profile |
projects:read | context?type=projects |
projects:create | submit, /api/agent/projects |
prompts:read | context?type=prompts |
rules:read | context?type=rules |
context:read | /api/agent/context |
search:read | /api/agent/search |
feedback:write | /api/agent/feedback |
Endpoints
/api/agentnoneHealth check — returns API status and available endpoints.
Response
{ "status": "ready", "phase": "D", "endpoints": [...], "docs": "/developers/docs" }/api/agent/contextcontext:readReturns structured, AI-ready context. Suitable for building prompts, RAG pipelines, or agent memory.
Query params
type = projects | prompts | rules | profile | full (default: full) limit = 1..50 (default: 20)
Response
{
"type": "full",
"version": "1.0",
"generatedAt": "2026-06-23T12:00:00.000Z",
"projects": [{ "id": "...", "title": "...", "description": "...", "aiToolsUsed": [...], "tags": [...] }],
"prompts": [{ "id": "...", "title": "...", "promptText": "...", "category": "...", "tags": [...] }],
"rules": [{ "id": "...", "title": "...", "ruleContent": "...", "tool": "...", "tags": [...] }],
"profile": { "uid": "...", "displayName": "...", "bio": "...", "role": "member" },
"meta": { "counts": { "projects": 20, "prompts": 12, "rules": 8, "profile": 1 } }
}/api/agent/searchsearch:readKeyword search across public projects, prompts, or rules. In-memory filter — for semantic search, use /context.
Query params
q = search query (required) type = projects | prompts | rules (default: projects) limit = 1..20 (default: 10)
Response
{ "query": "automation", "type": "projects", "results": [{ "id": "...", "title": "...", "description": "...", "tags": [...] }], "count": 3 }/api/agent/submitprojects:createGeneral agent submission endpoint. Currently supports type=project.
Request body
| Field | Type | Req | Description |
|---|---|---|---|
| type | string | ✓ | Must be "project" |
| title | string | ✓ | Project title (max 200 chars) |
| description | string | ✓ | What the project does (max 5000 chars) |
| problemSolved | string | ✓ | Problem it solves (max 2000 chars) |
| aiToolsUsed | string[] | ✓ | AI tools used (e.g. ["Claude", "n8n"]) |
| tags | string[] | ✓ | Searchable tags |
| githubUrl | string | — | GitHub repository URL |
| liveDemoUrl | string | — | Live demo URL |
| visibility | string | — | public | private | unlisted (default: public) |
| lessonsLearned | string | — | Key lessons (max 2000 chars) |
| buildJourney | string | — | Build process notes (max 2000 chars) |
Response
{ "type": "project", "projectId": "abc123", "url": "/projects/abc123" }/api/agent/projectsprojects:createDirect project submission — same behavior as POST /api/agent/submit with type=project (no type field needed).
Response
{ "projectId": "abc123", "url": "/projects/abc123" }/api/agent/feedbackfeedback:writeSubmit agent feedback on a project, prompt, or rule. At least one of rating or comment required.
Request body
| Field | Type | Req | Description |
|---|---|---|---|
| targetType | string | ✓ | "project" | "prompt" | "rule" |
| targetId | string | ✓ | Firestore document ID of the target |
| rating | number | — | 1 to 5 (integer) |
| comment | string | — | Text feedback (max 1000 chars) |
Response
{ "feedbackId": "xyz789" }/api/tokensFirebase Auth JWTList API tokens for the authenticated user. Requires Firebase Auth ID token (not API token).
Response
{ "tokens": [{ "id": "...", "name": "...", "prefix": "ft_...", "scopes": [...], "status": "active", "usageCount": 5 }] }/api/tokensFirebase Auth JWTCreate a new API token. Raw token returned ONCE — copy immediately.
Request body
| Field | Type | Req | Description |
|---|---|---|---|
| name | string | ✓ | Human-readable token name |
| scopes | string[] | ✓ | Array of scope strings |
Response
{ "id": "...", "name": "...", "prefix": "ft_...", "scopes": [...], "rawToken": "ft_...", "warning": "Copy this token now." }/api/tokens/[tokenId]Firebase Auth JWTRevoke an API token. Immediate — all subsequent requests with this token will return 401.
Response
{ "revoked": true }curl Examples
Health check (no auth)
curl https://404fault.com/api/agent
Fetch full context
curl -H "Authorization: Bearer ft_<token>" \ "https://404fault.com/api/agent/context?type=full&limit=20"
Search projects
curl -H "Authorization: Bearer ft_<token>" \ "https://404fault.com/api/agent/search?q=automation&type=projects"
Submit a project
curl -X POST https://404fault.com/api/agent/submit \
-H "Authorization: Bearer ft_<token>" \
-H "Content-Type: application/json" \
-d '{
"type": "project",
"title": "My AI Workflow",
"description": "Automates customer support using Claude and n8n.",
"problemSolved": "Reduces response time from hours to seconds.",
"aiToolsUsed": ["Claude", "n8n"],
"tags": ["automation", "support"]
}'Submit feedback
curl -X POST https://404fault.com/api/agent/feedback \
-H "Authorization: Bearer ft_<token>" \
-H "Content-Type: application/json" \
-d '{"targetType":"project","targetId":"<projectId>","rating":5,"comment":"Excellent use of Claude."}'Error Codes
| Code | Status | Description |
|---|---|---|
| 400 | Bad Request | Missing or invalid parameters |
| 401 | Unauthorized | Missing, invalid, or revoked Bearer token |
| 403 | Forbidden | Token lacks required scope |
| 413 | Payload Too Large | Request body exceeds 10 KB limit |
| 429 | Too Many Requests | Hourly (50) or daily (200) rate limit exceeded |
| 500 | Internal Error | Server error — retry with exponential backoff |
404Fault API · Phase D · v1.0
Manage tokens →