API Reference
POSTadd_server

Add 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

POSThttps://api.sharkcluster.com/add_server

How do you call Add Server?

  1. 1Get a token from the login endpoint (POST /login) and send it as Authorization: Bearer <token>. See Login.
  2. 2Send a POST request to https://api.sharkcluster.com/add_server.
  3. 3Include the required parameters: server_name, provider and location.
  4. 4Add the optional parameters only if you need them: os and project.

Request parameters

ParameterTypeDescription
server_name
Required
stringDesired name for your server.
provider
Required
stringHosting provider: digitalocean, contabo, or sharkcluster for OVHcloud. vultr is accepted but Vultr is not yet generally available.
location
Required
stringThe region ID or slug where the server will be hosted.
osstringOperating System Image ID.
projectstringID of the project to associate this server with.
Authorization
Required
headerBearer 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"}

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.

Contact us