API Reference
Developer documentation for programmatic access to Architecto
API Reference
The Architecto API enables you to build custom applications, integrations, and workflows on top of the platform.
Authentication
All API requests require authentication using an API key:
Authorization: Bearer YOUR_API_KEYCreating an API Key
- Go to Settings → Developer → API Keys
- Click Create New Key
- Enter name and expiration (never, 30 days, 90 days, 1 year)
- Select scopes (read, write, admin)
- Copy key (shown only once)
Never share your API key publicly. Treat it like a password.
Revoking an API Key
- Go to Settings → Developer → API Keys
- Click Revoke next to the key
- Revocation is immediate
Base URL
All API endpoints are available at:
https://api.architecto.dev/v1Common Endpoints
Authentication
POST /auth/login # Login and get session
POST /auth/logout # End session
POST /auth/refresh # Refresh access tokenArchitectures
GET /architectures # List your architectures
POST /architectures # Create new architecture
GET /architectures/{id} # Get architecture details
PUT /architectures/{id} # Update architecture
DELETE /architectures/{id} # Delete architecture
GET /architectures/{id}/versions # Get version historyAnalysis
POST /architectures/{id}/analyze/cost # Run cost analysis
POST /architectures/{id}/analyze/scalability # Run scalability analysis
POST /architectures/{id}/analyze/threats # Run threat modelingDocumentation
POST /architectures/{id}/documents/rfc # Generate RFC
POST /architectures/{id}/documents/adr # Generate ADR
POST /architectures/{id}/documents/runbook # Generate runbookSharing
POST /architectures/{id}/shares # Create share link
GET /shares/{token} # Get shared architecture
POST /shares/{token}/comments # Add comment to shared archTeams
GET /organizations # List your organizations
POST /organizations # Create organization
GET /organizations/{id}/members # List team members
POST /organizations/{id}/invites # Invite team memberError Handling
API errors return standard HTTP status codes:
{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Architecture with id 'arch_123' not found",
"details": {
"resource_type": "architecture",
"resource_id": "arch_123"
}
}
}Common Status Codes
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad request (invalid parameters) |
| 401 | Unauthorized (invalid API key) |
| 403 | Forbidden (insufficient permissions) |
| 404 | Not found |
| 429 | Rate limited |
| 500 | Server error |
Rate Limiting
API requests are rate-limited:
- Free plan: 100 requests/hour
- Pro plan: 1,000 requests/hour
- Ultimate plan: 10,000 requests/hour
Rate limit info is in response headers:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640995200Example: Create and Analyze Architecture
# 1. Create architecture
curl -X POST https://api.architecto.dev/v1/architectures \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "E-commerce Platform",
"description": "Multi-region e-commerce with real-time inventory",
"cloud_provider": "aws"
}'
# Response:
# {
# "id": "arch_abc123",
# "title": "E-commerce Platform",
# "created_at": "2024-01-15T10:30:00Z"
# }
# 2. Run cost analysis
curl -X POST https://api.architecto.dev/v1/architectures/arch_abc123/analyze/cost \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"scale_points": [1000, 10000, 100000],
"region": "us-east-1"
}'
# Response:
# {
# "analysis_id": "analysis_xyz789",
# "estimates": [
# {
# "users": 1000,
# "monthly_cost": 150,
# "breakdown": { "compute": 80, "storage": 40, "data_transfer": 30 }
# },
# ...
# ]
# }Webhooks (Coming Soon)
Subscribe to architecture events:
POST /webhooks
{
"url": "https://your-app.com/webhook",
"events": ["architecture.created", "architecture.updated", "analysis.completed"]
}SDKs
Official SDKs coming soon for:
- Python
- Node.js / TypeScript
- Go
- Ruby
- Java
Interactive API Documentation
Try the API without writing code:
- Postman Collection
- Swagger UI
- GraphQL Playground (coming soon)
Support
- API Issues: Post in GitHub Issues
- Questions: Ask in Community Discord
- Enterprise: Contact sales@architecto.dev
Next Steps:
- Integrations Guide
- Webhook Setup (coming soon)