Domains
14 operations in the WP Waterfall API.
- getGet a domain
- patchChange Force HTTPS or the setup mode
- deleteRemove a domain
- getGet the custom SSL certificate of a domain
- putInstall your own SSL certificate on a domain
- deleteRemove the custom SSL certificate
- postMake a domain primary
- getThe records to set for a domain
- postCheck DNS now
- getList the custom SSL certificates of an environment
- getList the domains of an environment
- postAdd a domain
- deleteRemove several domains
- postRefresh SSL for a domain or the temporary domain
Get a domain
get/domains/{id}Permalink to Get a domain
- Scope:
sites:read - Permission:
sites.read
Returns one domain: its hostname, status, ssl_status, setup_mode, force_https_mode, whether it is the primary, and its last job with the failure_reason when that job failed.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the domain. |
Responses
| Status | Body | Description |
|---|---|---|
200 | Domain | Domain |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
id required | string (uuid) | UUIDv7 |
environment_id required | string (uuid) | UUIDv7 |
site_id required | string (uuid) | UUIDv7 |
hostname required | string | |
wildcard required | boolean | |
status required | string | One of: requested, txt_pending, cname_pending, validating, securing, active, failed, removed. |
ssl_status required | string | One of: pending, pending_validation, pending_issuance, active, failed, removed. |
setup_mode required | string | One of: standard, prepare_first. |
is_primary required | boolean | |
force_https_mode required | string | One of: off, all_hostnames, primary_only. |
zero_touch required | boolean | True when the hostname sits in a Cloudflare DNS zone of this company: attach needs no manual step. |
dns_zone_id required | string or null (uuid) | UUIDv7 |
cf_custom_hostname_id required | string or null | |
cname_target required | string or null | Always null. Replaced by the A and AAAA records of the verification records. |
ownership_txt required | object or null | |
ownership_txt.name required | string | |
ownership_txt.value required | string | |
certificate_txt required | object or null | |
certificate_txt.name required | string | |
certificate_txt.value required | string | |
job_id required | string or null (uuid) | The job that attaches or removes the domain, while it runs. |
job_status required | string or null | One of: queued, dispatched, running, succeeded, failed, cancelled. |
failure_reason required | string or null | A plain sentence when the domain failed. |
expires_at required | string or null (date-time) | The 72 hour window closes here. |
Change Force HTTPS or the setup mode
patch/domains/{id}Permalink to Change Force HTTPS or the setup mode
- Scope:
sites:write - Permission:
domains.manage
Send force_https_mode (off, all_hostnames, or primary_only), setup_mode (standard or prepare_first), or both: a body with neither answers 422. A new Force HTTPS mode is saved for the whole environment. Returns 202 with the Job that applies the settings at the edge.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the domain. |
Idempotency-Key | header | string | Optional on PUT and PATCH. When the call starts a job, a retry with the same key, path, and body within 24 hours returns that job instead of starting another. A different path or body starts a new job. |
Request body application/json, required, PatchDomainRequest
Fields
| Name | Type | Description |
|---|---|---|
force_https_mode | string | One of: off, all_hostnames, primary_only. |
setup_mode | string | One of: standard, prepare_first. |
Responses
| Status | Body | Description |
|---|---|---|
202 | Job | Accepted. The body is the Job object. Follow GET /jobs/{id}/events or poll GET /jobs/{id}. |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
202 response fields
| Name | Type | Description |
|---|---|---|
id required | string (uuid) | UUIDv7 |
type required | string | A node job type or an edge job type. One of: provision_environment, delete_environment, set_php_version, set_php_performance, set_php_settings, restart_php, clear_server_cache, search_replace, run_wp_cli, rotate_credentials, apply_nginx_settings, db_import, cron_sync, build_release, activate_release, create_repository, create_node, drain_node, delete_node, purchase_cud, files_write, files_delete, files_rename, phpmyadmin_session, db_check, db_rows_write, db_sql_execute, ssh_update, sftp_account_change, tool_setting, wp_user_create, set_code_mode, env_var_set, env_var_delete, reset_site, set_webroot, set_wp_secrets_key, wp_admin_login_token, wp_login_user_ensure, wp_login_users_remove, repo_commit_read, create_preview_environment, clone_content, merge_branch, create_snapshot, restore_snapshot, set_apm, push_content, commit_branch, sync_working_tree, issue_certificate, register_hostname, unregister_hostname, object_cache_set, patchstack_credentials_write, patchstack_credentials_remove, patchstack_kill_switch, set_disk_quota, prepare_standby, start_replication, verify_replica, fence_site, resync_replica, set_site_suspension, clear_log, promote_environment, copy_into_live, auto_update_run, delete_snapshot, prune_snapshots, backup_download, configure_git_remote, import_git_push, pull_external_git, offsite_backup_test, offsite_backup_run, offsite_backup_list, offsite_backup_restore, restart_service, container_exec, set_network_domain, map_subsite_domain, reap_orphan_containers, migrate_container, migrate_control, migrate_export, migrate_import, migrate_precopy, migrate_delta, migrate_freeze, migrate_thaw, update_mu_plugin, import_site_files, wake_environment, set_sleep_policy, integrity_check, malware_scan, malware_restore, container_images, rebuild_container, update_runtime_image, node_reboot_status, schedule_node_reboot, reboot_node, core_update_commit, core_update_advance, core_update_run, takedown_environment, release_takedown, set_egress, set_standby_hold, copy_evidence, drop_evidence, transfer_site, relabel_environment, record_site_facts, attach_domain, remove_domain, set_primary_domain, apply_redirects, apply_ip_rules, apply_bot_protection, purge_cache, apply_edge_settings, provision_dns_zone, refresh_ssl, set_edge_certificate, remove_edge_certificate, rename_site, rename_temp_hostname, network_sync, migration_fetch, migration_inspect, migration_triage, migration_import, migration_move, export_company_data, export_user_data, export_audit_log, purge_company, reseal_secrets, run_pagespeed, patchstack_provision, patchstack_deprovision, patchstack_reconcile, wp_login_member_users_remove, provision_standby, failover_site, failback_site, accessibility_scan. |
status required | string | One of: queued, dispatched, running, succeeded, failed, cancelled. |
environment_id required | string or null (uuid) | UUIDv7 |
site_id required | string or null (uuid) | UUIDv7 |
node_id required | string or null (uuid) | UUIDv7 |
group_id required | string or null (uuid) | UUIDv7 |
progress required | integer | Range: 0 to 100. |
attempts required | integer | Range: 0 to any. |
error required | object or null | |
error.code required | string | |
error.message required | string | |
error.retryable required | boolean | Default: false. |
result required | object or null | |
description | string or null | What the job does, in one plain sentence, such as "Turn on the server cron on site Elric (staging)". It names the action and the place and never holds a secret, a value, or site content: a WP-CLI command shows its command words and the names that are safe to show, and a placeholder such as "(value hidden)" for the rest. Null on old servers. |
site_name | string or null | The name of the site the job belongs to, when it has one. |
environment_name | string or null | The name of the environment the job runs on, such as live or staging. |
quiet | boolean | True for background work and reads, such as a cron sync or a login link lookup. A customer screen leaves a quiet job out of its bell, its lists, and its toasts. Quiet jobs are still stored, audited, and retried. Absent on old servers, where nothing is quiet. |
parent_job_id | string or null (uuid) | The job this one works for: the job that ran it as a step, or that queued it as a follow-up. That job reads as done only once its follow-ups ended: it stays running until then, and its log names any follow-up that failed. Null for a job nobody started on another's behalf. Absent on old servers. |
requested_by required | object | |
requested_by.type required | string | One of: user, api_key, mcp_agent, system. |
requested_by.id required | string or null | |
requested_by.label required | string or null | |
requested_by.client_name | string or null | MCP client name and version from the handshake, for mcp_agent requests. |
Remove a domain
delete/domains/{id}Permalink to Remove a domain
- Scope:
sites:write - Permission:
domains.manage - Needs a confirmation
Reverses every attach step and deletes the custom hostname. Needs confirm=true.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the domain. |
confirm | query | string | An API key must say yes to this change: confirm=true here, or confirm: true in the JSON body. Without it the call answers 422 and changes nothing. One of: true. |
Responses
| Status | Body | Description |
|---|---|---|
202 | Job | Accepted. The body is the Job object. Follow GET /jobs/{id}/events or poll GET /jobs/{id}. |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
202 response fields
| Name | Type | Description |
|---|---|---|
id required | string (uuid) | UUIDv7 |
type required | string | A node job type or an edge job type. One of: provision_environment, delete_environment, set_php_version, set_php_performance, set_php_settings, restart_php, clear_server_cache, search_replace, run_wp_cli, rotate_credentials, apply_nginx_settings, db_import, cron_sync, build_release, activate_release, create_repository, create_node, drain_node, delete_node, purchase_cud, files_write, files_delete, files_rename, phpmyadmin_session, db_check, db_rows_write, db_sql_execute, ssh_update, sftp_account_change, tool_setting, wp_user_create, set_code_mode, env_var_set, env_var_delete, reset_site, set_webroot, set_wp_secrets_key, wp_admin_login_token, wp_login_user_ensure, wp_login_users_remove, repo_commit_read, create_preview_environment, clone_content, merge_branch, create_snapshot, restore_snapshot, set_apm, push_content, commit_branch, sync_working_tree, issue_certificate, register_hostname, unregister_hostname, object_cache_set, patchstack_credentials_write, patchstack_credentials_remove, patchstack_kill_switch, set_disk_quota, prepare_standby, start_replication, verify_replica, fence_site, resync_replica, set_site_suspension, clear_log, promote_environment, copy_into_live, auto_update_run, delete_snapshot, prune_snapshots, backup_download, configure_git_remote, import_git_push, pull_external_git, offsite_backup_test, offsite_backup_run, offsite_backup_list, offsite_backup_restore, restart_service, container_exec, set_network_domain, map_subsite_domain, reap_orphan_containers, migrate_container, migrate_control, migrate_export, migrate_import, migrate_precopy, migrate_delta, migrate_freeze, migrate_thaw, update_mu_plugin, import_site_files, wake_environment, set_sleep_policy, integrity_check, malware_scan, malware_restore, container_images, rebuild_container, update_runtime_image, node_reboot_status, schedule_node_reboot, reboot_node, core_update_commit, core_update_advance, core_update_run, takedown_environment, release_takedown, set_egress, set_standby_hold, copy_evidence, drop_evidence, transfer_site, relabel_environment, record_site_facts, attach_domain, remove_domain, set_primary_domain, apply_redirects, apply_ip_rules, apply_bot_protection, purge_cache, apply_edge_settings, provision_dns_zone, refresh_ssl, set_edge_certificate, remove_edge_certificate, rename_site, rename_temp_hostname, network_sync, migration_fetch, migration_inspect, migration_triage, migration_import, migration_move, export_company_data, export_user_data, export_audit_log, purge_company, reseal_secrets, run_pagespeed, patchstack_provision, patchstack_deprovision, patchstack_reconcile, wp_login_member_users_remove, provision_standby, failover_site, failback_site, accessibility_scan. |
status required | string | One of: queued, dispatched, running, succeeded, failed, cancelled. |
environment_id required | string or null (uuid) | UUIDv7 |
site_id required | string or null (uuid) | UUIDv7 |
node_id required | string or null (uuid) | UUIDv7 |
group_id required | string or null (uuid) | UUIDv7 |
progress required | integer | Range: 0 to 100. |
attempts required | integer | Range: 0 to any. |
error required | object or null | |
error.code required | string | |
error.message required | string | |
error.retryable required | boolean | Default: false. |
result required | object or null | |
description | string or null | What the job does, in one plain sentence, such as "Turn on the server cron on site Elric (staging)". It names the action and the place and never holds a secret, a value, or site content: a WP-CLI command shows its command words and the names that are safe to show, and a placeholder such as "(value hidden)" for the rest. Null on old servers. |
site_name | string or null | The name of the site the job belongs to, when it has one. |
environment_name | string or null | The name of the environment the job runs on, such as live or staging. |
quiet | boolean | True for background work and reads, such as a cron sync or a login link lookup. A customer screen leaves a quiet job out of its bell, its lists, and its toasts. Quiet jobs are still stored, audited, and retried. Absent on old servers, where nothing is quiet. |
parent_job_id | string or null (uuid) | The job this one works for: the job that ran it as a step, or that queued it as a follow-up. That job reads as done only once its follow-ups ended: it stays running until then, and its log names any follow-up that failed. Null for a job nobody started on another's behalf. Absent on old servers. |
requested_by required | object | |
requested_by.type required | string | One of: user, api_key, mcp_agent, system. |
requested_by.id required | string or null | |
requested_by.label required | string or null | |
requested_by.client_name | string or null | MCP client name and version from the handshake, for mcp_agent requests. |
Get the custom SSL certificate of a domain
get/domains/{id}/custom-certificatePermalink to Get the custom SSL certificate of a domain
- Scope:
sites:read - Permission:
sites.read
Metadata only: subject, issuer, names, not_before, not_after, fingerprint, installed_at, and the layer that carries the certificate. The private key is never returned. 404 when the domain has none.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the domain. |
Responses
| Status | Body | Description |
|---|---|---|
200 | CustomCertificate | Certificate |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
domain_id required | string (uuid) | UUIDv7 |
environment_id required | string (uuid) | UUIDv7 |
hostname required | string | |
status required | string | One of: installing, installed, failed. |
layer required | string | The layer that carries the certificate once it is installed. One of: origin, edge_and_origin. |
visitors_see required | string | What visitors receive: Cloudflare's own certificate, or this one. One of: cloudflare, customer. |
layer_note required | string | One plain sentence that says which layer carries the certificate and what visitors see. |
subject required | string | |
issuer required | string | |
sans required | array of string | |
serial required | string | |
not_before required | string (date-time) | |
not_after required | string (date-time) | |
fingerprint_sha256 required | string | |
installed_at required | string or null (date-time) | |
job_id required | string or null (uuid) | The install job, while it runs or after it failed. |
failure_reason required | string or null | |
created_at required | string (date-time) |
Install your own SSL certificate on a domain
put/domains/{id}/custom-certificatePermalink to Install your own SSL certificate on a domain
- Scope:
sites:write - Permission:
domains.manage
Needs the Custom SSL add-on on the site (402 custom_ssl_required without it). Send the certificate with its intermediates and the unencrypted private key, both PEM. The API checks that the certificate parses, covers the hostname, is not expired, has more than 7 days left, chains to a publicly trusted root, and that the key matches and is not encrypted (422 with a code such as certificate_key_mismatch, certificate_expired, certificate_name_mismatch, certificate_not_trusted, key_encrypted). The key is sealed, never returned, and never stored in a job, event, or audit entry. The install is a job. Automatic renewal stops for the name, so renew before not_after: WP Waterfall warns 30, 14, and 7 days before. The domain must be active. Visitors see Cloudflare's own certificate on the Free plan: read layer and visitors_see on the answer.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the domain. |
Idempotency-Key | header | string | Optional on PUT and PATCH. When the call starts a job, a retry with the same key, path, and body within 24 hours returns that job instead of starting another. A different path or body starts a new job. |
Request body application/json, required, InstallCustomCertificateRequest
Fields
| Name | Type | Description |
|---|---|---|
certificate_pem required | string | The certificate, then its intermediates, as PEM. |
private_key_pem required | string | The private key as unencrypted PEM. Write-only. |
Responses
| Status | Body | Description |
|---|---|---|
202 | Job | Accepted. The body is the Job object. Follow GET /jobs/{id}/events or poll GET /jobs/{id}. |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
202 response fields
| Name | Type | Description |
|---|---|---|
id required | string (uuid) | UUIDv7 |
type required | string | A node job type or an edge job type. One of: provision_environment, delete_environment, set_php_version, set_php_performance, set_php_settings, restart_php, clear_server_cache, search_replace, run_wp_cli, rotate_credentials, apply_nginx_settings, db_import, cron_sync, build_release, activate_release, create_repository, create_node, drain_node, delete_node, purchase_cud, files_write, files_delete, files_rename, phpmyadmin_session, db_check, db_rows_write, db_sql_execute, ssh_update, sftp_account_change, tool_setting, wp_user_create, set_code_mode, env_var_set, env_var_delete, reset_site, set_webroot, set_wp_secrets_key, wp_admin_login_token, wp_login_user_ensure, wp_login_users_remove, repo_commit_read, create_preview_environment, clone_content, merge_branch, create_snapshot, restore_snapshot, set_apm, push_content, commit_branch, sync_working_tree, issue_certificate, register_hostname, unregister_hostname, object_cache_set, patchstack_credentials_write, patchstack_credentials_remove, patchstack_kill_switch, set_disk_quota, prepare_standby, start_replication, verify_replica, fence_site, resync_replica, set_site_suspension, clear_log, promote_environment, copy_into_live, auto_update_run, delete_snapshot, prune_snapshots, backup_download, configure_git_remote, import_git_push, pull_external_git, offsite_backup_test, offsite_backup_run, offsite_backup_list, offsite_backup_restore, restart_service, container_exec, set_network_domain, map_subsite_domain, reap_orphan_containers, migrate_container, migrate_control, migrate_export, migrate_import, migrate_precopy, migrate_delta, migrate_freeze, migrate_thaw, update_mu_plugin, import_site_files, wake_environment, set_sleep_policy, integrity_check, malware_scan, malware_restore, container_images, rebuild_container, update_runtime_image, node_reboot_status, schedule_node_reboot, reboot_node, core_update_commit, core_update_advance, core_update_run, takedown_environment, release_takedown, set_egress, set_standby_hold, copy_evidence, drop_evidence, transfer_site, relabel_environment, record_site_facts, attach_domain, remove_domain, set_primary_domain, apply_redirects, apply_ip_rules, apply_bot_protection, purge_cache, apply_edge_settings, provision_dns_zone, refresh_ssl, set_edge_certificate, remove_edge_certificate, rename_site, rename_temp_hostname, network_sync, migration_fetch, migration_inspect, migration_triage, migration_import, migration_move, export_company_data, export_user_data, export_audit_log, purge_company, reseal_secrets, run_pagespeed, patchstack_provision, patchstack_deprovision, patchstack_reconcile, wp_login_member_users_remove, provision_standby, failover_site, failback_site, accessibility_scan. |
status required | string | One of: queued, dispatched, running, succeeded, failed, cancelled. |
environment_id required | string or null (uuid) | UUIDv7 |
site_id required | string or null (uuid) | UUIDv7 |
node_id required | string or null (uuid) | UUIDv7 |
group_id required | string or null (uuid) | UUIDv7 |
progress required | integer | Range: 0 to 100. |
attempts required | integer | Range: 0 to any. |
error required | object or null | |
error.code required | string | |
error.message required | string | |
error.retryable required | boolean | Default: false. |
result required | object or null | |
description | string or null | What the job does, in one plain sentence, such as "Turn on the server cron on site Elric (staging)". It names the action and the place and never holds a secret, a value, or site content: a WP-CLI command shows its command words and the names that are safe to show, and a placeholder such as "(value hidden)" for the rest. Null on old servers. |
site_name | string or null | The name of the site the job belongs to, when it has one. |
environment_name | string or null | The name of the environment the job runs on, such as live or staging. |
quiet | boolean | True for background work and reads, such as a cron sync or a login link lookup. A customer screen leaves a quiet job out of its bell, its lists, and its toasts. Quiet jobs are still stored, audited, and retried. Absent on old servers, where nothing is quiet. |
parent_job_id | string or null (uuid) | The job this one works for: the job that ran it as a step, or that queued it as a follow-up. That job reads as done only once its follow-ups ended: it stays running until then, and its log names any follow-up that failed. Null for a job nobody started on another's behalf. Absent on old servers. |
requested_by required | object | |
requested_by.type required | string | One of: user, api_key, mcp_agent, system. |
requested_by.id required | string or null | |
requested_by.label required | string or null | |
requested_by.client_name | string or null | MCP client name and version from the handshake, for mcp_agent requests. |
Remove the custom SSL certificate
delete/domains/{id}/custom-certificatePermalink to Remove the custom SSL certificate
- Scope:
sites:write - Permission:
domains.manage - Needs a confirmation
Deletes the stored certificate and key and returns the domain to the automatic certificate: the job orders the server certificate again. Needs confirm=true. Answers 204 with no job when the domain is not connected, because there is no server certificate to replace yet.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the domain. |
confirm | query | string | An API key must say yes to this change: confirm=true here, or confirm: true in the JSON body. Without it the call answers 422 and changes nothing. One of: true. |
Responses
| Status | Body | Description |
|---|---|---|
202 | Job | Accepted. The body is the Job object. Follow GET /jobs/{id}/events or poll GET /jobs/{id}. |
204 | Removed. The domain is not connected, so no job was needed. | |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
202 response fields
| Name | Type | Description |
|---|---|---|
id required | string (uuid) | UUIDv7 |
type required | string | A node job type or an edge job type. One of: provision_environment, delete_environment, set_php_version, set_php_performance, set_php_settings, restart_php, clear_server_cache, search_replace, run_wp_cli, rotate_credentials, apply_nginx_settings, db_import, cron_sync, build_release, activate_release, create_repository, create_node, drain_node, delete_node, purchase_cud, files_write, files_delete, files_rename, phpmyadmin_session, db_check, db_rows_write, db_sql_execute, ssh_update, sftp_account_change, tool_setting, wp_user_create, set_code_mode, env_var_set, env_var_delete, reset_site, set_webroot, set_wp_secrets_key, wp_admin_login_token, wp_login_user_ensure, wp_login_users_remove, repo_commit_read, create_preview_environment, clone_content, merge_branch, create_snapshot, restore_snapshot, set_apm, push_content, commit_branch, sync_working_tree, issue_certificate, register_hostname, unregister_hostname, object_cache_set, patchstack_credentials_write, patchstack_credentials_remove, patchstack_kill_switch, set_disk_quota, prepare_standby, start_replication, verify_replica, fence_site, resync_replica, set_site_suspension, clear_log, promote_environment, copy_into_live, auto_update_run, delete_snapshot, prune_snapshots, backup_download, configure_git_remote, import_git_push, pull_external_git, offsite_backup_test, offsite_backup_run, offsite_backup_list, offsite_backup_restore, restart_service, container_exec, set_network_domain, map_subsite_domain, reap_orphan_containers, migrate_container, migrate_control, migrate_export, migrate_import, migrate_precopy, migrate_delta, migrate_freeze, migrate_thaw, update_mu_plugin, import_site_files, wake_environment, set_sleep_policy, integrity_check, malware_scan, malware_restore, container_images, rebuild_container, update_runtime_image, node_reboot_status, schedule_node_reboot, reboot_node, core_update_commit, core_update_advance, core_update_run, takedown_environment, release_takedown, set_egress, set_standby_hold, copy_evidence, drop_evidence, transfer_site, relabel_environment, record_site_facts, attach_domain, remove_domain, set_primary_domain, apply_redirects, apply_ip_rules, apply_bot_protection, purge_cache, apply_edge_settings, provision_dns_zone, refresh_ssl, set_edge_certificate, remove_edge_certificate, rename_site, rename_temp_hostname, network_sync, migration_fetch, migration_inspect, migration_triage, migration_import, migration_move, export_company_data, export_user_data, export_audit_log, purge_company, reseal_secrets, run_pagespeed, patchstack_provision, patchstack_deprovision, patchstack_reconcile, wp_login_member_users_remove, provision_standby, failover_site, failback_site, accessibility_scan. |
status required | string | One of: queued, dispatched, running, succeeded, failed, cancelled. |
environment_id required | string or null (uuid) | UUIDv7 |
site_id required | string or null (uuid) | UUIDv7 |
node_id required | string or null (uuid) | UUIDv7 |
group_id required | string or null (uuid) | UUIDv7 |
progress required | integer | Range: 0 to 100. |
attempts required | integer | Range: 0 to any. |
error required | object or null | |
error.code required | string | |
error.message required | string | |
error.retryable required | boolean | Default: false. |
result required | object or null | |
description | string or null | What the job does, in one plain sentence, such as "Turn on the server cron on site Elric (staging)". It names the action and the place and never holds a secret, a value, or site content: a WP-CLI command shows its command words and the names that are safe to show, and a placeholder such as "(value hidden)" for the rest. Null on old servers. |
site_name | string or null | The name of the site the job belongs to, when it has one. |
environment_name | string or null | The name of the environment the job runs on, such as live or staging. |
quiet | boolean | True for background work and reads, such as a cron sync or a login link lookup. A customer screen leaves a quiet job out of its bell, its lists, and its toasts. Quiet jobs are still stored, audited, and retried. Absent on old servers, where nothing is quiet. |
parent_job_id | string or null (uuid) | The job this one works for: the job that ran it as a step, or that queued it as a follow-up. That job reads as done only once its follow-ups ended: it stays running until then, and its log names any follow-up that failed. Null for a job nobody started on another's behalf. Absent on old servers. |
requested_by required | object | |
requested_by.type required | string | One of: user, api_key, mcp_agent, system. |
requested_by.id required | string or null | |
requested_by.label required | string or null | |
requested_by.client_name | string or null | MCP client name and version from the handshake, for mcp_agent requests. |
Make a domain primary
post/domains/{id}/primaryPermalink to Make a domain primary
- Scope:
sites:write - Permission:
domains.manage - Needs a confirmation
Rewrites home and siteurl, adds a 301 from the old primary, and purges both caches.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the domain. |
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
confirm | query | string | An API key must say yes to this change: confirm=true here, or confirm: true in the JSON body. Without it the call answers 422 and changes nothing. One of: true. |
Request body application/json, required, MakePrimaryRequest
Fields
| Name | Type | Description |
|---|---|---|
redirect_old_primary | boolean | Add a 301 from the old primary hostname to the new one. Default: true. |
Responses
| Status | Body | Description |
|---|---|---|
202 | Job | Accepted. The body is the Job object. Follow GET /jobs/{id}/events or poll GET /jobs/{id}. |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
202 response fields
| Name | Type | Description |
|---|---|---|
id required | string (uuid) | UUIDv7 |
type required | string | A node job type or an edge job type. One of: provision_environment, delete_environment, set_php_version, set_php_performance, set_php_settings, restart_php, clear_server_cache, search_replace, run_wp_cli, rotate_credentials, apply_nginx_settings, db_import, cron_sync, build_release, activate_release, create_repository, create_node, drain_node, delete_node, purchase_cud, files_write, files_delete, files_rename, phpmyadmin_session, db_check, db_rows_write, db_sql_execute, ssh_update, sftp_account_change, tool_setting, wp_user_create, set_code_mode, env_var_set, env_var_delete, reset_site, set_webroot, set_wp_secrets_key, wp_admin_login_token, wp_login_user_ensure, wp_login_users_remove, repo_commit_read, create_preview_environment, clone_content, merge_branch, create_snapshot, restore_snapshot, set_apm, push_content, commit_branch, sync_working_tree, issue_certificate, register_hostname, unregister_hostname, object_cache_set, patchstack_credentials_write, patchstack_credentials_remove, patchstack_kill_switch, set_disk_quota, prepare_standby, start_replication, verify_replica, fence_site, resync_replica, set_site_suspension, clear_log, promote_environment, copy_into_live, auto_update_run, delete_snapshot, prune_snapshots, backup_download, configure_git_remote, import_git_push, pull_external_git, offsite_backup_test, offsite_backup_run, offsite_backup_list, offsite_backup_restore, restart_service, container_exec, set_network_domain, map_subsite_domain, reap_orphan_containers, migrate_container, migrate_control, migrate_export, migrate_import, migrate_precopy, migrate_delta, migrate_freeze, migrate_thaw, update_mu_plugin, import_site_files, wake_environment, set_sleep_policy, integrity_check, malware_scan, malware_restore, container_images, rebuild_container, update_runtime_image, node_reboot_status, schedule_node_reboot, reboot_node, core_update_commit, core_update_advance, core_update_run, takedown_environment, release_takedown, set_egress, set_standby_hold, copy_evidence, drop_evidence, transfer_site, relabel_environment, record_site_facts, attach_domain, remove_domain, set_primary_domain, apply_redirects, apply_ip_rules, apply_bot_protection, purge_cache, apply_edge_settings, provision_dns_zone, refresh_ssl, set_edge_certificate, remove_edge_certificate, rename_site, rename_temp_hostname, network_sync, migration_fetch, migration_inspect, migration_triage, migration_import, migration_move, export_company_data, export_user_data, export_audit_log, purge_company, reseal_secrets, run_pagespeed, patchstack_provision, patchstack_deprovision, patchstack_reconcile, wp_login_member_users_remove, provision_standby, failover_site, failback_site, accessibility_scan. |
status required | string | One of: queued, dispatched, running, succeeded, failed, cancelled. |
environment_id required | string or null (uuid) | UUIDv7 |
site_id required | string or null (uuid) | UUIDv7 |
node_id required | string or null (uuid) | UUIDv7 |
group_id required | string or null (uuid) | UUIDv7 |
progress required | integer | Range: 0 to 100. |
attempts required | integer | Range: 0 to any. |
error required | object or null | |
error.code required | string | |
error.message required | string | |
error.retryable required | boolean | Default: false. |
result required | object or null | |
description | string or null | What the job does, in one plain sentence, such as "Turn on the server cron on site Elric (staging)". It names the action and the place and never holds a secret, a value, or site content: a WP-CLI command shows its command words and the names that are safe to show, and a placeholder such as "(value hidden)" for the rest. Null on old servers. |
site_name | string or null | The name of the site the job belongs to, when it has one. |
environment_name | string or null | The name of the environment the job runs on, such as live or staging. |
quiet | boolean | True for background work and reads, such as a cron sync or a login link lookup. A customer screen leaves a quiet job out of its bell, its lists, and its toasts. Quiet jobs are still stored, audited, and retried. Absent on old servers, where nothing is quiet. |
parent_job_id | string or null (uuid) | The job this one works for: the job that ran it as a step, or that queued it as a follow-up. That job reads as done only once its follow-ups ended: it stays running until then, and its log names any follow-up that failed. Null for a job nobody started on another's behalf. Absent on old servers. |
requested_by required | object | |
requested_by.type required | string | One of: user, api_key, mcp_agent, system. |
requested_by.id required | string or null | |
requested_by.label required | string or null | |
requested_by.client_name | string or null | MCP client name and version from the handshake, for mcp_agent requests. |
The records to set for a domain
get/domains/{id}/verification-recordsPermalink to The records to set for a domain
- Scope:
domains:read - Permission:
sites.read
The A and AAAA records that connect the domain (one row for each address in dns_addresses, the same set for every domain), plus the ownership TXT, the certificate records, and the last check. A domain that still has an older CNAME that reaches WP Waterfall keeps working, and notes says to replace it with the A and AAAA records.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the domain. |
Responses
| Status | Body | Description |
|---|---|---|
200 | VerificationRecords | Records |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
domain_id required | string (uuid) | UUIDv7 |
hostname required | string | |
status required | string | One of: requested, txt_pending, cname_pending, validating, securing, active, failed, removed. |
cname_target required | string or null | Always null. The routing target is the CNAME row in records. Kept so older clients still parse. |
dns_addresses required | object | The fixed addresses the A and AAAA rows point at. The same set as dns_addresses on the environment. Empty until staff set it. |
dns_addresses.a required | array of string (ipv4) | |
dns_addresses.aaaa required | array of string (ipv6) | |
dns_provider required | string | Where the domain's DNS lives, which decides the routing record. One of: wpwaterfall, cloudflare, other. Default: other. |
routing_mode required | string | a_records or cname: the form of the routing rows in records. One of: a_records, cname. Default: cname. |
records required | array of object | Never two records at one name when one of them is a CNAME: DNS forbids it. |
records[].purpose required | string | proof: the TXT record that proves the company controls the name. ownership is Cloudflare's own hostname check, which only exists after the proof passed. One of: proof, ownership, certificate, routing, delegation. |
records[].type required | string | The routing records are A and AAAA rows, one per address of dns_addresses (only when routing_mode is a_records), or one CNAME row to the fallback origin. The other CNAME rows and the TXT rows are the certificate and ownership records of ADR 030. One of: TXT, CNAME, A, AAAA. |
records[].name required | string | |
records[].expected required | string | |
records[].found required | array or null | Set after a check. The exact values the resolver found. |
records[].ok required | boolean or null | |
records[].required required | boolean | False for a record that only speeds things up, such as the ownership TXT with HTTP validation. |
records[].note required | string or null | One plain sentence for this record, such as how to set a CNAME at the apex. |
routing required | string | How the name reaches WP Waterfall after the last check. ok: through the records of the routing mode. legacy_cname: through a CNAME that works but is not the form the routing mode asks for (replace it with the A and AAAA records). wrong: records that point elsewhere. missing: nothing at the name. unchecked: no check yet, or a prepare-first domain before the move. One of: ok, legacy_cname, wrong, missing, unchecked. Default: unchecked. |
notes required | array of string | Plain advice that is not a problem, one sentence each: a CNAME that works but should be replaced by the records above, or missing AAAA records. Empty when there is nothing to say. |
dcv_method required | string | One of: http, txt, none. |
origin_certificate required | string | One of: pending, installed, not_applicable. |
checked_at required | string or null (date-time) | |
problems required | array of string | One plain sentence per problem, naming the exact wrong record. Empty when all is well. |
Check DNS now
post/domains/{id}/verifyPermalink to Check DNS now
- Scope:
sites:write - Permission:
domains.manage
Queries the resolver and names the exact wrong record. Changes nothing.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the domain. |
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Request body application/json, required, DomainCheckRequest
Responses
| Status | Body | Description |
|---|---|---|
200 | VerificationRecords | Check result |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
domain_id required | string (uuid) | UUIDv7 |
hostname required | string | |
status required | string | One of: requested, txt_pending, cname_pending, validating, securing, active, failed, removed. |
cname_target required | string or null | Always null. The routing target is the CNAME row in records. Kept so older clients still parse. |
dns_addresses required | object | The fixed addresses the A and AAAA rows point at. The same set as dns_addresses on the environment. Empty until staff set it. |
dns_addresses.a required | array of string (ipv4) | |
dns_addresses.aaaa required | array of string (ipv6) | |
dns_provider required | string | Where the domain's DNS lives, which decides the routing record. One of: wpwaterfall, cloudflare, other. Default: other. |
routing_mode required | string | a_records or cname: the form of the routing rows in records. One of: a_records, cname. Default: cname. |
records required | array of object | Never two records at one name when one of them is a CNAME: DNS forbids it. |
records[].purpose required | string | proof: the TXT record that proves the company controls the name. ownership is Cloudflare's own hostname check, which only exists after the proof passed. One of: proof, ownership, certificate, routing, delegation. |
records[].type required | string | The routing records are A and AAAA rows, one per address of dns_addresses (only when routing_mode is a_records), or one CNAME row to the fallback origin. The other CNAME rows and the TXT rows are the certificate and ownership records of ADR 030. One of: TXT, CNAME, A, AAAA. |
records[].name required | string | |
records[].expected required | string | |
records[].found required | array or null | Set after a check. The exact values the resolver found. |
records[].ok required | boolean or null | |
records[].required required | boolean | False for a record that only speeds things up, such as the ownership TXT with HTTP validation. |
records[].note required | string or null | One plain sentence for this record, such as how to set a CNAME at the apex. |
routing required | string | How the name reaches WP Waterfall after the last check. ok: through the records of the routing mode. legacy_cname: through a CNAME that works but is not the form the routing mode asks for (replace it with the A and AAAA records). wrong: records that point elsewhere. missing: nothing at the name. unchecked: no check yet, or a prepare-first domain before the move. One of: ok, legacy_cname, wrong, missing, unchecked. Default: unchecked. |
notes required | array of string | Plain advice that is not a problem, one sentence each: a CNAME that works but should be replaced by the records above, or missing AAAA records. Empty when there is nothing to say. |
dcv_method required | string | One of: http, txt, none. |
origin_certificate required | string | One of: pending, installed, not_applicable. |
checked_at required | string or null (date-time) | |
problems required | array of string | One plain sentence per problem, naming the exact wrong record. Empty when all is well. |
List the custom SSL certificates of an environment
get/environments/{id}/custom-certificatesPermalink to List the custom SSL certificates of an environment
- Scope:
sites:read - Permission:
sites.read
Metadata only (subject, issuer, names, dates, fingerprint, status, and the layer that carries each certificate). The private key is never returned. edge_layer_available says whether the platform can also put a certificate on Cloudflare's edge.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the environment. |
limit | query | integer | How many rows to return in one page: at most 200, and 200 when left out. Default: 200. Range: 1 to 200. |
cursor | query | string | The next_cursor of the page before. Leave it out for the first page. |
Responses
| Status | Body | Description |
|---|---|---|
200 | CustomCertificateList | Certificates |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
data required | array of CustomCertificate | The rows of this page. |
data[].domain_id required | string (uuid) | UUIDv7 |
data[].environment_id required | string (uuid) | UUIDv7 |
data[].hostname required | string | |
data[].status required | string | One of: installing, installed, failed. |
data[].layer required | string | The layer that carries the certificate once it is installed. One of: origin, edge_and_origin. |
data[].visitors_see required | string | What visitors receive: Cloudflare's own certificate, or this one. One of: cloudflare, customer. |
data[].layer_note required | string | One plain sentence that says which layer carries the certificate and what visitors see. |
data[].subject required | string | |
data[].issuer required | string | |
data[].sans required | array of string | |
data[].serial required | string | |
data[].not_before required | string (date-time) | |
data[].not_after required | string (date-time) | |
data[].fingerprint_sha256 required | string | |
data[].installed_at required | string or null (date-time) | |
data[].job_id required | string or null (uuid) | The install job, while it runs or after it failed. |
data[].failure_reason required | string or null | |
data[].created_at required | string (date-time) | |
next_cursor required | string or null | Send it as cursor to get the next page. Null on the last page. |
edge_layer_available required | boolean | True when the platform can also put the certificate on Cloudflare's edge (Enterprise only). |
List the domains of an environment
get/environments/{id}/domainsPermalink to List the domains of an environment
- Scope:
sites:read - Permission:
sites.read
Lists the domains attached to one environment with their status, their SSL status, and which one is the primary, in pages of up to 200 (default 50).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the environment. |
limit | query | integer | How many rows to return in one page: 1 to 200, and 50 when left out. Default: 50. Range: 1 to 200. |
cursor | query | string | The next_cursor of the page before. Leave it out for the first page. |
Responses
| Status | Body | Description |
|---|---|---|
200 | DomainList | Domains |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
data required | array of Domain | The rows of this page. |
data[].id required | string (uuid) | UUIDv7 |
data[].environment_id required | string (uuid) | UUIDv7 |
data[].site_id required | string (uuid) | UUIDv7 |
data[].hostname required | string | |
data[].wildcard required | boolean | |
data[].status required | string | One of: requested, txt_pending, cname_pending, validating, securing, active, failed, removed. |
data[].ssl_status required | string | One of: pending, pending_validation, pending_issuance, active, failed, removed. |
data[].setup_mode required | string | One of: standard, prepare_first. |
data[].is_primary required | boolean | |
data[].force_https_mode required | string | One of: off, all_hostnames, primary_only. |
data[].zero_touch required | boolean | True when the hostname sits in a Cloudflare DNS zone of this company: attach needs no manual step. |
data[].dns_zone_id required | string or null (uuid) | UUIDv7 |
data[].cf_custom_hostname_id required | string or null | |
data[].cname_target required | string or null | Always null. Replaced by the A and AAAA records of the verification records. |
data[].ownership_txt required | object or null | |
data[].certificate_txt required | object or null | |
data[].job_id required | string or null (uuid) | The job that attaches or removes the domain, while it runs. |
data[].job_status required | string or null | One of: queued, dispatched, running, succeeded, failed, cancelled. |
data[].failure_reason required | string or null | A plain sentence when the domain failed. |
data[].expires_at required | string or null (date-time) | The 72 hour window closes here. |
data[].activated_at required | string or null (date-time) | |
data[].ownership_proof required | object | Proof that the company controls the name. Nothing is set up at Cloudflare until it passes. |
data[].parent_domain_id required | string or null (uuid) | For a name on staging or a preview: the live domain it sits under. Null on live. Removing that live domain removes this name too. |
Add a domain
post/environments/{id}/domainsPermalink to Add a domain
- Scope:
sites:write - Permission:
domains.manage
Creates the domain rows and starts the attach job. On a Cloudflare DNS zone the job writes every record itself. Elsewhere, read the records to set from GET /domains/{id}/verification-records. On staging or a preview the hostname must sit under a custom domain connected to the same site's live environment (staging.example.com), or be its wildcard (*.example.com), which the node serves without a Cloudflare custom hostname. Refusals: 409 live_not_launched, live_domain_required, hostname_taken, staging_domain_limit (10 per site), primary_live_only; 422 not_under_live_domain, www_live_only.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the environment. |
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Request body application/json, required, CreateDomainRequest
Fields
| Name | Type | Description |
|---|---|---|
hostname required | string | |
include_www | boolean | Also add the twin of hostname: www. for a bare name, the bare name for a www. one. Left out, it is true for a bare name such as example.com and for www.example.com on live, and false for any other subdomain, a wildcard, a Multisite subsite host, and staging. Send false to add one name only. The name you type stays the one you chose as primary. |
wildcard | boolean | A wildcard covers every name under the domain. Only a caller who can manage DNS for the whole company may add one (WILDCARD_NEEDS_DNS_CODE). Default: false. |
setup_mode | string | One of: standard, prepare_first. Default: standard. |
make_primary | boolean | Switch the primary domain to this hostname as soon as it is active. Live only. Default: false. |
subsite_id | integer | Map this host to one subsite of a WordPress Multisite network, by blog id (2 or more). Once the host is active, WordPress serves that subsite on it. Refused unless the environment is a network that has the subsite. Not with wildcard, include_www, or make_primary. Range: 2 to any. |
Responses
| Status | Body | Description |
|---|---|---|
202 | Job | Accepted. The body is the Job object. Follow GET /jobs/{id}/events or poll GET /jobs/{id}. |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
202 response fields
| Name | Type | Description |
|---|---|---|
id required | string (uuid) | UUIDv7 |
type required | string | A node job type or an edge job type. One of: provision_environment, delete_environment, set_php_version, set_php_performance, set_php_settings, restart_php, clear_server_cache, search_replace, run_wp_cli, rotate_credentials, apply_nginx_settings, db_import, cron_sync, build_release, activate_release, create_repository, create_node, drain_node, delete_node, purchase_cud, files_write, files_delete, files_rename, phpmyadmin_session, db_check, db_rows_write, db_sql_execute, ssh_update, sftp_account_change, tool_setting, wp_user_create, set_code_mode, env_var_set, env_var_delete, reset_site, set_webroot, set_wp_secrets_key, wp_admin_login_token, wp_login_user_ensure, wp_login_users_remove, repo_commit_read, create_preview_environment, clone_content, merge_branch, create_snapshot, restore_snapshot, set_apm, push_content, commit_branch, sync_working_tree, issue_certificate, register_hostname, unregister_hostname, object_cache_set, patchstack_credentials_write, patchstack_credentials_remove, patchstack_kill_switch, set_disk_quota, prepare_standby, start_replication, verify_replica, fence_site, resync_replica, set_site_suspension, clear_log, promote_environment, copy_into_live, auto_update_run, delete_snapshot, prune_snapshots, backup_download, configure_git_remote, import_git_push, pull_external_git, offsite_backup_test, offsite_backup_run, offsite_backup_list, offsite_backup_restore, restart_service, container_exec, set_network_domain, map_subsite_domain, reap_orphan_containers, migrate_container, migrate_control, migrate_export, migrate_import, migrate_precopy, migrate_delta, migrate_freeze, migrate_thaw, update_mu_plugin, import_site_files, wake_environment, set_sleep_policy, integrity_check, malware_scan, malware_restore, container_images, rebuild_container, update_runtime_image, node_reboot_status, schedule_node_reboot, reboot_node, core_update_commit, core_update_advance, core_update_run, takedown_environment, release_takedown, set_egress, set_standby_hold, copy_evidence, drop_evidence, transfer_site, relabel_environment, record_site_facts, attach_domain, remove_domain, set_primary_domain, apply_redirects, apply_ip_rules, apply_bot_protection, purge_cache, apply_edge_settings, provision_dns_zone, refresh_ssl, set_edge_certificate, remove_edge_certificate, rename_site, rename_temp_hostname, network_sync, migration_fetch, migration_inspect, migration_triage, migration_import, migration_move, export_company_data, export_user_data, export_audit_log, purge_company, reseal_secrets, run_pagespeed, patchstack_provision, patchstack_deprovision, patchstack_reconcile, wp_login_member_users_remove, provision_standby, failover_site, failback_site, accessibility_scan. |
status required | string | One of: queued, dispatched, running, succeeded, failed, cancelled. |
environment_id required | string or null (uuid) | UUIDv7 |
site_id required | string or null (uuid) | UUIDv7 |
node_id required | string or null (uuid) | UUIDv7 |
group_id required | string or null (uuid) | UUIDv7 |
progress required | integer | Range: 0 to 100. |
attempts required | integer | Range: 0 to any. |
error required | object or null | |
error.code required | string | |
error.message required | string | |
error.retryable required | boolean | Default: false. |
result required | object or null | |
description | string or null | What the job does, in one plain sentence, such as "Turn on the server cron on site Elric (staging)". It names the action and the place and never holds a secret, a value, or site content: a WP-CLI command shows its command words and the names that are safe to show, and a placeholder such as "(value hidden)" for the rest. Null on old servers. |
site_name | string or null | The name of the site the job belongs to, when it has one. |
environment_name | string or null | The name of the environment the job runs on, such as live or staging. |
quiet | boolean | True for background work and reads, such as a cron sync or a login link lookup. A customer screen leaves a quiet job out of its bell, its lists, and its toasts. Quiet jobs are still stored, audited, and retried. Absent on old servers, where nothing is quiet. |
parent_job_id | string or null (uuid) | The job this one works for: the job that ran it as a step, or that queued it as a follow-up. That job reads as done only once its follow-ups ended: it stays running until then, and its log names any follow-up that failed. Null for a job nobody started on another's behalf. Absent on old servers. |
requested_by required | object | |
requested_by.type required | string | One of: user, api_key, mcp_agent, system. |
requested_by.id required | string or null | |
requested_by.label required | string or null | |
requested_by.client_name | string or null | MCP client name and version from the handshake, for mcp_agent requests. |
Remove several domains
delete/environments/{id}/domainsPermalink to Remove several domains
- Scope:
sites:write - Permission:
domains.manage - Needs a confirmation
One removal job per domain in one group. Needs confirm=true.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the environment. |
domain_ids required | query | string | |
confirm | query | string | An API key must say yes to this change: confirm=true here, or confirm: true in the JSON body. Without it the call answers 422 and changes nothing. One of: true. |
Responses
| Status | Body | Description |
|---|---|---|
202 | JobGroup | Accepted. The body is the Job object. Follow GET /jobs/{id}/events or poll GET /jobs/{id}. |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
202 response fields
| Name | Type | Description |
|---|---|---|
id required | string (uuid) | UUIDv7 |
action required | string | |
status required | string | One of: running, succeeded, partial, failed, cancelled. |
total required | integer | Range: 0 to any. |
succeeded required | integer | Range: 0 to any. |
failed required | integer | Range: 0 to any. |
progress required | integer | Range: 0 to 100. |
requested_by required | object | |
requested_by.type required | string | One of: user, api_key, mcp_agent, system. |
requested_by.id required | string or null | |
requested_by.label required | string or null | |
requested_by.client_name | string or null | MCP client name and version from the handshake, for mcp_agent requests. |
requested_by.client_version | string or null | |
jobs required | array of object | |
jobs[].job_id required | string (uuid) | UUIDv7 |
jobs[].environment_id required | string or null (uuid) | UUIDv7 |
jobs[].site_id required | string or null (uuid) | UUIDv7 |
jobs[].site_name required | string or null | |
jobs[].status required | string | One of: queued, dispatched, running, succeeded, failed, cancelled. |
jobs[].error required | object or null | |
created_at required | string (date-time) | |
finished_at required | string or null (date-time) |
Refresh SSL for a domain or the temporary domain
post/environments/{id}/ssl/refreshPermalink to Refresh SSL for a domain or the temporary domain
- Scope:
sites:write - Permission:
domains.manage
WP Waterfall already runs this repair by itself every 10 minutes for any domain whose SSL is not healthy, so calling it is never required. It only starts that same repair now. It never removes or replaces a DNS record that WP Waterfall did not write. Checks the certificate of one name again. For a custom domain (send its domain_id) the job reads the custom hostname from Cloudflare, writes any validation records a Cloudflare DNS zone is missing, and orders the server certificate again when it is missing or near its end. For the temporary domain (send domain_id null) the job installs its certificate on the server again. Needs the same permission as editing domains. A second request while a refresh of the same name is still running answers with that job and queues nothing. Refusals: 404 for a domain of another environment, 409 domain_not_active for a domain that is not connected yet, 409 no_temp_hostname or environment_not_live for the temporary domain.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the environment. |
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Request body application/json, required, RefreshSslRequest
Fields
| Name | Type | Description |
|---|---|---|
domain_id | string or null (uuid) | UUIDv7 |
Responses
| Status | Body | Description |
|---|---|---|
202 | Job | Accepted. The body is the Job object. Follow GET /jobs/{id}/events or poll GET /jobs/{id}. |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
202 response fields
| Name | Type | Description |
|---|---|---|
id required | string (uuid) | UUIDv7 |
type required | string | A node job type or an edge job type. One of: provision_environment, delete_environment, set_php_version, set_php_performance, set_php_settings, restart_php, clear_server_cache, search_replace, run_wp_cli, rotate_credentials, apply_nginx_settings, db_import, cron_sync, build_release, activate_release, create_repository, create_node, drain_node, delete_node, purchase_cud, files_write, files_delete, files_rename, phpmyadmin_session, db_check, db_rows_write, db_sql_execute, ssh_update, sftp_account_change, tool_setting, wp_user_create, set_code_mode, env_var_set, env_var_delete, reset_site, set_webroot, set_wp_secrets_key, wp_admin_login_token, wp_login_user_ensure, wp_login_users_remove, repo_commit_read, create_preview_environment, clone_content, merge_branch, create_snapshot, restore_snapshot, set_apm, push_content, commit_branch, sync_working_tree, issue_certificate, register_hostname, unregister_hostname, object_cache_set, patchstack_credentials_write, patchstack_credentials_remove, patchstack_kill_switch, set_disk_quota, prepare_standby, start_replication, verify_replica, fence_site, resync_replica, set_site_suspension, clear_log, promote_environment, copy_into_live, auto_update_run, delete_snapshot, prune_snapshots, backup_download, configure_git_remote, import_git_push, pull_external_git, offsite_backup_test, offsite_backup_run, offsite_backup_list, offsite_backup_restore, restart_service, container_exec, set_network_domain, map_subsite_domain, reap_orphan_containers, migrate_container, migrate_control, migrate_export, migrate_import, migrate_precopy, migrate_delta, migrate_freeze, migrate_thaw, update_mu_plugin, import_site_files, wake_environment, set_sleep_policy, integrity_check, malware_scan, malware_restore, container_images, rebuild_container, update_runtime_image, node_reboot_status, schedule_node_reboot, reboot_node, core_update_commit, core_update_advance, core_update_run, takedown_environment, release_takedown, set_egress, set_standby_hold, copy_evidence, drop_evidence, transfer_site, relabel_environment, record_site_facts, attach_domain, remove_domain, set_primary_domain, apply_redirects, apply_ip_rules, apply_bot_protection, purge_cache, apply_edge_settings, provision_dns_zone, refresh_ssl, set_edge_certificate, remove_edge_certificate, rename_site, rename_temp_hostname, network_sync, migration_fetch, migration_inspect, migration_triage, migration_import, migration_move, export_company_data, export_user_data, export_audit_log, purge_company, reseal_secrets, run_pagespeed, patchstack_provision, patchstack_deprovision, patchstack_reconcile, wp_login_member_users_remove, provision_standby, failover_site, failback_site, accessibility_scan. |
status required | string | One of: queued, dispatched, running, succeeded, failed, cancelled. |
environment_id required | string or null (uuid) | UUIDv7 |
site_id required | string or null (uuid) | UUIDv7 |
node_id required | string or null (uuid) | UUIDv7 |
group_id required | string or null (uuid) | UUIDv7 |
progress required | integer | Range: 0 to 100. |
attempts required | integer | Range: 0 to any. |
error required | object or null | |
error.code required | string | |
error.message required | string | |
error.retryable required | boolean | Default: false. |
result required | object or null | |
description | string or null | What the job does, in one plain sentence, such as "Turn on the server cron on site Elric (staging)". It names the action and the place and never holds a secret, a value, or site content: a WP-CLI command shows its command words and the names that are safe to show, and a placeholder such as "(value hidden)" for the rest. Null on old servers. |
site_name | string or null | The name of the site the job belongs to, when it has one. |
environment_name | string or null | The name of the environment the job runs on, such as live or staging. |
quiet | boolean | True for background work and reads, such as a cron sync or a login link lookup. A customer screen leaves a quiet job out of its bell, its lists, and its toasts. Quiet jobs are still stored, audited, and retried. Absent on old servers, where nothing is quiet. |
parent_job_id | string or null (uuid) | The job this one works for: the job that ran it as a step, or that queued it as a follow-up. That job reads as done only once its follow-ups ended: it stays running until then, and its log names any follow-up that failed. Null for a job nobody started on another's behalf. Absent on old servers. |
requested_by required | object | |
requested_by.type required | string | One of: user, api_key, mcp_agent, system. |
requested_by.id required | string or null | |
requested_by.label required | string or null | |
requested_by.client_name | string or null | MCP client name and version from the handshake, for mcp_agent requests. |