Control Panel API is a REST/OpenAPI interface for automating selected operations in Setup.Platon.sk. The API is available at https://setup.platon.sk/api/ and uses standard HTTP methods with JSON responses.
The interface contains endpoint groups such as DNS, Email, Domain, Vehicle, System, OAuth and others. The current OpenAPI specification is available at https://setup.platon.sk/api/openapi.json.
All protected API requests use the HTTP Authorization header with a Bearer token:
Authorization: Bearer YOUR_TOKEN
Example API request:
curl -H "Authorization: Bearer YOUR_TOKEN" \
https://setup.platon.sk/api/system/hello
You can obtain the token either as an API key created directly in Control Panel, or through OAuth user authorization.
An API key is created by the user directly in Control Panel. This approach is suitable when the integration is operated by the customer or by the customer's internal system.
Use an API key for:
Use OAuth when an application needs to act on behalf of Platon Technologies users and the user should approve access after signing in with their CNAME.
OAuth is suitable for:
If the automation is owned and operated by the customer, use an API key. If the application belongs to a third party or serves multiple customers, use OAuth.
Control Panel API uses the OAuth Device Authorization flow. The application first lists available scopes, then creates an OAuth request, sends the user to approve access and checks the authorization status afterwards.
Endpoint:
GET https://setup.platon.sk/api/oauth/scopes
Scopes define which parts of the API the token can access. The application should request only the minimum permissions it needs.
Endpoint:
POST https://setup.platon.sk/api/oauth/requests
Example request:
curl -X POST https://setup.platon.sk/api/oauth/requests \
-H "Content-Type: application/json" \
-d '{
"app_name": "Example Integration",
"app_url_homepage": "https://example.com",
"app_url_return": "https://example.com/oauth/return",
"scopes": ["dns:read"]
}'
Example response:
{
"verify_token": "string",
"access_token": "string",
"redirect_url": "string",
"verify_url": "string",
"verify_interval_seconds": 0
}
The application redirects the user to the redirect_url value. In a CLI or desktop application, this URL is shown to the user so they can open it in a browser.
The user signs in with their CNAME and approves the requested access. The application then polls the authorization status through the verify_url value.
The polling interval must not be lower than verify_interval_seconds, so the application does not overload the API.
Endpoint for verifying the OAuth request:
GET https://setup.platon.sk/api/oauth/requests/verify?verify_token=VERIFY_TOKEN
Successful response after authorization:
{
"status": "string",
"token": "string",
"token_expire": "string",
"cname": "string",
"error": "string"
}
Field meaning:
token is the Bearer token for Control Panel API calls,token_expire contains the token expiration time,cname identifies the authorized customer.An OAuth token can be refreshed before expiration through this endpoint:
POST https://setup.platon.sk/api/oauth/tokens/refresh
The request uses the current Bearer token in the Authorization header. The endpoint returns a new token and its new expiration.
curl -X POST https://setup.platon.sk/api/oauth/tokens/refresh \
-H "Authorization: Bearer YOUR_TOKEN"
A token can be revoked or removed through this endpoint:
DELETE https://setup.platon.sk/api/oauth/tokens
Use this endpoint when signing out an application, disconnecting an integration or when a token should no longer remain active.
curl -X DELETE https://setup.platon.sk/api/oauth/tokens \
-H "Authorization: Bearer YOUR_TOKEN"
SDK clients generated from the OpenAPI specification are available for developers:
The SDK clients simplify calling endpoints, working with models and keeping the client updated from the current OpenAPI specification.
We accept reports of problems or other inducements related to the use of our products and services.
helpdesk@platon.net +421 222 111 321
In case you need any help, contact us by e-mail or by phone.
Give a chance to our online help-center. You can find there more than:
Questions about our products or any specific request? Contact us.