ServerAvatarDocs
API Reference

Integrations

API routes for cloud provider accounts, Git accounts, backup storage accounts and Cloudflare accounts of an organization.

Integrations connect an organization to the services it uses: a cloud provider to create servers, Git accounts to deploy code, storage to keep backups, and Cloudflare to manage domains. See the guide pages Cloud providers, Git accounts, Backup storage and Cloudflare.

All paths here start with /organizations/{organization}, where {organization} is the organization id from GET /organizations.

Reading works with the personal API token, changing does not

Listing and reading integrations works with both kinds of token. Connecting, editing, checking, testing and removing an account needs a login token. With the personal API token those routes answer 403 with the code api_token_not_allowed. See Authentication. The tables below mark them login token.

Secrets you send, such as tokens and keys, are never returned. An account in an answer only says which keys are saved.

Cloud provider accounts

A cloud provider account holds an API token for DigitalOcean, Vultr, Linode, Hetzner or AWS Lightsail. Permission: Cloud Providers (view to list, manage to change).

RoutePurposeToken
GET /organizations/{organization}/cloud-provider-accountsList the accounts.Both
POST /organizations/{organization}/cloud-provider-accountsConnect an account.Login token
PATCH /organizations/{organization}/cloud-provider-accounts/{cloudProviderAccount}Rename it or replace its credentials.Login token
POST /organizations/{organization}/cloud-provider-accounts/{cloudProviderAccount}/checkCheck the saved credentials with the provider.Login token
GET /organizations/{organization}/cloud-provider-accounts/{cloudProviderAccount}/credentialsThe saved keys, with secrets masked, for the edit form.Login token
DELETE /organizations/{organization}/cloud-provider-accounts/{cloudProviderAccount}Disconnect the account.Login token

GET /organizations/{organization}/cloud-provider-accounts

A paged list. The default page size is 10.

QueryTypeRules
pageintegerFrom 1.
per_pageinteger1 to 50.
searchstringAt most 100 characters.
providerstringdigitalocean, vultr, linode, hetzner or lightsail.
statusstringconnected or needs_new_token.
{
  "data": [
    {
      "id": 7,
      "name": "Production DigitalOcean",
      "provider": "digitalocean",
      "provider_label": "DigitalOcean",
      "status": "connected",
      "status_label": "Connected",
      "created_at": "2026-11-10T10:00:00+00:00",
      "updated_at": "2026-11-10T10:00:00+00:00"
    }
  ],
  "links": { "first": "…", "last": "…", "prev": null, "next": null },
  "meta": { "current_page": 1, "per_page": 10, "total": 1 }
}

needs_new_token means the provider rejected the saved token the last time it was checked. links and meta are shortened here.

POST /organizations/{organization}/cloud-provider-accounts

Connects an account. Central checks the credentials with the provider before it saves them.

FieldTypeRequiredRules
namestringyesAt most 100 characters.
providerstringyesdigitalocean, vultr, linode, hetzner or lightsail.
credentials.tokenstringfor every provider except lightsailAt most 4096 characters, no spaces.
credentials.access_keystringfor lightsailLetters and digits, at most 128 characters.
credentials.secret_keystringfor lightsailAt most 4096 characters, no spaces.

credentials takes only the keys of its provider.

curl -X POST https://<api-address>/api/v1/organizations/1/cloud-provider-accounts \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <login-token>" \
  -d '{"name": "Production DigitalOcean", "provider": "digitalocean", "credentials": {"token": "<provider-api-token>"}}'

201 returns the account in data, in the shape above.

PATCH takes name and credentials, both optional, with the same rules. You cannot change provider. 200 returns the account. POST .../check returns the account with its new status. DELETE returns the account with the message Cloud provider account disconnected.; it does not touch the servers it created.

Errors:

  • 422 cloud_provider_credentials_rejected — The cloud provider rejected these credentials. Check that they are valid and have the required permissions.
  • 422 cloud_provider_already_connected — These credentials are already connected in this organization as "<name>".
  • 409 cloud_account_in_use — This cloud provider account is used by these servers: <servers>. Delete them first, then disconnect the account.
  • 409 cloud_provider_account_changed — the account changed while it was being checked. Read it again and retry.
  • 503 cloud_provider_unavailable — the provider could not be reached. Try again later.
  • 503 cloud_provider_credentials_unreadable — the saved credentials cannot be read. Edit the account and send new ones.

Git accounts

A Git account holds a token for GitHub, GitLab (also self-hosted) or Bitbucket. Permission: Git (view to list and read, manage to change).

