REST API

Manage Plexivo resources over HTTPS with an API key: base URL, authentication, idempotency, pagination, errors, rate limits and endpoints.

Everything you do in the Plexivo console goes through the same REST API, so you can automate it. Requests and responses are JSON over HTTPS.

Base URL#

text
https://api.plexivo.io/api/v1

In paths, an organisation is a tenant: /tenants/{tenant_id}/…. GET /tenants lists your organisations, with their ids.

Authentication#

Send an API key as a bearer token on every request:

bash
curl https://api.plexivo.io/api/v1/tenants \
  -H "Authorization: Bearer $PLEXIVO_TOKEN"

A key works only for the organisation it was made in, and only within its permissions. A missing, wrong or expired key is answered with 401; a key without the needed permission, or used for another organisation, with 403.

Managing people and access, such as members, invitations, roles, policies and API keys, needs a person signed in to the console. API keys are refused there by design.

Requests and responses#

  • Send JSON bodies with Content-Type: application/json. Responses are JSON.
  • Times are ISO 8601 in UTC. Money is in US cents, in fields that end in _cents.
  • Every response carries an x-trace-id header. Quote it when you contact support.

Long-running changes#

Creating, resizing or deleting a resource takes time. The response returns at once with the resource and an operation. Follow the operation with GET /operations/{id} until its state is final. A create answers 201 when the resource is being built, or 202 when it is waiting for capacity; it is not charged while it waits.

Prices before you create#

Ask for a price first with POST /tenants/{tenant_id}/deployments/estimate. The answer has the estimate, anything that would stop the create in blockers, and a quote_token valid for 5 minutes. Send the quote_token with the same body to POST /tenants/{tenant_id}/deployments, and Plexivo creates the resource only at that price: if anything changed, the create is refused with quote_changed or quote_expired.

GET /tenants/{tenant_id}/create-capabilities lists what each product can be created with, and GET /reference lists regions, sizes and other options.

Idempotency#

Network calls fail. To retry a POST, PUT, PATCH or DELETE safely, send an Idempotency-Key header with a unique value of up to 256 bytes, such as a UUID:

bash
curl -X POST https://api.plexivo.io/api/v1/tenants/$TENANT/deployments \
  -H "Authorization: Bearer $PLEXIVO_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 7b0e2f4c-…" \
  -d @create.json
  • A retry with the same key and body gets the first response again, with the header Idempotency-Replayed: true. Nothing is done twice.
  • The same key with a different body is refused with 409 idempotency_key_reused.
  • While the first request is still running, a retry gets 409 idempotency_in_flight. Wait and retry with the same key.
  • A request that failed does not use up its key: fix the problem and retry with the same key.
  • Keys are remembered for 48 hours.
  • A response that contained a one-time secret, such as a new password, is never replayed. The retry gets 409 with response_not_replayable; check the resource before you try again.

Pagination#

Long lists come a page at a time, newest first. Pass limit for the page size; when there is more, the response carries a cursor that you send back for the next page. When the cursor is null, you have everything.

ListPage sizeNext page
Audit log: GET /tenants/{tenant_id}/activity50 by default, up to 200Send next_cursor as cursor
Events: GET /tenants/{tenant_id}/observability/logs100 by default, up to 200Send next_cursor as cursor
Wallet statement: GET /tenants/{tenant_id}/wallet/statement100 by default, up to 500Send next_before as before
Invoices: GET /tenants/{tenant_id}/invoices50, fixedSend next_cursor as before

Errors#

An error answers with an HTTP status and a body you can act on:

json
{
  "error": {
    "code": "quota_exceeded",
    "message": "…",
    "details": { … }
  }
}

Use code in your program; message is for people and may change. Idempotency errors use the application/problem+json format, with code, detail and a fix. Every code is in Error codes.

Rate limits#

Plexivo limits how fast requests arrive, so one busy script cannot slow down everyone else. Each layer answers 429 when you go over, with a Retry-After header in seconds for the per-minute limits:

LimitDefault
Per caller, for each top-level path such as /tenants or /deployments. API key calls are counted by client address.600 requests a minute; 30 for /migrations
Per person, across their sign-ins and the API keys they made600 reads and 120 changes a minute, 8 changes at a time
Per API keyThe key’s own limits: 120 requests a minute and 4 changes at a time by default. See Limits on every key.

When you get a 429, wait for Retry-After seconds (or a few seconds when there is none) and retry with the same Idempotency-Key.

Main endpoints#

Paths are relative to the base URL. {tenant_id} is your organisation’s id.

Organisations and projects#

Method and pathWhat it does
GET /tenantsYour organisations.
GET /tenants/{tenant_id}One organisation.
GET /tenants/{tenant_id}/projectsIts projects.
POST /tenants/{tenant_id}/projectsCreate a project.
DELETE /tenants/{tenant_id}/projects/{id}Delete an empty project.
GET /tenants/{tenant_id}/planThe plan and its limits.

