Browse the documentation

Managing services

Every route on this page takes the service code (SRV-TJUAQ1-1951), given by GET /services. A service outside the key's restriction answers 404 SERVICE_NOT_FOUND.

GET /services

Permissions: services:read

ParameterTypeRequiredValues
limitintegerno, default 201 to 100
cursorstringnopagination.nextCursor from the previous page
statusstringnoACTIVE, SUSPENDED, CANCELLED, DELETED. Any other value answers 400 VALIDATION_ERROR:status

Newest first.

curl -H "Authorization: Bearer $FRESHPERF_KEY" \
     "https://api.freshperf.fr/v1/services?limit=2&status=ACTIVE"
{
  "data": [
    {
      "code": "SRV-TJUAQ1-1951",
      "name": "Minecraft 1",
      "customName": null,
      "productShortname": "minecraft-1",
      "productTitle": "Minecraft 1",
      "category": "minecraft",
      "status": "ACTIVE",
      "providerType": "games",
      "autoRenew": true,
      "nextBillingAt": 1789437385056,
      "recurrence": "monthly",
      "createdAt": 1786845385066,
      "activatedAt": 1786845385056
    }
  ],
  "pagination": { "nextCursor": null, "limit": 2 }
}
FieldTypeNotes
codestringthe identifier every service route takes
namestringthe custom name when set, otherwise the product title
customNamestring or nullthe name you gave it
productShortnamestringpass it back as product in an order
productTitlestring or nullproduct label
categorystring or nullcategory shortname, e.g. vps, minecraft
statusstringACTIVE, SUSPENDED, CANCELLED, DELETED
providerTypestring or nullvps, games (game server, see Game servers) or web (web hosting)
autoRenewboolean or nullnull for a key on a shared account: billing stays the owner's
nextBillingAtinteger or nullepoch milliseconds; null for a key on a shared account
recurrencestring or nullbilling cycle, e.g. monthly; null for a key on a shared account
createdAtintegerepoch milliseconds
activatedAtinteger or nullepoch milliseconds

GET /services/{code}

Permissions: services:read

Carries the fields above and adds:

FieldTypeNotes
provisionedbooleanfalse while no infrastructure exists
priceCentsinteger or nullrecurring price of one cycle, excluding tax; null for a key on a shared account
taxCentsinteger or nulltax on the same cycle; null for a key on a shared account
currencystring or nullISO 4217; null for a key on a shared account
dunningStatestring or nullNONE, RETRY, SUSPENSION_TRIGGERED, DELETION_TRIGGERED; null for a key on a shared account
restartRequiredbooleana resource change is waiting for a restart
restartRequiredReasonstring or null
configurationobject string → stringthe configuration as ordered. Credentials and internal keys are stripped
cancelledAtinteger or nullepoch milliseconds
{
  "data": {
    "code": "SRV-TIYMZT-8349",
    "name": "VPS 1",
    "status": "ACTIVE",
    "providerType": "vps",
    "provisioned": true,
    "autoRenew": true,
    "nextBillingAt": 1787960297645,
    "recurrence": "monthly",
    "priceCents": 500,
    "taxCents": 100,
    "currency": "EUR",
    "dunningState": "NONE",
    "restartRequired": false,
    "restartRequiredReason": null,
    "configuration": {
      "os": "debian", "osVersion": "13", "location": "paris",
      "cpuCores": "2", "ramSize": "2048", "diskSize": "20"
    },
    "cancelledAt": null
  }
}

GET /services/{code}/status

Permissions: services.metrics:read

Asks the infrastructure live. Allow up to two seconds.

Every field can be null: each service type (providerType) reports what it knows.