RoutePurposeToken
GET /organizations/{organization}/git-accountsList the accounts.Both
GET /organizations/{organization}/git-accounts/{gitAccount}/repositoriesThe repositories the token can see.Both
GET /organizations/{organization}/git-accounts/{gitAccount}/serversThe servers that hold the account.Both
POST /organizations/{organization}/git-accountsConnect an account.Login token
PATCH /organizations/{organization}/git-accounts/{gitAccount}Rename it or replace its token.Login token
POST /organizations/{organization}/git-accounts/{gitAccount}/checkCheck the token with the provider.Login token
DELETE /organizations/{organization}/git-accounts/{gitAccount}Disconnect the account.Login token
POST /organizations/{organization}/git-accounts/{gitAccount}/servers/{server}/syncSend the current token to one server (Update again).Login token
DELETE /organizations/{organization}/git-accounts/{gitAccount}/servers/{server}Remove the account from one server.Login token

GET /organizations/{organization}/git-accounts

A paged list (default page size 10). Query: page, per_page (1 to 50), search (at most 100 characters), provider (github, gitlab or bitbucket), status (connected or needs_new_token).

{
  "data": [
    {
      "id": 3,
      "label": "Company GitHub",
      "provider": "github",
      "provider_label": "GitHub",
      "host": null,
      "workspace": null,
      "identifier": "acme-dev",
      "scopes": ["repo"],
      "status": "connected",
      "status_label": "Connected",
      "servers_count": 2,
      "last_verified_at": "2026-11-20T08:00:00+00:00",
      "created_at": "2026-11-10T10:00:00+00:00",
      "updated_at": "2026-11-20T08:00:00+00:00"
    }
  ],
  "links": { "first": "…", "last": "…", "prev": null, "next": null },
  "meta": { "current_page": 1, "per_page": 10, "total": 1 }
}

POST /organizations/{organization}/git-accounts

Connects an account. Central checks the token with the provider first.

FieldTypeRequiredRules
providerstringyesgithub, gitlab or bitbucket.
labelstringyesAt most 100 characters. Unique in the organization.
tokenstringyes8 to 500 printable characters, no spaces.
hoststringnoSelf-hosted GitLab only. A public HTTPS address, at most 255 characters. Empty means gitlab.com.
workspacestringfor bitbucketThe Bitbucket workspace: letters, digits, ., _ and -, at most 100 characters.

201 returns the account with the message Git account connected.

PATCH takes label, token, host (GitLab) and workspace (Bitbucket), all optional, with the same rules; send at least one. 200 — Git account updated. POST .../check — 200 returns the account with its new status. DELETE — 200 Git account disconnected. Nothing was changed at the provider or on any server.

Repositories and servers

GET .../repositories takes search (at most 100 characters) and page (1 to 1000) and lists the repositories the token can see at the provider. GET .../servers lists the servers that hold the account:

{
  "data": [
    {
      "server_id": 145,
      "server_name": "web-1",
      "oss_account_id": 12,
      "status": "synced",
      "status_label": "Updated",
      "token_up_to_date": true,
      "label_up_to_date": true,
      "error_code": null,
      "error": null,
      "provisioned_at": "2026-11-12T09:00:00+00:00",
      "last_synced_at": "2026-11-20T08:00:00+00:00"
    }
  ]
}

status is pending (Updating), synced (Updated) or failed (Not updated). POST .../servers/{server}/sync answers 202 with the link and the message Updating this server…. DELETE .../servers/{server} answers 200 with Git account removed from <server>.

Git errors have a code that starts with git_:

StatusCodeMeaning
422git_token_rejectedThe provider rejected the token, or it cannot read repositories.
422git_not_foundThe GitLab address or Bitbucket workspace does not exist for this token.
422git_host_unsafe, git_host_not_foundThe GitLab address is not a public HTTPS address, or has no DNS record.
422git_already_connectedThis token is already connected in this organization.
422git_label_takenAnother Git account has this name.
409git_in_useServers still use the account. Remove it from them first.
409git_used_by_appsApplications on the server deploy with it, so it cannot be removed there.
429git_rate_limitedThe provider has too many requests. Wait a minute.
503git_unavailable, git_server_unreachableThe provider or the server could not be reached.

Backup storage accounts

A storage account is a place for backups: S3-compatible storage, FTP, SFTP or Google Drive. Permission: Storage (view to list, manage to change). Add an account to a server in the server's Backups screen. See Backup storage.

