The BugRelay backend provides a comprehensive REST API for managing bug reports, user authentication, company verification, and administrative functions.
https://api.bugrelay.com/api/v1
For development:
http://localhost:8080/api/v1
Most endpoints require authentication using JWT tokens. See the Authentication Guide for detailed information.
# Login to get a token
curl -X POST https://api.bugrelay.com/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "user@example.com", "password": "password"}'
# Use the token in subsequent requests
curl -X GET https://api.bugrelay.com/api/v1/bugs \
-H "Authorization: Bearer YOUR_JWT_TOKEN"The API implements rate limiting to prevent abuse:
- Anonymous users: 10 requests per minute
- Authenticated users: 100 requests per minute
- Bug submission: 5 requests per minute
- File uploads: 3 requests per minute
Rate limit headers are included in all responses:
X-RateLimit-Limit: Maximum requests allowedX-RateLimit-Remaining: Requests remaining in current windowX-RateLimit-Reset: Time when the rate limit resets
All API responses follow a consistent format:
{
"success": true,
"data": {
// Response data here
},
"message": "Operation completed successfully"
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid input data",
"details": {
"field": "email",
"issue": "Invalid email format"
}
}
}The API uses standard HTTP status codes:
| Code | Meaning |
|---|---|
| 200 | OK - Request successful |
| 201 | Created - Resource created successfully |
| 400 | Bad Request - Invalid request data |
| 401 | Unauthorized - Authentication required |
| 403 | Forbidden - Insufficient permissions |
| 404 | Not Found - Resource not found |
| 409 | Conflict - Resource already exists |
| 422 | Unprocessable Entity - Validation failed |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error - Server error |
- Authentication Endpoints - User registration, login, and token management
- Bug Endpoints - Create, read, update, and manage bug reports
- Company Endpoints - Company verification and team management
- Admin Endpoints - Administrative functions and moderation
- Logging Endpoints - System logs and audit trails
Explore the API interactively using our OpenAPI specification:
const axios = require('axios');
const api = axios.create({
baseURL: 'https://api.bugrelay.com/api/v1',
headers: {
'Content-Type': 'application/json'
}
});
// Add auth token to requests
api.interceptors.request.use(config => {
const token = localStorage.getItem('jwt_token');
if (token) {
config.headers.Authorization = `Bearer ${token}`;
}
return config;
});
// Create a bug report
const createBug = async (bugData) => {
try {
const response = await api.post('/bugs', bugData);
return response.data;
} catch (error) {
console.error('Error creating bug:', error.response.data);
throw error;
}
};import requests
class BugRelayAPI:
def __init__(self, base_url="https://api.bugrelay.com/api/v1", token=None):
self.base_url = base_url
self.session = requests.Session()
if token:
self.session.headers.update({"Authorization": f"Bearer {token}"})
def create_bug(self, bug_data):
response = self.session.post(f"{self.base_url}/bugs", json=bug_data)
response.raise_for_status()
return response.json()
def get_bugs(self, **params):
response = self.session.get(f"{self.base_url}/bugs", params=params)
response.raise_for_status()
return response.json()
# Usage
api = BugRelayAPI(token="your_jwt_token")
bugs = api.get_bugs(status="open", limit=10)# Set your token as an environment variable
export BUGRELAY_TOKEN="your_jwt_token_here"
# Create a bug report
curl -X POST https://api.bugrelay.com/api/v1/bugs \
-H "Authorization: Bearer $BUGRELAY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Login button not working",
"description": "The login button does not respond when clicked",
"application_id": "123e4567-e89b-12d3-a456-426614174000",
"priority": "high",
"tags": ["ui", "authentication"]
}'
# Get all bugs
curl -X GET "https://api.bugrelay.com/api/v1/bugs?status=open&limit=10" \
-H "Authorization: Bearer $BUGRELAY_TOKEN"Official and community SDKs are available for popular programming languages:
- JavaScript/TypeScript:
npm install @bugrelay/sdk - Python:
pip install bugrelay-python - Go:
go get github.com/bugrelay/go-sdk - PHP:
composer require bugrelay/php-sdk
BugRelay supports webhooks for real-time notifications. See the Webhooks Guide for setup instructions.
- Check the Troubleshooting Guide
- Review Integration Examples
- Report issues on GitHub