ConvertPro API Documentation
Welcome to the ConvertPro API. This page covers authentication, endpoints, conversion routes, user management, permissions, points, dashboard, and admin APIs.
Backend Base URL
http://127.0.0.1:8000Versioning
v3 is the current platform API for conversions, points, permissions, dashboard, and admin workflows. v2 handles auth, users, and legacy authenticated converters. v1 remains available for older conversion integrations.
Authentication
The ConvertPro API uses bearer tokens. Login on /api/v2/auth/login, refresh on /api/v2/auth/refresh, and pass the access token in the Authorization header for protected endpoints.
curl -X POST http://127.0.0.1:8000/api/v2/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "user@example.com", "password": "password123"}'Success Response
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "bearer"
}Auth Endpoints
/api/v2/auth/loginIssue access and refresh tokensRequest body: email, password.
/api/v2/auth/refreshRefresh an access tokenRequest body: refresh_token.
/api/v2/auth/meGet current authenticated userRequires Authorization: Bearer <token>.
User Roles
Super User
Full access to conversions, billing, admin checks, user role changes, and permission management.
Admin
Manage general and demo users, top up points, and inspect user activity and permissions.
General
Can perform allowed conversions, read dashboard data, check points, and view own history.
Demo
Read-only mode for protected write actions. Demo users cannot create conversion jobs.
Conversion Endpoints
/api/v3/conversions/pdf-to-wordConvert PDF to DOCXUpload PDF file as multipart form data.
Optional request header recommended for safe retries on v3 conversion POST calls.
Successful conversions charge the flat per-request points rule for non-super users.
Available v3 Conversion Routes
POST /api/v3/conversions/pdf-to-wordPOST /api/v3/conversions/pdf-to-excelPOST /api/v3/conversions/docx-to-pdfPOST /api/v3/conversions/excel-to-pdfPOST /api/v3/conversions/image-to-pdfPOST /api/v3/conversions/remove-pages-from-pdfPOST /api/v3/conversions/remove-backgroundUser, Points, Permissions And Admin Endpoints
/api/v2/usersCreate userAdmin or super user only.
/api/v2/usersList usersReturns an array of UserOut.
/api/v2/users/<user_id>/roleUpdate user roleSuper user only.
/api/v3/points/balanceGet points balanceOther points routes: /api/v3/points/ledger, /topup, /rules, /my-point.
Error Handling
401 Unauthorized
Invalid or missing bearer token.
403 Forbidden
Conversion not permitted, role blocked, or insufficient role privileges.
402 Payment Required
Raised when the user has insufficient points for a conversion request.
422 Validation Error
Input payload, file upload, or query parameter validation failed.
Rate Limits
| Scope | Current Docs Note | Behavior |
|---|---|---|
| v3 Conversions | Point-based charging | Each successful request uses the flat cost returned by /api/v3/points/rules. |
| Retry Safety | Idempotency supported | Use Idempotency-Key on v3 POST conversions to prevent duplicate charges. |
| Admin Reads | Role-gated | Admin and super user access depends on backend role checks. |