RoutePurposeToken
GET /organizations/{organization}/storage-accountsList the accounts.Both
GET /organizations/{organization}/storage-accounts/{storageAccount}/serversThe servers that use the account.Both
POST /organizations/{organization}/storage-accountsConnect an account.Login token
PATCH /organizations/{organization}/storage-accounts/{storageAccount}Change it.Login token
POST /organizations/{organization}/storage-accounts/{storageAccount}/testWrite, read and delete a small test file.Login token
DELETE /organizations/{organization}/storage-accounts/{storageAccount}Disconnect the account.Login token
POST /organizations/{organization}/storage-accounts/{storageAccount}/oauth/startStart Log in with Google.Login token
POST /organizations/{organization}/storage-accounts/oauth/callbackFinish Log in with Google.Login token
POST /organizations/{organization}/storage-accounts/{storageAccount}/servers/{server}/syncSend the settings to one server.Login token
DELETE /organizations/{organization}/storage-accounts/{storageAccount}/servers/{server}Remove the account from one server.Login token

GET /organizations/{organization}/storage-accounts

A paged list (default page size 10). Query: page, per_page (1 to 50), search (at most 100 characters), provider (s3, ftp, sftp, google_drive or google_drive_oauth), status (not_tested, needs_login, connected or failed). Next to data, links and meta the answer has google_oauth_redirect_uri, the address Google sends people back to.

{
  "data": [
    {
      "id": 5,
      "name": "Backups bucket",
      "provider": "s3",
      "provider_label": "S3",
      "service": "r2",
      "service_label": "Cloudflare R2",
      "prefix": "acme",
      "settings": { "endpoint": "https://abc.r2.cloudflarestorage.com", "region": "auto", "bucket": "backups" },
      "saved_keys": ["access_key", "secret_key"],
      "status": "connected",
      "status_label": "Connected",
      "test": {
        "tested_at": "2026-11-20T08:00:00+00:00",
        "success": true,
        "error_class": null,
        "message": null
      },
      "servers_count": 1,
      "location_locked": true,
      "created_at": "2026-11-10T10:00:00+00:00",
      "updated_at": "2026-11-20T08:00:00+00:00"
    }
  ]
}

saved_keys names the secrets that are saved, never their values. location_locked is true while a server uses the account: you can no longer change where it points.

POST /organizations/{organization}/storage-accounts

FieldTypeRequiredRules
namestringyesAt most 100 characters, one line.
providerstringyess3, ftp, sftp, google_drive or google_drive_oauth.
servicestringfor s3aws, r2, b2, wasabi, spaces or other.
prefixstringnoA folder path, at most 255 characters: letters, digits, ., _, - and /, no ...
configobjectyesThe settings of the provider, in the table below.

config by provider. Send only the keys of the provider.

Providerconfig keys
s3endpoint (HTTPS address, at most 255; required unless service is aws), region (letters, digits and -, at most 64), bucket (required, at most 255: letters, digits, ., _, -), access_key (required, at most 255), secret_key (required, at most 512).
ftphost (required, at most 255), port (1 to 65535), username (required, at most 255), password (required, at most 512), root (folder path), ssl (boolean), passive (boolean).
sftphost (required), port, username (required), root, and a password or a private_key (at most 16384) with an optional passphrase.
google_driveservice_account_json (required, at most 16384), folder_id (required, letters, digits, _ and -).
google_drive_oauthclient_id (required, ends in .apps.googleusercontent.com), client_secret (required). Then call oauth/start.

201 returns the account with the message Storage account saved. It is tested when you add it to a server. For google_drive_oauth the message is Storage account saved. Log in with Google to finish connecting it. and status is needs_login.

PATCH takes name, service (S3), prefix and config, all optional, with the same rules; you cannot change provider. 200 — Storage account updated. DELETE — 200 Storage account disconnected. Nothing was changed in the storage or on any server, and no backup was deleted.

Test, sign in with Google and servers

  • POST .../test has no body. 200 returns data.test (success, latency_ms, error_class, message, tested_at) and data.account. The message is Connection succeeded. when it worked.
  • POST .../oauth/start has no body. 200 returns data.authorize_url. Open it in a browser to sign in with Google.
  • POST .../oauth/callback takes state (required) and code or error, as Google returned them. 200 returns the account with the message Logged in with Google. The account is tested when you add it to a server.
  • GET .../servers lists the servers that use the account. POST .../servers/{server}/sync and DELETE .../servers/{server} update and remove it on one server, as for Git accounts.

Storage errors have a code that starts with storage_, for example storage_name_taken, storage_already_connected and storage_in_use (servers still use the account). The message says what to do.

Cloudflare

