API Reference #
Documentation for our internal and external APIs.
Overview #
Our API follows RESTful conventions and uses JSON for request/response bodies.
Base URL #
| Environment | URL |
|---|---|
| Production | https://api.albrightlabs.com/v1 |
| Staging | https://api.staging.albrightlabs.com/v1 |
| Local | http://localhost:8080/api/v1 |
Authentication #
All API requests require authentication using Bearer tokens:
curl -H "Authorization: Bearer YOUR_API_TOKEN" \
https://api.albrightlabs.com/v1/users
Endpoints #
Users #
| Method | Endpoint | Description |
|---|---|---|
| GET | /users |
List all users |
| GET | /users/:id |
Get user by ID |
| POST | /users |
Create new user |
| PUT | /users/:id |
Update user |
| DELETE | /users/:id |
Delete user |
Projects #
| Method | Endpoint | Description |
|---|---|---|
| GET | /projects |
List all projects |
| GET | /projects/:id |
Get project by ID |
| POST | /projects |
Create new project |
Response Format #
All responses follow this structure:
{
"success": true,
"data": { },
"meta": {
"page": 1,
"per_page": 20,
"total": 100
}
}
Error Responses #
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid email format",
"details": {
"field": "email"
}
}
}
Rate Limiting #
- 100 requests per minute for authenticated users
- 10 requests per minute for unauthenticated requests
Rate limit headers are included in all responses:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640000000
Need Help? #
- Check the FAQ
- Ask in
#devon Slack