Apps, databases and caches#

Method and pathWhat it does
GET /tenants/{tenant_id}/deploymentsEvery app, database and cache.
POST /tenants/{tenant_id}/deployments/estimatePrice a new resource and get a quote.
POST /tenants/{tenant_id}/deploymentsCreate a resource. type is app, postgres or mysql, or the Plexivo Cache type listed by GET /catalog.
GET /deployments/{id}One resource.
PATCH /tenants/{tenant_id}/deployments/{id}Rename it or move it to another project.
GET /tenants/{tenant_id}/deployments/{id}/size/quotePrice a new size for a database or cache.
PUT /tenants/{tenant_id}/deployments/{id}/sizeResize a database or cache.
POST /tenants/{tenant_id}/deployments/{id}/pauseStop it. Compute is released; data is kept.
POST /tenants/{tenant_id}/deployments/{id}/resumeStart it again.
DELETE /deployments/{id}Delete it.
GET /deployments/{id}/connectionConnection details for a database or cache.
POST /deployments/{id}/tunnelA short-lived tunnel grant, as used by plexivo db connect. Needs the owner or admin role.
GET / PUT /deployments/{id}/networkWho can reach it.
GET /operations/{id}Follow a long-running change.

Plexivo App Runner#

Method and pathWhat it does
GET / PUT /deployments/{id}/envEnvironment variables.
PUT /deployments/{id}/sourceChange the repository, branch or image.
POST /deployments/{id}/redeployDeploy again: rebuild from the branch, or fetch the image again.
GET /deployments/{id}/shape/quote, PUT /deployments/{id}/shapePrice and change the instance size, the number of instances and autoscaling (replicas, and max_replicas to autoscale up to).
PUT /deployments/{id}/health-checkThe health check.
GET /tenants/{tenant_id}/deployments/{id}/buildsBuilds.
GET /tenants/{tenant_id}/deployments/{id}/releasesReleases.
POST /tenants/{tenant_id}/deployments/{id}/releases/{release_id}/rollbackRoll back to a release.
GET /tenants/{tenant_id}/deployments/{id}/logs/recentThe app’s recent output.
GET /tenants/{tenant_id}/domains, POST …/domainsCustom domains.

Databases#

Method and pathWhat it does
POST /tenants/{tenant_id}/databases/{database_id}/backupsTake a backup now.
POST /tenants/{tenant_id}/databases/{database_id}/credentials/rotateRotate the password.
GET / POST /tenants/{tenant_id}/databases/{database_id}/exportsExports of your data.
GET /deployments/{id}/upgrade/precheck, POST /deployments/{id}/upgradeCheck and start a version upgrade.
GET /tenants/{tenant_id}/deployments/{id}/maintenanceScheduled maintenance and the window.
GET / PUT /tenants/{tenant_id}/deployments/{id}/replicasRead replicas of a Plexivo Postgres or Plexivo MySQL database (count).

Plexivo Kubernetes and Plexivo Secrets#

Method and pathWhat it does
GET / POST /tenants/{tenant_id}/kubernetesList or create Kubernetes workloads.
GET / PUT / DELETE /kubernetes/{id}One workload.
GET /kubernetes/{id}/kubeconfigA kubeconfig for its namespace.
GET / POST /tenants/{tenant_id}/secretsList or create secrets. Values are never listed.
POST /tenants/{tenant_id}/secrets/{id}/attachmentsGive a secret to an app, a Kubernetes workload or your functions.

Observability#

Method and pathWhat it does
GET /tenants/{tenant_id}/observability/logsEvents Plexivo records about your resources.
GET /tenants/{tenant_id}/observability/metricsCurrent metrics.
GET /tenants/{tenant_id}/observability/metric-seriesMetrics over time.
GET /tenants/{tenant_id}/alert-configurationAlert rules and channels.
GET /tenants/{tenant_id}/incidentsIncidents that affected you.
GET /tenants/{tenant_id}/slaMeasured availability per resource.
GET /tenants/{tenant_id}/activityThe audit log.

Billing#

For an API key, reading the wallet and any change that moves money need the billing permission.

Method and pathWhat it does
GET /tenants/{tenant_id}/walletBalance.
GET /tenants/{tenant_id}/wallet/statementEvery top-up, charge and credit.
GET /tenants/{tenant_id}/wallet/usageWhat each resource cost.
GET /tenants/{tenant_id}/invoicesInvoices.
GET /tenants/{tenant_id}/commitmentsCommitments.

Paying, buying a plan and making a commitment are best done in the console, where you see and confirm the price.

Next steps#

Updated 27 October 2026