Cloudflare accounts hold API tokens. The zones those tokens can see are your domains. Permission: Cloudflare (view to read, manage to change). One permission covers the accounts and the domains. See Cloudflare.

RoutePurposeToken
GET .../cloudflare-accountsList the accounts (paged: page, per_page 1 to 50).Both
POST .../cloudflare-accountsConnect an account.Login token
PATCH .../cloudflare-accounts/{cloudflareAccount}Rename it or replace its token.Login token
POST .../cloudflare-accounts/{cloudflareAccount}/checkCheck the token with Cloudflare.Login token
DELETE .../cloudflare-accounts/{cloudflareAccount}Disconnect the account.Login token
GET .../cloudflare/domainsEvery domain of every account. Query: page, per_page (1 to 100), search (at most 253), account (an account id).Both

In this table ... stands for /organizations/{organization}.

POST takes name (required, at most 100 characters) and token (required, 20 to 255 characters: letters, digits, _ and -). PATCH takes both, optional. An account in an answer has id, name, status, status_label, created_at and updated_at.

Zones and DNS records

A zone id is Cloudflare's 32-character hexadecimal id. {cloudflareAccount} is the account id. These routes work with both kinds of token and need Cloudflare (view to read, manage to change).

RoutePurpose
GET .../cloudflare/accounts/{cloudflareAccount}/zones/{zone}One zone.
PATCH .../cloudflare/accounts/{cloudflareAccount}/zones/{zone}/settingsChange zone settings.
GET .../cloudflare/accounts/{cloudflareAccount}/zones/{zone}/edge-certificatesThe zone's edge certificates.
GET .../cloudflare/accounts/{cloudflareAccount}/zones/{zone}/dns-recordsList DNS records. Query: type (A, AAAA, CNAME, TXT or MX), search, page, per_page (5 to 100, default 50).
POST .../cloudflare/accounts/{cloudflareAccount}/zones/{zone}/dns-recordsAdd a DNS record.
PATCH .../cloudflare/accounts/{cloudflareAccount}/zones/{zone}/dns-records/{record}Change a DNS record.
DELETE .../cloudflare/accounts/{cloudflareAccount}/zones/{zone}/dns-records/{record}Delete a DNS record.
POST .../cloudflare/accounts/{cloudflareAccount}/zones/{zone}/purge-cachePurge the cache.

Zone settings (PATCH .../settings), all optional: ssl (off, flexible, full or strict), always_use_https, automatic_https_rewrites, tls_1_3, under_attack, development_mode (booleans) and min_tls_version (1.0, 1.1, 1.2 or 1.3).

DNS record (POST and PATCH):

FieldTypeRequiredRules
typestringyesA, AAAA, CNAME, TXT or MX.
namestringyes@ for the domain itself, or a host name, at most 253 characters.
contentstringyesAn IPv4 address for A, an IPv6 address for AAAA, a host name for CNAME and MX, text for TXT. At most 253 characters, 2048 for TXT.
ttlintegeryes1 for automatic, or 60 to 86400 seconds.
proxiedbooleannoSend traffic through Cloudflare.
priorityintegerfor MX only0 to 65535. Refused for other types.

Purge the cache (POST .../purge-cache): type is everything, or custom with at least one of files (full URLs, at most 30), tags, hosts or prefixes (at most 100 each).

Limits

  • Names and labels: 100 characters.
  • At most 50 accounts on a page (100 for Cloudflare domains). The default page size is 10.
  • A Git token is 8 to 500 characters; a Cloudflare token 20 to 255.
  • The general rate limit applies.

Who can do this

WhatNeeds
List or read cloud provider accountsCloud Providers (view).
Connect, edit, check, read the saved keys of, or disconnect oneCloud Providers (manage), and a login token.
List Git accounts, repositories and serversGit (view).
Connect, edit, check, disconnect, sync or remove a Git accountGit (manage), and a login token.
List storage accounts and their serversStorage (view).
Connect, edit, test, disconnect, sign in with Google, sync or remove a storage accountStorage (manage), and a login token.
List Cloudflare accounts and domains, read zones and recordsCloudflare (view).
Connect, edit, check or disconnect a Cloudflare account; change zones and recordsCloudflare (manage). Account changes also need a login token.

A member without the permission gets 403: You do not have permission to do this in this organization. Someone who is not a member gets 404.

Common errors

  • The API token cannot change account settings. Log in to the panel to do this. (api_token_not_allowed, 403) A write was called with the personal API token.
  • You do not have permission to do this in this organization. (403) Your role lacks the permission.
  • The requested item was not found. (not_found, 404) The account does not belong to this organization, or you are not a member.

On this page