API Reference
POST
add_serverAdd Server
Add Server is a POST request to https://api.sharkcluster.com/add_server in the Server Management section of the SharkCluster API. Starts a background task to provision a new server on a selected provider (DigitalOcean, Contabo or OVHcloud; OVHcloud servers are set up by our team). It returns a taskId which can be used to track progress. It takes 5 parameters, 3 required (server_name, provider and location).
Request URL
POST
https://api.sharkcluster.com/add_serverHow do you call Add Server?
- 1Get a token from the login endpoint (POST /login) and send it as Authorization: Bearer <token>. See Login.
- 2Send a POST request to https://api.sharkcluster.com/add_server.
- 3Include the required parameters: server_name, provider and location.
- 4Add the optional parameters only if you need them: os and project.
Request parameters
| Parameter | Type | Description |
|---|---|---|
server_nameRequired | string | Desired name for your server. |
providerRequired | string | Hosting provider: digitalocean, contabo, or sharkcluster for OVHcloud. vultr is accepted but Vultr is not yet generally available. |
locationRequired | string | The region ID or slug where the server will be hosted. |
os | string | Operating System Image ID. |
project | string | ID of the project to associate this server with. |
AuthorizationRequired | header | Bearer token for authentication (e.g., Bearer eyJ...). |
What does Add Server return?
A successful call returns a JSON object with the field taskId.
Request sample
const axios = require('axios');
const data = {
server_name: "my-production-server",
provider: "digitalocean",
location: "blr1",
os: "ubuntu-22-04-x64"
};
axios.post('https://api.sharkcluster.com/add_server', data, {
headers: { 'Authorization': 'Bearer YOUR_TOKEN' }
})
.then(res => console.log("Track task ID:", res.data.taskId));
Response
{"taskId":"00000000-0000-4000-8000-000000000003"}Related Server Management endpoints
Stuck on an integration?
Raise a ticket from the panel with the endpoint and the response you got back — it reaches an engineer with your server already attached.