API Introduction
This document describes the system's API specification.
Basics
- Base URL:
https://api.example.com/v1 - Data format: JSON
- Authentication: Bearer Token
Authentication
All API requests must include a token in the header:
Authorization: Bearer <your_token>Common Response Format
json
{
"code": 0,
"message": "success",
"data": {}
}Error Codes
| Code | Description |
|---|---|
| 0 | Success |
| 400 | Bad request |
| 401 | Unauthenticated |
| 403 | Forbidden |
| 404 | Not found |
| 500 | Server error |
Endpoints
- Authentication - Login, registration, token refresh
- Documents - Create, read, update, delete documents
