The French version of this page has changed since this translation: it applies where they differ.
API
DoliProxy API: personal tokens to manage your proxies and view your billing, and instance tokens for your hosted applications.
API
DoliProxy exposes a REST API. The complete interactive documentation is available at /docs/api.
There are two families of authentication:
- User API -- your personal tokens, to manage your proxies and view your billing
- Instance / proxy token API -- dedicated tokens, for your hosted applications that report their metrics
Response language
Error messages follow the Accept-Language header of the request (French, English, Spanish, German, Italian, Dutch or Brazilian Portuguese; English by default). The code field of errors, however, does not change from one language to another: this is the field your applications should test.
User API
Your tokens and permissions
You create your API tokens from My profile, in the panel. Each token carries permissions that you choose:
| Permission | Usage |
|---|---|
proxy:read |
Read your proxies and their blocks |
proxy:write |
Modify settings and manage blocked IPs |
billing:read |
Read your billing metrics |
User routes require an active subscription or an ongoing trial, and are limited to 60 requests per minute.
Proxy management
Under the /api/v1/proxies prefix:
| Method | Route | Purpose |
|---|---|---|
| GET | / |
List of your proxies |
| GET | /{proxy} |
Details of a proxy |
| PATCH | /{proxy}/geo-restriction |
Geo-restriction |
| PATCH | /{proxy}/rate-limit |
Rate limiting |
| PATCH | /{proxy}/conn-limit |
Connection limiting |
| PATCH | /{proxy}/bot-filtering |
Bot filtering |
| PATCH | /{proxy}/auto-block |
Automatic IP blocking |
| PATCH | /{proxy}/maintenance |
Maintenance mode |
| GET | /{proxy}/blocked-ips |
List of blocked IPs |
| POST | /{proxy}/blocked-ips |
Block an IP |
| DELETE | /{proxy}/blocked-ips/{blockedIp} |
Unblock an IP |
When the setting is saved but the proxy configuration could not be applied, the answer is a 502 with the code nginx_rebuild_failed: the setting is not live yet, send the request again later.
Billing
Under the /api/v1/billing prefix:
| Method | Route | Purpose |
|---|---|---|
| GET | /usage |
Your current usage |
| GET | /subscription |
Details of your subscription |
| GET | /plans |
Available plans |
PWA instance API
Your hosted PWA instances authenticate with a dedicated bearer token.
Public routes (no token)
Under /api/v1/instance, limited to 10 requests per minute:
| Method | Route | Purpose |
|---|---|---|
| POST | /proposals |
Instance suggestions for an email |
| POST | /token |
Initial token issuance (email, module code, Dolibarr URL) |
| POST | /token/recover |
Sends a recovery code by email (2FA) |
| POST | /token/recover/confirm |
Confirms the code and issues a new token |
Protected routes (bearer token)
| Method | Route | Purpose |
|---|---|---|
| POST | /check |
Instance status (active / suspended) |
| POST | /usage |
Reporting of usage metrics |
| POST | /deprovision |
Voluntary deactivation |
| GET | /settings |
Read the instance settings |
| PATCH | /settings |
Update the settings |
Standard proxy API
For proxies in proxy mode provisioned through the API, under /api/v1/proxy:
Public registration (no token)
| Method | Route | Purpose |
|---|---|---|
| POST | /slug/check |
Checks whether an identifier is available |
| POST | /onboard |
Starts the registration |
| POST | /onboard/confirm |
Confirms the registration |
| POST | /onboard/resend |
Resends the confirmation code |
| POST | /recover |
Access recovery |
| POST | /recover/confirm |
Confirms the recovery |
Send to /recover/confirm the recovery_token returned by /recover: the confirmation then targets your own request, even if another one was started meanwhile for the same proxy.
Protected routes (bearer token)
| Method | Route | Purpose |
|---|---|---|
| POST | /check |
Proxy status |
| PATCH | / |
Update the proxy |
| DELETE | / |
Delete the proxy |
Security: instance and proxy tokens are stored hashed (SHA256) and issued only once. If you lose one, use the recovery procedure with a code sent by email.