FieldTypeNotes
statusstringthe machine's state: running, stopped, starting, stopping, restoring... Not a closed enum
uptimeSecondsintegerseconds since boot
cpunumbera fraction or a percentage depending on the service type
cpuCountnumber
memoryBytes, memoryMaxBytesintegerbytes
diskBytesintegerbytes used. Only measured on a running machine. Absent does not mean zero: read diskUsageState
diskMaxBytesintegerbytes, the disk space sold
diskTotalBytesintegerbytes, the total of the machine's own filesystems. Smaller than diskMaxBytes when the partition does not span the whole disk
diskUsageStatestringlive (measured on the running machine), unsupported (the machine did not answer the measurement), unavailable (machine not running, or not measured yet)
networkInBytes, networkOutBytesintegerbytes
ipv4stringon a game server, address:port
ipv6string
extraIpv4array of stringadditional addresses
hostnamestring
extraobjectthe service type's own figures. Free-form, unversioned
ErrorStatusWhen
INSTANCE_NOT_PROVISIONED409no infrastructure yet
ACTION_FAILED502the state could not be read
PROVIDER_TIMEOUT504no answer in time

GET /services/{code}/metrics/history

Permissions: services.metrics:read

{ "data": { "samples": [
  { "ts": 1787903520000, "cpu": 0.1364, "mem": 1069400678, "maxmem": 2147483648, "netin": 4550, "netout": 69 }
] } }

samples is an array of free-form objects: the window, the step and the keys depend on the service type. It is empty when no history is available, which is the case on game servers and web hosting. Same errors as /status.

POST /services/{code}/power

Permissions: services.power:write Rate: 20 a minute, per key and per service.

FieldTypeRequiredValues
actionstringyesstart, stop, restart, kill

stop asks the operating system to shut down cleanly. kill cuts the power at once (a game server's kill signal, a VPS's force stop): keep it for a machine that no longer answers stop, as unwritten data may be lost.

curl -X POST -H "Authorization: Bearer $FRESHPERF_KEY" \
     -H "Content-Type: application/json" -d '{"action":"restart"}' \
     https://api.freshperf.fr/v1/services/SRV-TJUAQ1-1951/power
{ "data": { "status": "SUCCESS", "message": "Power signal accepted" } }
FieldValues
statusSUCCESS when done, PENDING when the infrastructure is still working on it
messagean informative sentence, or null

On PENDING, read /status again every 5 to 10 seconds.

ErrorStatusWhen
VALIDATION_ERROR:action400action absent or outside the list
ACTION_UNSUPPORTED400service type without power control
SERVICE_NOT_ACTIVE409service suspended or cancelled
INSTANCE_NOT_PROVISIONED409no infrastructure yet

POST /services/{code}/console/command

Permissions: services.console:write

Game servers only.

FieldTypeRequired
commandstringyes, non-blank
curl -X POST -H "Authorization: Bearer $FRESHPERF_KEY" \
     -H "Content-Type: application/json" -d '{"command":"say hello"}' \
     https://api.freshperf.fr/v1/services/SRV-TJUAQ1-1951/console/command
{ "data": { "status": "SUCCESS", "message": "Command sent" } }

An empty command: 400 VALIDATION_ERROR:command. On a VPS: 400 ACTION_UNSUPPORTED. On a stopped server the command is refused and the answer is 502 ACTION_FAILED.

Backups

The four routes always answer the same shape: {"data": {"status", "message", "result"}}, where result carries the detail of the operation.

GET /services/{code}/backups

Permissions: vps.backups:read

Answers even on a suspended service.

{ "data": { "status": "SUCCESS", "message": "OK", "result": {
  "customerEnabled": true,
  "internalEnabled": true,
  "vpsBusy": false,
  "limits": { "max": 6, "used": 2 },
  "customer": [
    { "id": "9b5d3938-cbd9-4946-8357-05badcdf6c33", "source": "CUSTOMER",
      "note": null, "status": "COMPLETED", "ctime": 1786823445,
      "sizeBytes": 21474837581, "protected": false,
      "createdAt": "2026-08-15T19:50:45.282411", "createdAtEpochMs": 1786823445282 }
  ],
  "internal": []
} } }
result fieldTypeNotes
customerEnabledbooleanyou may create backups on this service
internalEnabledbooleanFreshPerf's automatic backups are offered for restore
vpsBusybooleanan operation is already running on the VPS
limits.max, limits.usedintegernumber of customer backups allowed, and taken
customer[]arrayyour backups, newest first, a backup still being created at the top
internal[]arraythe automatic backups, newest first. Empty when none is available
Backup fieldTypeNotes
idstringcustomer[] only. Opaque identifier, the one delete and restore take
backupRefstringinternal[] only. Opaque reference, to send back as it is to restore: its shape is not guaranteed
sourcestringCUSTOMER or INTERNAL
statusstringPENDING while being created, then COMPLETED. Always COMPLETED in internal[]
notestring or nullcustomer[] only: the label given at creation
ctimeinteger or nullepoch seconds; null until the backup is finished
sizeBytesinteger or nullbytes
protectedbooleanbackup marked as protected
createdAtstring or nullcustomer[] only: date and time without a time zone. Prefer createdAtEpochMs
createdAtEpochMsinteger or nullcustomer[] only: epoch milliseconds

