Endpoints Reference
Complete endpoint documentation
Complete reference for all CodePlanet API endpoints. All endpoints are under /api/v1/.
Base URL
For local development:
Authentication
Most endpoints require authentication. Include your token in the Authorization header:
Or use an API key:
Problems
List Problems
Query parameters:
| Parameter | Type | Description |
|---|---|---|
page | number | Page number (default: 1) |
limit | number | Items per page (default: 20, max: 100) |
difficulty | string | Filter by difficulty: easy, medium, hard |
topic | string | Filter by topic tag |
status | string | solved, attempted, unsolved |
search | string | Search in title and description |
Response:
Get Problem
Response:
Submit Solution
Response:
Submissions
List Submissions
Query parameters:
| Parameter | Type | Description |
|---|---|---|
problem | string | Filter by problem slug |
status | string | accepted, wrong_answer, runtime_error, time_limit |
language | string | Filter by language |
limit | number | Items per page (default: 20) |
Get Submission
Learning
Get Weak Topics
Response:
Record Attempt
Get Learning Path Progress
User
Get Current User
Response:
Update Profile
Get User Stats
Payments
Create Order
Response:
Verify Payment
Get Payment Status
Documentation
List Docs
Get Doc by Slug
Search Docs
Error Responses
All errors follow this format:
Error Codes
| Code | HTTP Status | Description |
|---|---|---|
UNAUTHORIZED | 401 | Missing or invalid auth |
FORBIDDEN | 403 | Insufficient permissions |
NOT_FOUND | 404 | Resource not found |
RATE_LIMITED | 429 | Too many requests |
VALIDATION_ERROR | 400 | Invalid input |
INTERNAL_ERROR | 500 | Server error |
Rate Limits
See Rate Limits for detailed information.
SDKs
Official SDKs are planned for future releases:
- JavaScript/TypeScript
- Python
- Go
Next Steps
- Authentication — Auth flows and tokens
- Rate Limits — Usage quotas
- Webhooks — Event notifications
- Error Handling — Troubleshooting