Use the WebPros Dashboard API
Overview
The WebPros Dashboard API lets you manage servers, API tokens, and team invitations with HTTP requests. Use it to automate the tasks you would otherwise perform in the WebPros Dashboard interface, or to connect WebPros Dashboard to your own integration.
The API accepts and returns JSON, and every request needs an API token. For the full list of endpoints, request bodies, and response schemas, read the WebPros Public API specification.
Prerequisites
You must create an API token before you can call the API. WebPros Dashboard shows the token value only once, so copy it and store it in a secure location. For more information, read our Create and manage API tokens documentation.
Authenticate a request
The base URL includes the API version:
1https://dashboard.webpros.com/api/v1
Send your API token as a bearer token in the Authorization header of every request:
1Authorization: Bearer YOUR_API_TOKEN
A request that carries no valid token returns a 401 response.
Endpoint groups
The API organizes its endpoints into the following groups:
| Group | Description |
|---|---|
| Accounts | Sends team invitation emails and returns the team GUID for an email address. |
| API tokens | Lists, creates, reads, and deletes the API tokens of the calling user. Requires a token that carries the manage-api-tokens claim. |
| Server Inventory | Connects servers to Server Inventory, lists the connected servers, and deletes a server by its GUID. |
Scope a token with claims
A claim is a permission that a token carries. A token that carries no claims is unrestricted and can call any operation. A token that carries claims can only call the operations that require exactly those claims.
The API defines the following claims:
mcp— Scopes the token to the MCP surface, and optionally to a single server and panel user.manage-api-tokens— Grants the ability to manage API tokens. This claim carries no attributes.
The mcp claim takes an attributes object. Set serverGuid to scope the token to a single server, and add the optional panelUser to scope it to a single panel user on that server. Set readonly to true to restrict the token to read tools and methods.
The API returns a 403 response in both of the following cases:
- You request claims that are broader than the ones your own token carries.
- You use a read-only
mcptoken to create a token.
Paginate results
The endpoints that return a paginated list accept the following query parameters:
page— Sets the page to return. The default is1.pageSize— Sets the number of items per page. The default is10, and the maximum is100.
The GET /dashboard/api-tokens endpoint also accepts a filter parameter. The API matches its value as a case-insensitive substring against the token name.
Examples
List your connected servers
Run the following command to list the servers in your Server Inventory, replacing YOUR_API_TOKEN with your API token:
1curl -X GET "https://dashboard.webpros.com/api/v1/si/servers?page=1&pageSize=10" \
2 -H "Authorization: Bearer YOUR_API_TOKEN"
The API returns the total number of connected servers and an array of server objects:
1{
2 "totalCount": 1,
3 "data": [
4 {
5 "guid": "f81d4fae-7dec-11d0-a765-00a0c91e6bf6",
6 "product": "plesk",
7 "address": "https://example.com",
8 "active": true
9 }
10 ]
11}
Create a scoped API token
Run the following command to create a read-only token for a single server. Replace YOUR_API_TOKEN with a token that carries the manage-api-tokens claim, and serverGuid with the GUID of your server:
1curl -X POST "https://dashboard.webpros.com/api/v1/dashboard/api-tokens" \
2 -H "Authorization: Bearer YOUR_API_TOKEN" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "name": "Read-only MCP token",
6 "claims": [
7 {
8 "name": "mcp",
9 "readonly": true,
10 "attributes": {
11 "serverGuid": "f81d4fae-7dec-11d0-a765-00a0c91e6bf6"
12 }
13 }
14 ]
15 }'
The API returns the new token and its secret in the token property:
1{
2 "data": {
3 "id": 42,
4 "name": "Read-only MCP token",
5 "type": "user",
6 "claims": [
7 {
8 "name": "mcp",
9 "readonly": true,
10 "attributes": {
11 "serverGuid": "f81d4fae-7dec-11d0-a765-00a0c91e6bf6"
12 }
13 }
14 ],
15 "createdAt": "2024-01-15T09:00:00-05:00",
16 "lastUsedAt": null,
17 "expireAt": null,
18 "token": "<the raw token value>"
19 }
20}
The API returns the token value only when you create the token. Copy it and store it in a secure location. If you lose it, delete the token and create a new one.
Error responses
The API returns the following errors:
| Status | Meaning |
|---|---|
400 | The request contains invalid input. The response body lists the type, path, and message for each invalid field. |
401 | The request carries no valid API token. |
403 | The token does not carry the required claim, is read-only, or requests claims broader than its own. |
Read the API specification
The WebPros Public API specification is the authoritative reference for the API. Open it when you build an integration or need the exact details of a specific call.