POST /services/{code}/backups

Permissions: vps.backups:write

FieldTypeRequiredValues
notestring or nullno200 characters at most
{ "data": { "status": "PENDING", "message": "VPS backup in progress",
  "result": { "taskId": "d3b780a2-308f-40bf-95a2-0316d8872721", "status": "PENDING" } } }
ErrorStatusWhen
NOTE_TOO_LONG400note beyond 200 characters
SERVICE_NOT_ACTIVE400service suspended or cancelled
SERVICE_IN_DUNNING400service in dunning
INSTANCE_NOT_PROVISIONED400no infrastructure yet
BACKUP_DISABLED400customer backups are not available on this service
LIMIT_REACHED400backup quota reached
BACKUP_IN_PROGRESS, VPS_BUSY400a backup, a restore or another operation is already running on the VPS
API_RATE_LIMITED429too many backup operations in a short time. Retry-After gives the wait in seconds
BACKUP_FAILED, BACKUP_TIMEOUT502the backup could not be started

DELETE /services/{code}/backups/{backupId}

Permissions: vps.backups:write

backupId comes from result.customer[].id. The backups in internal[] cannot be deleted.

ErrorStatusWhen
BACKUP_NOT_FOUND400unknown identifier
SERVICE_NOT_ACTIVE400service suspended or cancelled
BACKUP_BUSY, BACKUP_IN_PROGRESS, VPS_BUSY400an operation is already running on this backup or on the VPS
INSTANCE_NOT_PROVISIONED400no infrastructure yet
BACKUP_DELETE_FAILED, BACKUP_FAILED, BACKUP_TIMEOUT502the deletion could not be done

POST /services/{code}/backups/restore

Permissions: vps.backups:write

Overwrites the disk.

FieldTypeRequiredValuesWhere it comes from
sourcestringyesCUSTOMER or INTERNAL-
backupIdstringyes when source is CUSTOMER-result.customer[].id
backupRefstringyes when source is INTERNAL-result.internal[].backupRef

Same refusals as creation, except NOTE_TOO_LONG, LIMIT_REACHED and BACKUP_FAILED, plus:

ErrorStatusWhen
MISSING_FIELDS400source absent or outside the list, or its matching identifier is missing
BACKUP_NOT_FOUND400unknown backupId or backupRef
BACKUP_DISABLED400that source is not available on this service
RESTORE_BUSY400a restore could not start. Retry later
RESTORE_FAILED502the restore could not be started

POST /services/{code}/reinstall

Permissions: vps.reinstall:write on a VPS, games.reinstall:write on a game server Rate: 2 a minute, per key and per service. Refused calls count.

Destroys the disk. On a game server it resets the server and the body may be empty.

FieldTypeRequiredValuesWhere it comes from
osstringyes on a VPSthe composite <family>-<version> valueGET /catalog/products/{shortname} → the kind: "os-picker" characteristic, options field
authTypestringyes on a VPSPASSWORD or SSH_KEY-
authValuestringyes on a VPSthe password, or an OpenSSH public key line-

authValue is stored encrypted, never returned, and this call is never logged with its body.

