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_KEY

Creating an API Key

  1. Go to SettingsDeveloperAPI Keys
  2. Click Create New Key
  3. Enter name and expiration (never, 30 days, 90 days, 1 year)
  4. Select scopes (read, write, admin)
  5. Copy key (shown only once)

Never share your API key publicly. Treat it like a password.

Revoking an API Key

  1. Go to SettingsDeveloperAPI Keys
  2. Click Revoke next to the key
  3. Revocation is immediate

Base URL

All API endpoints are available at:

https://api.architecto.dev/v1

Common Endpoints

Authentication

POST /auth/login          # Login and get session
POST /auth/logout         # End session
POST /auth/refresh        # Refresh access token

Architectures

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 history

Analysis

POST   /architectures/{id}/analyze/cost         # Run cost analysis
POST   /architectures/{id}/analyze/scalability  # Run scalability analysis
POST   /architectures/{id}/analyze/threats      # Run threat modeling

Documentation

POST   /architectures/{id}/documents/rfc        # Generate RFC
POST   /architectures/{id}/documents/adr        # Generate ADR
POST   /architectures/{id}/documents/runbook    # Generate runbook

Sharing

POST   /architectures/{id}/shares      # Create share link
GET    /shares/{token}                 # Get shared architecture
POST   /shares/{token}/comments        # Add comment to shared arch

Teams

GET    /organizations                  # List your organizations
POST   /organizations                  # Create organization
GET    /organizations/{id}/members     # List team members
POST   /organizations/{id}/invites     # Invite team member

Error 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

CodeMeaning
200Success
400Bad request (invalid parameters)
401Unauthorized (invalid API key)
403Forbidden (insufficient permissions)
404Not found
429Rate limited
500Server 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: 1640995200

Example: 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:

Support


Next Steps:

API Reference | Documentation | Architecto