API Endpoints Reference
This document provides a comprehensive reference of all available API endpoints in the Rego backend.
Base URL
All endpoints are relative to this base URL.
Authentication
Most endpoints require authentication. Include the JWT token in one of these ways:
Bearer Token (recommended):
Cookie:
Response Format
All responses are JSON formatted. Successful responses return the requested data. Error responses follow this structure:
Authentication Endpoints
Register User
Create a new user account.
Request Body:
{
"email": "user@example.com",
"username": "johndoe",
"password": "SecurePassword123!",
"firstname": "John",
"lastname": "Doe"
}
Response (201):
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"email": "user@example.com",
"username": "johndoe",
"firstname": "John",
"lastname": "Doe",
"is_active": true,
"is_verified": false,
"is_superuser": false
}
Login
Authenticate and receive JWT token.
Request Body:
Response (200):
Logout
End the current session.
Response (200):
Get Current User
Retrieve authenticated user's profile.
Response (200):
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"email": "user@example.com",
"username": "johndoe",
"firstname": "John",
"lastname": "Doe",
"is_active": true,
"is_verified": false,
"is_superuser": false
}
Update Profile
Modify the current user's profile.
Request Body:
Response (200): Updated user object
Board Endpoints
Create Board
Create a new board. The creator is automatically added as owner.
Request Body:
Response (201):
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"title": "My Project",
"description": "Project board for Q1 2024",
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-01-15T10:00:00Z"
}
List User's Boards
Get all boards the authenticated user is a member of.
Response (200):
[
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"title": "My Project",
"description": "Project board for Q1 2024",
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-01-15T10:00:00Z"
}
]
Get Board Details
Retrieve a board with all its columns, cards, labels, and members.
Response (200):
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"title": "My Project",
"description": "Project board",
"columns": [
{
"id": "...",
"title": "To Do",
"rank": 1000,
"cards": [...]
}
],
"labels": [...],
"members": [...]
}
Permissions: Requires board membership
Update Board
Update board title or description.
Request Body:
Response (200): Updated board object
Permissions: Requires owner role
Delete Board
Permanently delete a board and all its data.
Response (204): No content
Permissions: Requires owner role
Invite User to Board
Add a user to the board as a member.
Request Body:
Response (200):
Permissions: Requires owner role
Get Board Labels
List all labels defined for a board.
Response (200):
Get Label Statistics
Get usage statistics for all labels on a board.
Response (200):
Column Endpoints
Create Column
Add a new column to a board.
Request Body:
Response (201):
{
"id": "...",
"board_id": "...",
"title": "In Progress",
"rank": 1500,
"color": "#3498db",
"is_done_column": false
}
Permissions: Requires board membership
Update Column
Modify column title, color, or done status.
Request Body:
Response (200): Updated column object
Permissions: Requires board membership
Delete Column
Remove a column and all its cards.
Response (204): No content
Permissions: Requires board membership
Move Column
Reorder a column to a new position.
Request Body:
Response (200): Updated column object
Permissions: Requires board membership
Card Endpoints
Create Card
Add a new card to a column.
Request Body:
{
"title": "Fix login bug",
"description": "Users can't log in with special characters in password",
"position": 0
}
Response (201):
{
"id": "...",
"column_id": "...",
"title": "Fix login bug",
"description": "Users can't log in...",
"rank": 500,
"labels": [],
"assignees": [],
"is_completed": false,
"is_archived": false,
"start_date": null,
"due_date": null,
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-01-15T10:00:00Z"
}
Permissions: Requires board membership
Get Card Details
Retrieve a card with all its data.
Response (200):
{
"id": "...",
"column_id": "...",
"title": "Fix login bug",
"description": "...",
"rank": 500,
"labels": [...],
"assignees": [...],
"checklists": [...],
"attachments": [...]
}
Permissions: Requires board membership
Update Card
Modify card details.
Request Body:
{
"title": "Fix critical login bug",
"description": "Updated description",
"is_completed": true,
"due_date": "2024-02-01T00:00:00Z"
}
Response (200): Updated card object
Permissions: Requires board membership
Delete Card
Remove a card permanently.
Response (204): No content
Permissions: Requires board membership
Move Card
Move a card to a different column or position.
Request Body:
Response (200): Updated card object
Permissions: Requires board membership
Set Card Assignees
Assign users to a card.
Request Body:
Response (200): Updated card object with assignees
Permissions: Requires board membership. All users must be board members.
Add Label to Card
Apply a label to a card.
Response (200): Updated card object
Permissions: Requires board membership
Remove Label from Card
Remove a label from a card.
Response (200): Updated card object
Permissions: Requires board membership
Label Endpoints
Create Label
Define a new label for a board.
Request Body:
Response (201):
Permissions: Requires board membership
Update Label
Modify label name or color.
Request Body:
Response (200): Updated label object
Permissions: Requires board membership
Delete Label
Remove a label from the board.
Response (204): No content
Permissions: Requires board membership
Checklist Endpoints
Create Checklist
Add a checklist to a card.
Request Body:
Response (201):
Permissions: Requires board membership
Update Checklist
Modify checklist title.
Request Body:
Response (200): Updated checklist object
Permissions: Requires board membership
Delete Checklist
Remove a checklist and all its items.
Response (204): No content
Permissions: Requires board membership
Move Checklist
Reorder a checklist within a card.
Request Body:
Response (200): Updated checklist object
Permissions: Requires board membership
Create Checklist Item
Add an item to a checklist.
Request Body:
Response (201):
{
"id": "...",
"checklist_id": "...",
"content": "Run unit tests",
"rank": 1000,
"is_completed": false,
"due_date": "2024-02-01T00:00:00Z",
"assignees": []
}
Permissions: Requires board membership
Update Checklist Item
Modify item content or completion status.
Request Body:
Response (200): Updated item object
Permissions: Requires board membership
Delete Checklist Item
Remove an item from a checklist.
Response (204): No content
Permissions: Requires board membership
Move Checklist Item
Reorder an item within a checklist.
Request Body:
Response (200): Updated item object
Permissions: Requires board membership
Set Item Assignees
Assign users to a checklist item.
Request Body:
Response (200): Updated item object with assignees
Permissions: Requires board membership. All users must be board members.
Attachment Endpoints
Upload Attachment
Upload a file to a card.
Request Body: Form data with file field
Response (201):
{
"id": "...",
"card_id": "...",
"name": "screenshot.png",
"mime_type": "image/png",
"size": 102400,
"created_at": "2024-01-15T10:00:00Z"
}
Permissions: Requires board membership
Download Attachment
Download an attached file.
Response (200): Binary file content with appropriate headers
Permissions: Requires board membership
Delete Attachment
Remove an attachment from a card.
Response (204): No content
Permissions: Requires board membership
Automation Endpoints
Create Automation Rule
Define a new automation rule for a board.
Request Body:
{
"name": "Auto-assign bugs",
"trigger_type": "label_added",
"trigger_label_id": "...",
"action_type": "assign_member",
"action_user_id": "...",
"is_enabled": true
}
Response (201):
{
"id": "...",
"board_id": "...",
"name": "Auto-assign bugs",
"trigger_type": "label_added",
"trigger_label_id": "...",
"action_type": "assign_member",
"action_user_id": "...",
"is_enabled": true
}
Permissions: Requires owner role
List Board Automations
Get all automation rules for a board.
Response (200): Array of automation rule objects
Permissions: Requires board membership
Update Automation Rule
Modify an automation rule.
Request Body:
Response (200): Updated automation rule object
Permissions: Requires owner role
Delete Automation Rule
Remove an automation rule.
Response (204): No content
Permissions: Requires owner role
WebSocket Endpoints
Connect to Board
Establish WebSocket connection for real-time updates.
Messages from server:
Messages to server:
Permissions: Requires board membership
Get Board Presence
List users currently viewing a board.
Response (200):
Permissions: Requires board membership
User Endpoints
Get User by ID
Retrieve a user's public profile.
Response (200):
Search Users
Search for users by username or email.
Response (200): Array of user objects matching query
Health Check
Get System Health
Check status of all services.
Response (200):
{
"status": "healthy",
"environment": "development",
"debug": true,
"postgres": "connected",
"redis": "connected",
"subscriber": "running",
"websocket": {
"total_boards": 3,
"total_connections": 7
}
}
No authentication required
Error Codes
| Status Code | Description |
|---|---|
| 200 | Success |
| 201 | Created |
| 204 | No Content (successful deletion) |
| 400 | Bad Request (validation error) |
| 401 | Unauthorized (missing/invalid token) |
| 403 | Forbidden (insufficient permissions) |
| 404 | Not Found |
| 409 | Conflict (constraint violation) |
| 422 | Unprocessable Entity (validation error) |
| 429 | Too Many Requests (rate limit exceeded) |
| 500 | Internal Server Error |
Rate Limiting
All endpoints are rate limited. Rate limit info is included in response headers:
Default limits: - Read operations (GET): 100 requests/minute - Write operations (POST/PUT/PATCH/DELETE): 50 requests/minute
When rate limit is exceeded, the API returns 429 with retry information.