curl -X POST -H "Authorization: Bearer $FRESHPERF_KEY" \
     -H "Content-Type: application/json" \
     -d '{"os":"debian-13","authType":"SSH_KEY","authValue":"ssh-ed25519 AAAAC3Nza... admin@laptop"}' \
     https://api.freshperf.fr/v1/services/SRV-TIYMZT-8349/reinstall
{ "data": { "status": "PENDING", "message": "reinstalling" } }
ErrorStatusWhen
MISSING_FIELDS400one of the three fields is missing on a VPS
INVALID_OS400os is not a well-formed image name
OS_FAMILY_MISMATCH400switching between Windows and Linux: a reinstall keeps the family installed
WINDOWS_SSH_UNSUPPORTED400authType: SSH_KEY on a Windows image, which only takes a password
UNKNOWN_OS400an image this service's range does not offer
UNKNOWN_OS502the range offers it, but the image is not available yet
INVALID_AUTH_TYPE400authType outside the list
SERVICE_NOT_ACTIVE, SERVICE_IN_DUNNING, INSTANCE_NOT_PROVISIONED400state of the service
API_RATE_LIMITED429more than 2 calls in the minute
REINSTALL_FAILED, REINSTALL_TIMEOUT502the reinstall could not be started

GET /services/{code}/addons

Permissions: services.addons:read

{ "data": {
  "addons": [
    { "shortname": "extra-saves", "title": "Additional saves",
      "kind": "BACKUP_SLOTS", "status": "ACTIVE", "quantity": 1,
      "unitPriceCents": 399, "unitTaxCents": 80,
      "linePriceCents": 399, "lineTaxCents": 80,
      "nextCycleLinePriceCents": 399, "nextCycleLineTaxCents": 80,
      "pendingRemovalQuantity": 0 }
  ],
  "available": [
    { "shortname": "extra-ram-1gb", "title": { "fr-fr": "+1 Go RAM", "en-us": "+1 Gb RAM" },
      "kind": "RESOURCE_DELTA", "resourceKey": "ramSize", "unitDelta": 1024,
      "unitPriceCents": 200, "maxQuantity": 10 }
  ],
  "recurringTotalCents": 479
} }
FieldContents
addonsthe add-ons the service already carries
availablethose it may still take. maxQuantity of 0 means unlimited
recurringTotalCentsthe service's recurring total including add-ons, excluding tax

Adding or removing an add-on happens in the dashboard.

PATCH /services/{code}

Permissions: services:write

FieldTypeRequiredValues
customNamestring or nullno32 characters at most. An empty string clears the name
autoRenewbooleannotrue only
curl -X PATCH -H "Authorization: Bearer $FRESHPERF_KEY" \
     -H "Content-Type: application/json" -d '{"customName":"prod-eu-1"}' \
     https://api.freshperf.fr/v1/services/SRV-TJUAQ1-1951

Answers the whole service, like GET /services/{code}.

ErrorStatusWhen
CUSTOM_NAME_TOO_LONG400beyond 32 characters
RENEWAL_CANCELLATION_NOT_AVAILABLE_VIA_API400autoRenew: false. Stopping a renewal happens in the dashboard
RENEWAL_NOT_AVAILABLE_ON_TRIAL400autoRenew: true on a trial. A trial continues by paying its continuation invoice
SERVICE_NOT_ACTIVE400autoRenew: true on a service that is not ACTIVE

POST /services/{code}/renew

Permissions: services:write and billing.invoices:pay, plus billing.saved_methods:charge as soon as the funding touches a card. Required header: Idempotency-Key.

Charges the next cycle now and moves the billing date forward.

FieldTypeRequiredValuesWhere it comes from
methodstringno, default account_defaultaccount_default, balance, saved_method-
paymentMethodIdintegeryes when saved_method> 0GET /payment-methods → id
methodEffect
account_defaultapplies the account's rule: the balance when opted in and sufficient, otherwise the default payment method. Going through the card needs billing.saved_methods:charge
balancethe prepaid balance alone. No fallback to a card
saved_methodcharges the named method
curl -X POST -H "Authorization: Bearer $FRESHPERF_KEY" \
     -H "Content-Type: application/json" \
     -H "Idempotency-Key: renew-SRV-TJUAQ1-1951-2026-08" \
     -d '{"method":"balance"}' \
     https://api.freshperf.fr/v1/services/SRV-TJUAQ1-1951/renew
{ "data": { "status": "CHARGED", "serviceCode": "SRV-TJUAQ1-1951",
            "nextBillingAt": 1793091315189, "amountCents": 360 } }

