Reseller: one project per customer

If you sell infrastructure to your own customers, give each of them a Virtual Data Center project of their own. A project has its own default network, private networks, firewall, addresses and costs, so customers never see each other's machines and you can bill each one from its own numbers. Fiberax sends one invoice to you, with a line per project.

This guide uses an account key: one key that orders and closes projects and works inside any of them. Getting started covers the basics of calls, answers and errors; this page assumes you know them.

1. Issue an account key

On the API tokens page of the client area, issue an account key with read and write access. Only the account owner can issue one - a team member cannot - and an account holds up to 10 of them. The secret is shown once.

export FBX_ACCOUNT_KEY=fbx_...

2. Create a project for a customer

curl -X POST -H "Authorization: Bearer $FBX_ACCOUNT_KEY" \
     -H "Content-Type: application/json" \
     -H "Idempotency-Key: 8d3f1c0e-5b2a-4f7e-9c11-2a6f4b0d7e55" \
     -d '{"name":"acme-prod","labels":["cust-1042"]}' \
     https://api.fiberax.com/v1/projects
{ "data": { "id": 4802, "name": "acme-prod", "status": "Pending", "product": "vdc",
            "labels": ["cust-1042"], "created_at": "2026-11-02T00:00:00+01:00" } }

The answer is 201 with a Location of the new project. It may still say Pending: the project is set up within seconds after the answer. Until it is Active, GET /v1/projects/4802 and every call inside the project answer 409 service_provisioning - repeat after a few seconds. Ordering a project is free - you pay for what runs in it. Always send an Idempotency-Key here: if the connection drops, repeating the same request with the same key returns this answer instead of ordering a second project. While the first request is still ordering, a repeat gets 409 idempotency_in_progress - wait a few seconds and repeat. The key keeps the answer even when something fails after the order. A 500 saying the project may have been created means exactly that: find the project with GET /v1/projects?label=cust-1042 (or by its name) and do not order with a new key until you have checked the list. Put your own customer id into a label - it is how you find the project again.

An account holds up to 10 projects (partner accounts 100; ask us for more). Projects ordered in the client area count too. Past the limit the answer is 409 quota_exceeded with the limit and the current count in detail.

Keep the server of your own portal in a separate project with the label system, and the customers' projects for the customers' resources only. Then nothing of yours shows up on a customer's bill.

3. Work inside a project

Every endpoint of the reference works with the account key once you name the project in the Fiberax-Project header:

curl -H "Authorization: Bearer $FBX_ACCOUNT_KEY" \
     -H "Fiberax-Project: 4802" \
     https://api.fiberax.com/v1/servers

Without the header the answer is 400 project_required; a project of another account, or one that is closed, answers 404 not_found. A project key that sends the header with any id but its own gets 400 project_mismatch - so a script that picked up the wrong key never changes the wrong project.

4. Find your projects

curl -H "Authorization: Bearer $FBX_ACCOUNT_KEY" \
     "https://api.fiberax.com/v1/projects?label=cust-1042"

The list holds pending, active and suspended projects with their labels. Rename a project or replace its labels with PATCH /v1/projects/{id}; labels replaces the whole set. Labels come back sorted alphabetically, ignoring letter case, not in the order you sent them.

5. A key for your customer

If a customer should call the API directly - from their own Terraform, say - issue them a key of their project only:

curl -X POST -H "Authorization: Bearer $FBX_ACCOUNT_KEY" \
     -H "Content-Type: application/json" \
     -H "Idempotency-Key: 2b6e9a10-7c44-4d1b-8e0f-91c3a5d2f6b8" \
     -d '{"name":"acme-terraform","scope":"rw","expires_in_days":90}' \
     https://api.fiberax.com/v1/projects/4802/tokens

The secret is in this answer only. A project holds up to 25 active keys. List them with GET /v1/projects/{id}/tokens, revoke one with DELETE /v1/projects/{id}/tokens/{token_id}. Such a key sees one project, but SSH keys belong to the whole account: a key of one project can list and delete the SSH keys of all your projects. If that matters, keep your customers' SSH keys out of the account pool and pass them to servers as text - see 12. Your customers' SSH keys.

6. Costs per customer

curl -H "Authorization: Bearer $FBX_ACCOUNT_KEY" \
     "https://api.fiberax.com/v1/projects/4802/costs?start=2026-11-01T00:00:00Z&end=2026-12-01T00:00:00Z"

The same numbers as GET /v1/project/costs, for the project in the path. Walk the list of projects once a month and bill each customer from their own project.

7. Money

