Every server Unmetered traffic, DDoS protection and IPMI included. No setup fees, no contract. Unmetered traffic on every server See pricing

API & Terraform

Automate your bare-metal fleet from code

Everything you can do in the control panel, you can do over HTTPS. Call the REST API directly, or declare servers in Terraform and review every change before it is applied.

List your servers and reboot one with curl
# Read the token without leaving it in your shell history
read -rsp "API token: " FLEXDEDI_TOKEN && export FLEXDEDI_TOKEN

# List servers with their plan, location and status
curl -s https://api.flexdedi.com/v1/servers \
  -H "Authorization: Bearer $FLEXDEDI_TOKEN" \
  | jq '.data[] | {id, plan, location, status}'

# Reboot one server
curl -s -X POST https://api.flexdedi.com/v1/servers/srv_7f3a/actions/reboot \
  -H "Authorization: Bearer $FLEXDEDI_TOKEN"

Highlights

Full panel parity

Every control panel action is available over the API, from reinstalls and power actions to rescue mode and reverse DNS.

Bearer token authentication

Authenticate each request with an API token in the Authorization header, and keep tokens in your secret store.

Terraform provider

Declare servers as resources, review changes with terraform plan and keep your fleet in version control.

Plain JSON over HTTPS

Versioned REST resources under /v1, easy to call from curl, scripts, CI pipelines or any HTTP client.

How it works

API & Terraform, step by step.

  1. 1

    Create an API token

    Generate a token in the client area and store it as a secret, for example in your CI system.

  2. 2

    Call the API

    Send JSON requests to https://api.flexdedi.com/v1 with the token as a Bearer credential.

  3. 3

    Codify with Terraform

    Add the FlexDedi provider to your configuration and manage servers as resources.

  4. 4

    Automate the lifecycle

    Provision, reinstall, reboot and set reverse DNS from scripts and CI jobs.

In detail

What you should know.

01

What you can automate

The API is designed so that nothing requires the panel. Common automations:

  • Provisioning: order servers with a plan, location, OS image, hostname and SSH keys, then poll until the server is active.
  • Rebuilds: reinstall a server from a clean image as part of a deploy, or on a schedule for CI runners.
  • Power and recovery: reboot, power-cycle or boot into rescue mode when a health check fails.
  • Networking: set reverse DNS when a mail or web server comes online.
  • Inventory: list your servers and their status to feed monitoring, a CMDB or cost reports.

Treat ordering calls with care: creating a server starts a monthly charge, so put an approval or a plan review in front of any automation that can order hardware. Keep tokens out of source control, store them in your CI or secret manager, and log the calls your automation makes. The full list of endpoints is in the API reference.

02

Terraform: your fleet in version control

The Terraform provider maps FlexDedi servers to resources, so bare metal follows the same workflow as the rest of your infrastructure: write the desired state, run terraform plan to see what will change, and apply it after review.

hcl
resource "flexdedi_server" "db" {
  plan     = "pro-32"
  location = "fra"
  os       = "ubuntu-24.04"
  ssh_keys = ["ops-laptop"]
}

Physical servers are billed monthly and take minutes rather than seconds to deliver, so read plans carefully: replacing a resource means a new server or a reinstall. Add prevent_destroy lifecycle rules to databases and other stateful machines, and keep state in a remote backend with locking.

Keep one state per environment, such as staging and production, and combine the provider with the ones you already use for DNS and monitoring, so a new server gets its records and checks in the same apply. Pass server addresses from Terraform outputs to Ansible or your configuration tool.

FAQ

API & Terraform, answered.

Does the API cover everything the panel does?

Yes. Every control panel action is available through the REST API, so you can script anything you would otherwise click. Endpoints and parameters are documented in the API reference.

How do I authenticate?

Send your API token as a Bearer token in the Authorization header of each HTTPS request. Store tokens in a secret manager or your CI system's secrets, never in source control.

Is there a Terraform provider?

Yes. The FlexDedi Terraform provider manages servers as resources, so you can review changes with terraform plan and keep your fleet in version control. It fits alongside the providers you already use for DNS, monitoring and configuration.

Can I order servers through the API?

Yes. You can provision servers by plan, location and OS image, and they are billed like any other order: monthly, with no setup fees. Servers marked Ready in minutes are usually delivered within 15 minutes of payment.

Still have a question?Tickets for customers, written quotes for projects.How to reach us

Your next server is minutes away.

Deploy a Core 16 for $299/mo, or let our engineers size the right fleet for you.

  • No setup fees
  • Unmetered traffic
  • Cancel anytime