status is only ever CHARGED: any other outcome is an error. amountCents is what was charged, tax included.

ErrorStatusWhen
VALIDATION_ERROR:method400method outside the list
PAYMENT_METHOD_ID_REQUIRED400saved_method without paymentMethodId
PAYMENT_METHOD_NOT_FOUND404that method is not on the account
INSUFFICIENT_BALANCE402balance too short
NO_PAYMENT_METHOD402account_default with no usable method
PAYMENT_METHOD_NOT_ACTIVE400, 402method expired or blocked: 400 when the named method already is, 402 when it is refused at charge time
RENEWAL_FAILED402the charge failed for another reason
API_KEY_SPENDING_CAP_EXCEEDED403the key's cap does not cover the cycle
SERVICE_NOT_ACTIVE409service neither active nor reactivatable
RENEWAL_IN_PROGRESS409a renewal of the same service is already running
RENEWAL_TOO_FREQUENT429less than a minute since the previous one

POST /services/{code}/actions/{action}

Permissions: they depend on the action sent.

The raw gateway for service actions. It is how the firewall and reverse DNS are reached, since neither has a dedicated route.

ActionPermission
power, start_vps, stop_vps, force_stop_vps, reboot_vpsservices.power:write
send_console_commandservices.console:write
backup_listvps.backups:read
backup_create, backup_delete, backup_restorevps.backups:write
firewall_listvps.firewall:read
firewall_create, firewall_update, firewall_move, firewall_deletevps.firewall:write
rdnsvps.rdns:write, including for op: "get"
featuresservices:read
web_overviewservices:read (web hosting)
web_backupsweb.backups:write (web hosting)

No other action is reachable. There is no firewall_add, firewall_set or firewall_remove: a rule is created, edited and deleted with firewall_create, firewall_update and firewall_delete.

Every other action answers 403 API_ACTION_NOT_ALLOWED whatever the key holds. Game servers have their routes under /services/{code}/games (see Game servers), web hosting under /services/{code}/web.

FieldTypeRequired
argumentsobjectno. Contents specific to each action
curl -X POST -H "Authorization: Bearer $FRESHPERF_KEY" \
     -H "Content-Type: application/json" \
     -d '{"arguments":{"op":"set","address":"203.0.113.224","hostname":"vps.example.com"}}' \
     https://api.freshperf.fr/v1/services/SRV-TIYMZT-8349/actions/rdns
{ "data": { "status": "SUCCESS", "message": "Action completed", "result": {
  "configured": true,
  "entries": [
    { "family": "ipv4", "address": "203.0.113.224", "hostname": "vps.example.com", "zoneConfigured": true }
  ]
} } }

rdns takes op as get, set or delete, plus address (one of the addresses /status returns) and, for set, hostname. The arguments of the firewall_* actions have their own shape: read firewall_list to see the shape of a rule before writing one.

ErrorStatusWhen
INVALID_ACTION400action empty or starting with _
ACTION_UNSUPPORTED400the action does not exist on this type of service (features or send_console_command on a VPS)
API_ACTION_NOT_ALLOWED:<action>403action the platform does not classify, or one with no public permission
SERVICE_NOT_ACTIVE409service suspended or cancelled
SERVICE_IN_DUNNING409backup_create or backup_restore while an invoice is in dunning
INSTANCE_NOT_PROVISIONED409no infrastructure yet
a business marker, e.g. FIREWALL_INVALID_ARGUMENT409the action was refused
API_RATE_LIMITED429too many actions in a short time. Retry-After gives the wait in seconds
ACTION_FAILED502the action failed
PROVIDER_TIMEOUT504no answer in time

Prefer the typed routes (/power, /backups, /reinstall, /console/command) wherever they exist: their contract is stable and fully documented.