Last updated on 5th May 2026

Hosted Resources via API

The Hosted Resources API allows you to list and manage your Managed VPS servers programmatically. Hosted resources represent the underlying cloud infrastructure provisioned by DeployHQ.

Tip: You can explore and test these endpoints interactively using our OpenAPI documentation.

List all hosted resources

Returns all hosted resources for the authenticated account.

URL

/hosted_resources

HTTP Method

GET

Example cURL request

curl -H "Content-type: application/json" \
-H "Accept: application/json" \
--user user@example.com:api-key \
https://test.deployhq.com/hosted_resources

Example JSON

[
  {
    "identifier": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "my-web-server",
    "region": "nyc1",
    "size": "s-1vcpu-1gb",
    "status": "active",
    "ip_address": "167.71.32.120",
    "monthly_cost": 6.0,
    "ssh_key": {
      "identifier": "f1af5df2-f515-469a-a175-e3188da8e94c",
      "title": "Managed VPS Key",
      "public_key": "ssh-ed25519 AAAA...",
      "key_type": "ED25519",
      "fingerprint": "SHA256:..."
    },
    "created_at": "2026-03-25T10:09:00.000Z",
    "updated_at": "2026-03-25T10:10:00.000Z"
  }
]

View a hosted resource

Returns details of a single hosted resource.

URL

/hosted_resources/<identifier>

Replace <identifier> with the identifier of the hosted resource.

HTTP Method

GET

Example cURL request

curl -H "Content-type: application/json" \
-H "Accept: application/json" \
--user user@example.com:api-key \
https://test.deployhq.com/hosted_resources/a1b2c3d4-e5f6-7890-abcd-ef1234567890

Example JSON

{
  "identifier": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "name": "my-web-server",
  "region": "nyc1",
  "size": "s-1vcpu-1gb",
  "status": "active",
  "ip_address": "167.71.32.120",
  "monthly_cost": 6.0,
  "ssh_key": {
    "identifier": "f1af5df2-f515-469a-a175-e3188da8e94c",
    "title": "Managed VPS Key",
    "public_key": "ssh-ed25519 AAAA...",
    "key_type": "ED25519",
    "fingerprint": "SHA256:..."
  },
  "created_at": "2026-03-25T10:09:00.000Z",
  "updated_at": "2026-03-25T10:10:00.000Z"
}

Sync a hosted resource

Triggers a background sync job to refresh the hosted resource state from the hosting provider.

URL

/hosted_resources/<identifier>/sync

Replace <identifier> with the identifier of the hosted resource.

HTTP Method

POST

Example cURL request

curl -X POST \
-H "Content-type: application/json" \
-H "Accept: application/json" \
--user user@example.com:api-key \
https://test.deployhq.com/hosted_resources/a1b2c3d4-e5f6-7890-abcd-ef1234567890/sync

Example JSON

{
  "status": "sync_requested"
}

List available regions

Returns all available regions for provisioning Managed VPS servers.

URL

/managed_hosting/regions

HTTP Method

GET

Example JSON

{
  "regions": [
    { "slug": "nyc1", "name": "New York 1" },
    { "slug": "ams3", "name": "Amsterdam 3" },
    { "slug": "fra1", "name": "Frankfurt 1" }
  ]
}

List available sizes

Returns all available server sizes with pricing in the account's currency.

URL

/managed_hosting/sizes

HTTP Method

GET

Example JSON

{
  "sizes": [
    { "slug": "s-1vcpu-1gb", "label": "1 vCPU / 1 GB", "monthly_cost": 6.0, "currency": "gbp" },
    { "slug": "s-1vcpu-2gb", "label": "1 vCPU / 2 GB", "monthly_cost": 10.0, "currency": "gbp" },
    { "slug": "s-2vcpu-2gb", "label": "2 vCPU / 2 GB", "monthly_cost": 14.0, "currency": "gbp" },
    { "slug": "s-2vcpu-4gb", "label": "2 vCPU / 4 GB", "monthly_cost": 18.0, "currency": "gbp" }
  ]
}

Resource statuses

Status Description
provisioning Server is being created
active Server is running and ready for deployments
suspended Server has been powered off (account suspended)
error An error occurred during provisioning or sync
destroying Server is being destroyed