All projects are paid from your account balance and land on your one invoice. While an invoice of yours is overdue, no project can be ordered and no project can create anything that costs money (402 client_has_debt); reading, deleting, releasing addresses and turning backups off keep working in all of them (starting and stopping servers do not), so you can always take down what you pay for. Partner accounts follow their own payment schedule. A payment card or a positive balance is needed for paid resources, such as servers and addresses, not for ordering a project.

8. Close a customer's project

A project is closed only when it is empty: delete its servers (routers included), release its public addresses, delete its private networks except the default one, and delete its own ISO images and server images. Then:

curl -X DELETE -H "Authorization: Bearer $FBX_ACCOUNT_KEY" \
     -H "Idempotency-Key: 5f0c2d9e-1a3b-4c8d-b7e6-0d9a8c7b6a51" \
     https://api.fiberax.com/v1/projects/4802
{ "data": { "deleted": 4802 } }

The answer is 202: the deletion is accepted, not finished. The project is closed by a queue within about a minute, and it is done when GET /v1/projects/4802 answers 404 - poll for that. From the 202 on, every change to the project except the deletion and revoking its keys answers 409 project_busy, and a change still in progress when you ask makes the deletion itself answer 409 project_busy - so a parallel job of yours cannot create something there only to have it destroyed. If the project still answers 200 several minutes later, the deletion did not go through (a server transfer started in between, for example): finish or cancel what is in the way and send DELETE again with a new Idempotency-Key. Anything left behind answers 409 project_not_empty: detail lists what and how many, and blockers in the body gives the same counts by kind (servers, ips, networks, isos, server_images). The last invoice for the running period is issued as usual.

9. Limits to plan for

10. Server console for your customers

Your customers can open the console of their servers in your portal. Console access is a separate permission of a key: issue an account key with read and write access and Server console ticked on the API tokens page of the client area (keys issued through /v1/projects/{id}/tokens carry no console access). Keep that key on your backend; your customers never see it. The flow:

The server must be running. Requests, limits, the rules for the proxy and examples for noVNC and nginx are in the guide Server console.

11. Move a server to a customer's own project

A server you set up in a shared project can move into the customer's own project - or between any two projects of your account - without a restart, with its disks, snapshots, backups, public address and saved password. Name the project the server is in now in the header and the receiving one in the body:

curl -X POST -H "Authorization: Bearer $FBX_ACCOUNT_KEY" \
     -H "Fiberax-Project: 4801" \
     -H "Content-Type: application/json" \
     -H "Idempotency-Key: 9d1e7c3a-4b2f-4e8a-a6d5-3c0b9f1e2a74" \
     -d '{"project_id":4802}' \
     https://api.fiberax.com/v1/servers/11402/actions/move
{ "data": { "id": 57, "status": "queued", "server_id": 11402, "from_project_id": 4801, "to_project_id": 4802 },
  "task": { "id": "8f3c2a9d0b1e4f5a6c7d8e9f0a1b2c3d", "status": "pending", "poll": "/v1/tasks/8f3c2a9d0b1e4f5a6c7d8e9f0a1b2c3d", ... } }

Only an account key can do this: both projects are yours, so there is no code to confirm and nothing to accept. Poll the task with the same Fiberax-Project: 4801 header; when it has succeeded the server answers in project 4802 and no longer in 4801. A failed task says why in error.message, and nothing has changed; its error.code is server_not_movable when the server or a project cannot take the move (the reasons below, checked again while the task runs) and operation_failed otherwise. Both projects must be in the same datacenter. A router, a server with graphics cards, one attached to private networks (networks belong to their project) or one built from your own image stays where it is: the request answers 409 server_not_movable with the reason. Moves of your account run one at a time (another one meanwhile answers 409 server_busy), at most 10 an hour (409 move_limit_reached with Retry-After). Usage up to the move stays with the old project, the new one bills from the move on - both on your one invoice. If your customer manages the server with Terraform, run terraform state rm in the old configuration and terraform import with the same number in the new one.

12. Your customers' SSH keys

The SSH key pool (/v1/ssh-keys) belongs to the whole account: every key of every project can list it and delete from it. A customer's key does not have to go there. Send it to the server as text in ssh_public_keys - one OpenSSH public key per item, the line of the .pub file:

curl -X POST -H "Authorization: Bearer $FBX_ACCOUNT_KEY" \
     -H "Fiberax-Project: 4802" \
     -H "Content-Type: application/json" \
     -H "Idempotency-Key: 8d1f3c52-6b0e-4a97-9c2d-7e5a4b1f0c39" \
     -d '{"name":"web-1","server_type_id":4,"image":"fcf9f69c8630904c1d6d73a821f4e674",
          "cores":2,"memory_mb":4096,"disk_gb":40,"public_ipv4":{"new":true},
          "ssh_public_keys":["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI... customer@laptop"]}' \
     https://api.fiberax.com/v1/servers