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).
| Route | Purpose | Token |
|---|---|---|
GET /organizations/{organization}/cloud-provider-accounts | List the accounts. | Both |
POST /organizations/{organization}/cloud-provider-accounts | Connect 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}/check | Check the saved credentials with the provider. | Login token |
GET /organizations/{organization}/cloud-provider-accounts/{cloudProviderAccount}/credentials | The 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.
| Query | Type | Rules |
|---|---|---|
page | integer | From 1. |
per_page | integer | 1 to 50. |
search | string | At most 100 characters. |
provider | string | digitalocean, vultr, linode, hetzner or lightsail. |
status | string | connected 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.
| Field | Type | Required | Rules |
|---|---|---|---|
name | string | yes | At most 100 characters. |
provider | string | yes | digitalocean, vultr, linode, hetzner or lightsail. |
credentials.token | string | for every provider except lightsail | At most 4096 characters, no spaces. |
credentials.access_key | string | for lightsail | Letters and digits, at most 128 characters. |
credentials.secret_key | string | for lightsail | At 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).
| Route | Purpose | Token |
|---|---|---|
GET /organizations/{organization}/git-accounts | List the accounts. | Both |
GET /organizations/{organization}/git-accounts/{gitAccount}/repositories | The repositories the token can see. | Both |
GET /organizations/{organization}/git-accounts/{gitAccount}/servers | The servers that hold the account. | Both |
POST /organizations/{organization}/git-accounts | Connect an account. | Login token |
PATCH /organizations/{organization}/git-accounts/{gitAccount} | Rename it or replace its token. | Login token |
POST /organizations/{organization}/git-accounts/{gitAccount}/check | Check 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}/sync | Send 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.
| Field | Type | Required | Rules |
|---|---|---|---|
provider | string | yes | github, gitlab or bitbucket. |
label | string | yes | At most 100 characters. Unique in the organization. |
token | string | yes | 8 to 500 printable characters, no spaces. |
host | string | no | Self-hosted GitLab only. A public HTTPS address, at most 255 characters. Empty means gitlab.com. |
workspace | string | for bitbucket | The 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_:
| Status | Code | Meaning |
|---|---|---|
| 422 | git_token_rejected | The provider rejected the token, or it cannot read repositories. |
| 422 | git_not_found | The GitLab address or Bitbucket workspace does not exist for this token. |
| 422 | git_host_unsafe, git_host_not_found | The GitLab address is not a public HTTPS address, or has no DNS record. |
| 422 | git_already_connected | This token is already connected in this organization. |
| 422 | git_label_taken | Another Git account has this name. |
| 409 | git_in_use | Servers still use the account. Remove it from them first. |
| 409 | git_used_by_apps | Applications on the server deploy with it, so it cannot be removed there. |
| 429 | git_rate_limited | The provider has too many requests. Wait a minute. |
| 503 | git_unavailable, git_server_unreachable | The 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.
| Route | Purpose | Token |
|---|---|---|
GET /organizations/{organization}/storage-accounts | List the accounts. | Both |
GET /organizations/{organization}/storage-accounts/{storageAccount}/servers | The servers that use the account. | Both |
POST /organizations/{organization}/storage-accounts | Connect an account. | Login token |
PATCH /organizations/{organization}/storage-accounts/{storageAccount} | Change it. | Login token |
POST /organizations/{organization}/storage-accounts/{storageAccount}/test | Write, 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/start | Start Log in with Google. | Login token |
POST /organizations/{organization}/storage-accounts/oauth/callback | Finish Log in with Google. | Login token |
POST /organizations/{organization}/storage-accounts/{storageAccount}/servers/{server}/sync | Send 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
| Field | Type | Required | Rules |
|---|---|---|---|
name | string | yes | At most 100 characters, one line. |
provider | string | yes | s3, ftp, sftp, google_drive or google_drive_oauth. |
service | string | for s3 | aws, r2, b2, wasabi, spaces or other. |
prefix | string | no | A folder path, at most 255 characters: letters, digits, ., _, - and /, no ... |
config | object | yes | The settings of the provider, in the table below. |
config by provider. Send only the keys of the provider.
| Provider | config keys |
|---|---|
s3 | endpoint (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). |
ftp | host (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). |
sftp | host (required), port, username (required), root, and a password or a private_key (at most 16384) with an optional passphrase. |
google_drive | service_account_json (required, at most 16384), folder_id (required, letters, digits, _ and -). |
google_drive_oauth | client_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 .../testhas no body. 200 returnsdata.test(success,latency_ms,error_class,message,tested_at) anddata.account. The message isConnection succeeded.when it worked.POST .../oauth/starthas no body. 200 returnsdata.authorize_url. Open it in a browser to sign in with Google.POST .../oauth/callbacktakesstate(required) andcodeorerror, as Google returned them. 200 returns the account with the messageLogged in with Google. The account is tested when you add it to a server.GET .../serverslists the servers that use the account.POST .../servers/{server}/syncandDELETE .../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.
| Route | Purpose | Token |
|---|---|---|
GET .../cloudflare-accounts | List the accounts (paged: page, per_page 1 to 50). | Both |
POST .../cloudflare-accounts | Connect an account. | Login token |
PATCH .../cloudflare-accounts/{cloudflareAccount} | Rename it or replace its token. | Login token |
POST .../cloudflare-accounts/{cloudflareAccount}/check | Check the token with Cloudflare. | Login token |
DELETE .../cloudflare-accounts/{cloudflareAccount} | Disconnect the account. | Login token |
GET .../cloudflare/domains | Every 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).
| Route | Purpose |
|---|---|
GET .../cloudflare/accounts/{cloudflareAccount}/zones/{zone} | One zone. |
PATCH .../cloudflare/accounts/{cloudflareAccount}/zones/{zone}/settings | Change zone settings. |
GET .../cloudflare/accounts/{cloudflareAccount}/zones/{zone}/edge-certificates | The zone's edge certificates. |
GET .../cloudflare/accounts/{cloudflareAccount}/zones/{zone}/dns-records | List 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-records | Add 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-cache | Purge 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):
| Field | Type | Required | Rules |
|---|---|---|---|
type | string | yes | A, AAAA, CNAME, TXT or MX. |
name | string | yes | @ for the domain itself, or a host name, at most 253 characters. |
content | string | yes | An 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. |
ttl | integer | yes | 1 for automatic, or 60 to 86400 seconds. |
proxied | boolean | no | Send traffic through Cloudflare. |
priority | integer | for MX only | 0 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
| What | Needs |
|---|---|
| List or read cloud provider accounts | Cloud Providers (view). |
| Connect, edit, check, read the saved keys of, or disconnect one | Cloud Providers (manage), and a login token. |
| List Git accounts, repositories and servers | Git (view). |
| Connect, edit, check, disconnect, sync or remove a Git account | Git (manage), and a login token. |
| List storage accounts and their servers | Storage (view). |
| Connect, edit, test, disconnect, sign in with Google, sync or remove a storage account | Storage (manage), and a login token. |
| List Cloudflare accounts and domains, read zones and records | Cloudflare (view). |
| Connect, edit, check or disconnect a Cloudflare account; change zones and records | Cloudflare (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.