Quick Start
API Overview
Base URL
https://api.2gc.ru/v1
All API requests should be made to this base URL
Content Type
application/json
All requests and responses use JSON format
API Categories
Authentication
- • Login & Logout
- • API Key Management
- • Session Management
- • OAuth Integration
Organizations
- • Organization CRUD
- • Member Management
- • Settings Configuration
- • Analytics & Reports
Groups
- • Group Management
- • Permission Control
- • Member Assignment
- • Group Hierarchy
Relay Servers
- • Server Management
- • Connection Testing
- • Status Monitoring
- • Configuration
Analytics
- • Usage Statistics
- • Performance Metrics
- • Custom Reports
- • Data Export
Quick Examples
Authentication
POST /api/auth/login
{
"email": "user@example.com",
"password": "your_password"
}
Authenticate with email and password to get an access token.
Get Users
GET /api/users
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
Retrieve a list of users in your organization.
Error Handling
Common Error Codes
400 Bad Request - Invalid parameters
401 Unauthorized - Authentication required
403 Forbidden - Insufficient permissions
404 Not Found - Resource doesn't exist
429 Too Many Requests - Rate limit exceeded
500 Internal Server Error - Server issue
Error Response Format
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid email format",
"details": {
"field": "email",
"value": "invalid-email"
}
}
}
Rate Limiting
1000
Requests per hour
100
Requests per minute
10
Requests per second
Rate Limit Headers
Check the X-RateLimit-*
headers in API responses to monitor your rate limit usage.