Skip to content

Domains

14 operations in the WP Waterfall API.

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

NameInTypeDescription
id requiredpathstring (uuid)The id of the domain.

Responses

StatusBodyDescription
200DomainDomain
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
id requiredstring (uuid)UUIDv7
environment_id requiredstring (uuid)UUIDv7
site_id requiredstring (uuid)UUIDv7
hostname requiredstring
wildcard requiredboolean
status requiredstringOne of: requested, txt_pending, cname_pending, validating, securing, active, failed, removed.
ssl_status requiredstringOne of: pending, pending_validation, pending_issuance, active, failed, removed.
setup_mode requiredstringOne of: standard, prepare_first.
is_primary requiredboolean
force_https_mode requiredstringOne of: off, all_hostnames, primary_only.
zero_touch requiredbooleanTrue when the hostname sits in a Cloudflare DNS zone of this company: attach needs no manual step.
dns_zone_id requiredstring or null (uuid)UUIDv7
cf_custom_hostname_id requiredstring or null
cname_target requiredstring or nullAlways null. Replaced by the A and AAAA records of the verification records.
ownership_txt requiredobject or null
ownership_txt.name requiredstring
ownership_txt.value requiredstring
certificate_txt requiredobject or null
certificate_txt.name requiredstring
certificate_txt.value requiredstring
job_id requiredstring or null (uuid)The job that attaches or removes the domain, while it runs.
job_status requiredstring or nullOne of: queued, dispatched, running, succeeded, failed, cancelled.
failure_reason requiredstring or nullA plain sentence when the domain failed.
expires_at requiredstring 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the domain.
Idempotency-KeyheaderstringOptional 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

NameTypeDescription
force_https_modestringOne of: off, all_hostnames, primary_only.
setup_modestringOne of: standard, prepare_first.

Responses

StatusBodyDescription
202JobAccepted. The body is the Job object. Follow GET /jobs/{id}/events or poll GET /jobs/{id}.
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

202 response fields

NameTypeDescription
id requiredstring (uuid)UUIDv7
type requiredstringA 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 requiredstringOne of: queued, dispatched, running, succeeded, failed, cancelled.
environment_id requiredstring or null (uuid)UUIDv7
site_id requiredstring or null (uuid)UUIDv7
node_id requiredstring or null (uuid)UUIDv7
group_id requiredstring or null (uuid)UUIDv7
progress requiredintegerRange: 0 to 100.
attempts requiredintegerRange: 0 to any.
error requiredobject or null
error.code requiredstring
error.message requiredstring
error.retryable requiredbooleanDefault: false.
result requiredobject or null
descriptionstring or nullWhat 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_namestring or nullThe name of the site the job belongs to, when it has one.
environment_namestring or nullThe name of the environment the job runs on, such as live or staging.
quietbooleanTrue 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_idstring 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 requiredobject
requested_by.type requiredstringOne of: user, api_key, mcp_agent, system.
requested_by.id requiredstring or null
requested_by.label requiredstring or null
requested_by.client_namestring or nullMCP 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the domain.
confirmquerystringAn 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

StatusBodyDescription
202JobAccepted. The body is the Job object. Follow GET /jobs/{id}/events or poll GET /jobs/{id}.
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

202 response fields

NameTypeDescription
id requiredstring (uuid)UUIDv7
type requiredstringA 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 requiredstringOne of: queued, dispatched, running, succeeded, failed, cancelled.
environment_id requiredstring or null (uuid)UUIDv7
site_id requiredstring or null (uuid)UUIDv7
node_id requiredstring or null (uuid)UUIDv7
group_id requiredstring or null (uuid)UUIDv7
progress requiredintegerRange: 0 to 100.
attempts requiredintegerRange: 0 to any.
error requiredobject or null
error.code requiredstring
error.message requiredstring
error.retryable requiredbooleanDefault: false.
result requiredobject or null
descriptionstring or nullWhat 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_namestring or nullThe name of the site the job belongs to, when it has one.
environment_namestring or nullThe name of the environment the job runs on, such as live or staging.
quietbooleanTrue 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_idstring 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 requiredobject
requested_by.type requiredstringOne of: user, api_key, mcp_agent, system.
requested_by.id requiredstring or null
requested_by.label requiredstring or null
requested_by.client_namestring or nullMCP 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the domain.

Responses

StatusBodyDescription
200CustomCertificateCertificate
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
domain_id requiredstring (uuid)UUIDv7
environment_id requiredstring (uuid)UUIDv7
hostname requiredstring
status requiredstringOne of: installing, installed, failed.
layer requiredstringThe layer that carries the certificate once it is installed. One of: origin, edge_and_origin.
visitors_see requiredstringWhat visitors receive: Cloudflare's own certificate, or this one. One of: cloudflare, customer.
layer_note requiredstringOne plain sentence that says which layer carries the certificate and what visitors see.
subject requiredstring
issuer requiredstring
sans requiredarray of string
serial requiredstring
not_before requiredstring (date-time)
not_after requiredstring (date-time)
fingerprint_sha256 requiredstring
installed_at requiredstring or null (date-time)
job_id requiredstring or null (uuid)The install job, while it runs or after it failed.
failure_reason requiredstring or null
created_at requiredstring (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

NameInTypeDescription
id requiredpathstring (uuid)The id of the domain.
Idempotency-KeyheaderstringOptional 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

NameTypeDescription
certificate_pem requiredstringThe certificate, then its intermediates, as PEM.
private_key_pem requiredstringThe private key as unencrypted PEM. Write-only.

Responses

StatusBodyDescription
202JobAccepted. The body is the Job object. Follow GET /jobs/{id}/events or poll GET /jobs/{id}.
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

202 response fields

NameTypeDescription
id requiredstring (uuid)UUIDv7
type requiredstringA 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 requiredstringOne of: queued, dispatched, running, succeeded, failed, cancelled.
environment_id requiredstring or null (uuid)UUIDv7
site_id requiredstring or null (uuid)UUIDv7
node_id requiredstring or null (uuid)UUIDv7
group_id requiredstring or null (uuid)UUIDv7
progress requiredintegerRange: 0 to 100.
attempts requiredintegerRange: 0 to any.
error requiredobject or null
error.code requiredstring
error.message requiredstring
error.retryable requiredbooleanDefault: false.
result requiredobject or null
descriptionstring or nullWhat 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_namestring or nullThe name of the site the job belongs to, when it has one.
environment_namestring or nullThe name of the environment the job runs on, such as live or staging.
quietbooleanTrue 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_idstring 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 requiredobject
requested_by.type requiredstringOne of: user, api_key, mcp_agent, system.
requested_by.id requiredstring or null
requested_by.label requiredstring or null
requested_by.client_namestring or nullMCP 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the domain.
confirmquerystringAn 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

StatusBodyDescription
202JobAccepted. The body is the Job object. Follow GET /jobs/{id}/events or poll GET /jobs/{id}.
204Removed. The domain is not connected, so no job was needed.
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

202 response fields

NameTypeDescription
id requiredstring (uuid)UUIDv7
type requiredstringA 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 requiredstringOne of: queued, dispatched, running, succeeded, failed, cancelled.
environment_id requiredstring or null (uuid)UUIDv7
site_id requiredstring or null (uuid)UUIDv7
node_id requiredstring or null (uuid)UUIDv7
group_id requiredstring or null (uuid)UUIDv7
progress requiredintegerRange: 0 to 100.
attempts requiredintegerRange: 0 to any.
error requiredobject or null
error.code requiredstring
error.message requiredstring
error.retryable requiredbooleanDefault: false.
result requiredobject or null
descriptionstring or nullWhat 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_namestring or nullThe name of the site the job belongs to, when it has one.
environment_namestring or nullThe name of the environment the job runs on, such as live or staging.
quietbooleanTrue 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_idstring 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 requiredobject
requested_by.type requiredstringOne of: user, api_key, mcp_agent, system.
requested_by.id requiredstring or null
requested_by.label requiredstring or null
requested_by.client_namestring or nullMCP 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the domain.
Idempotency-Key requiredheaderstringSend 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.
confirmquerystringAn 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

NameTypeDescription
redirect_old_primarybooleanAdd a 301 from the old primary hostname to the new one. Default: true.

Responses

StatusBodyDescription
202JobAccepted. The body is the Job object. Follow GET /jobs/{id}/events or poll GET /jobs/{id}.
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

202 response fields

NameTypeDescription
id requiredstring (uuid)UUIDv7
type requiredstringA 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 requiredstringOne of: queued, dispatched, running, succeeded, failed, cancelled.
environment_id requiredstring or null (uuid)UUIDv7
site_id requiredstring or null (uuid)UUIDv7
node_id requiredstring or null (uuid)UUIDv7
group_id requiredstring or null (uuid)UUIDv7
progress requiredintegerRange: 0 to 100.
attempts requiredintegerRange: 0 to any.
error requiredobject or null
error.code requiredstring
error.message requiredstring
error.retryable requiredbooleanDefault: false.
result requiredobject or null
descriptionstring or nullWhat 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_namestring or nullThe name of the site the job belongs to, when it has one.
environment_namestring or nullThe name of the environment the job runs on, such as live or staging.
quietbooleanTrue 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_idstring 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 requiredobject
requested_by.type requiredstringOne of: user, api_key, mcp_agent, system.
requested_by.id requiredstring or null
requested_by.label requiredstring or null
requested_by.client_namestring or nullMCP 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the domain.

Responses

StatusBodyDescription
200VerificationRecordsRecords
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
domain_id requiredstring (uuid)UUIDv7
hostname requiredstring
status requiredstringOne of: requested, txt_pending, cname_pending, validating, securing, active, failed, removed.
cname_target requiredstring or nullAlways null. The routing target is the CNAME row in records. Kept so older clients still parse.
dns_addresses requiredobjectThe 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 requiredarray of string (ipv4)
dns_addresses.aaaa requiredarray of string (ipv6)
dns_provider requiredstringWhere the domain's DNS lives, which decides the routing record. One of: wpwaterfall, cloudflare, other. Default: other.
routing_mode requiredstringa_records or cname: the form of the routing rows in records. One of: a_records, cname. Default: cname.
records requiredarray of objectNever two records at one name when one of them is a CNAME: DNS forbids it.
records[].purpose requiredstringproof: 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 requiredstringThe 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 requiredstring
records[].expected requiredstring
records[].found requiredarray or nullSet after a check. The exact values the resolver found.
records[].ok requiredboolean or null
records[].required requiredbooleanFalse for a record that only speeds things up, such as the ownership TXT with HTTP validation.
records[].note requiredstring or nullOne plain sentence for this record, such as how to set a CNAME at the apex.
routing requiredstringHow 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 requiredarray of stringPlain 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 requiredstringOne of: http, txt, none.
origin_certificate requiredstringOne of: pending, installed, not_applicable.
checked_at requiredstring or null (date-time)
problems requiredarray of stringOne 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the domain.
Idempotency-Key requiredheaderstringSend 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

StatusBodyDescription
200VerificationRecordsCheck result
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
domain_id requiredstring (uuid)UUIDv7
hostname requiredstring
status requiredstringOne of: requested, txt_pending, cname_pending, validating, securing, active, failed, removed.
cname_target requiredstring or nullAlways null. The routing target is the CNAME row in records. Kept so older clients still parse.
dns_addresses requiredobjectThe 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 requiredarray of string (ipv4)
dns_addresses.aaaa requiredarray of string (ipv6)
dns_provider requiredstringWhere the domain's DNS lives, which decides the routing record. One of: wpwaterfall, cloudflare, other. Default: other.
routing_mode requiredstringa_records or cname: the form of the routing rows in records. One of: a_records, cname. Default: cname.
records requiredarray of objectNever two records at one name when one of them is a CNAME: DNS forbids it.
records[].purpose requiredstringproof: 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 requiredstringThe 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 requiredstring
records[].expected requiredstring
records[].found requiredarray or nullSet after a check. The exact values the resolver found.
records[].ok requiredboolean or null
records[].required requiredbooleanFalse for a record that only speeds things up, such as the ownership TXT with HTTP validation.
records[].note requiredstring or nullOne plain sentence for this record, such as how to set a CNAME at the apex.
routing requiredstringHow 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 requiredarray of stringPlain 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 requiredstringOne of: http, txt, none.
origin_certificate requiredstringOne of: pending, installed, not_applicable.
checked_at requiredstring or null (date-time)
problems requiredarray of stringOne 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the environment.
limitqueryintegerHow many rows to return in one page: at most 200, and 200 when left out. Default: 200. Range: 1 to 200.
cursorquerystringThe next_cursor of the page before. Leave it out for the first page.

Responses

StatusBodyDescription
200CustomCertificateListCertificates
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
data requiredarray of CustomCertificateThe rows of this page.
data[].domain_id requiredstring (uuid)UUIDv7
data[].environment_id requiredstring (uuid)UUIDv7
data[].hostname requiredstring
data[].status requiredstringOne of: installing, installed, failed.
data[].layer requiredstringThe layer that carries the certificate once it is installed. One of: origin, edge_and_origin.
data[].visitors_see requiredstringWhat visitors receive: Cloudflare's own certificate, or this one. One of: cloudflare, customer.
data[].layer_note requiredstringOne plain sentence that says which layer carries the certificate and what visitors see.
data[].subject requiredstring
data[].issuer requiredstring
data[].sans requiredarray of string
data[].serial requiredstring
data[].not_before requiredstring (date-time)
data[].not_after requiredstring (date-time)
data[].fingerprint_sha256 requiredstring
data[].installed_at requiredstring or null (date-time)
data[].job_id requiredstring or null (uuid)The install job, while it runs or after it failed.
data[].failure_reason requiredstring or null
data[].created_at requiredstring (date-time)
next_cursor requiredstring or nullSend it as cursor to get the next page. Null on the last page.
edge_layer_available requiredbooleanTrue 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the environment.
limitqueryintegerHow many rows to return in one page: 1 to 200, and 50 when left out. Default: 50. Range: 1 to 200.
cursorquerystringThe next_cursor of the page before. Leave it out for the first page.

Responses

StatusBodyDescription
200DomainListDomains
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
data requiredarray of DomainThe rows of this page.
data[].id requiredstring (uuid)UUIDv7
data[].environment_id requiredstring (uuid)UUIDv7
data[].site_id requiredstring (uuid)UUIDv7
data[].hostname requiredstring
data[].wildcard requiredboolean
data[].status requiredstringOne of: requested, txt_pending, cname_pending, validating, securing, active, failed, removed.
data[].ssl_status requiredstringOne of: pending, pending_validation, pending_issuance, active, failed, removed.
data[].setup_mode requiredstringOne of: standard, prepare_first.
data[].is_primary requiredboolean
data[].force_https_mode requiredstringOne of: off, all_hostnames, primary_only.
data[].zero_touch requiredbooleanTrue when the hostname sits in a Cloudflare DNS zone of this company: attach needs no manual step.
data[].dns_zone_id requiredstring or null (uuid)UUIDv7
data[].cf_custom_hostname_id requiredstring or null
data[].cname_target requiredstring or nullAlways null. Replaced by the A and AAAA records of the verification records.
data[].ownership_txt requiredobject or null
data[].certificate_txt requiredobject or null
data[].job_id requiredstring or null (uuid)The job that attaches or removes the domain, while it runs.
data[].job_status requiredstring or nullOne of: queued, dispatched, running, succeeded, failed, cancelled.
data[].failure_reason requiredstring or nullA plain sentence when the domain failed.
data[].expires_at requiredstring or null (date-time)The 72 hour window closes here.
data[].activated_at requiredstring or null (date-time)
data[].ownership_proof requiredobjectProof that the company controls the name. Nothing is set up at Cloudflare until it passes.
data[].parent_domain_id requiredstring 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the environment.
Idempotency-Key requiredheaderstringSend 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

NameTypeDescription
hostname requiredstring
include_wwwbooleanAlso 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.
wildcardbooleanA 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_modestringOne of: standard, prepare_first. Default: standard.
make_primarybooleanSwitch the primary domain to this hostname as soon as it is active. Live only. Default: false.
subsite_idintegerMap 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

StatusBodyDescription
202JobAccepted. The body is the Job object. Follow GET /jobs/{id}/events or poll GET /jobs/{id}.
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

202 response fields

NameTypeDescription
id requiredstring (uuid)UUIDv7
type requiredstringA 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 requiredstringOne of: queued, dispatched, running, succeeded, failed, cancelled.
environment_id requiredstring or null (uuid)UUIDv7
site_id requiredstring or null (uuid)UUIDv7
node_id requiredstring or null (uuid)UUIDv7
group_id requiredstring or null (uuid)UUIDv7
progress requiredintegerRange: 0 to 100.
attempts requiredintegerRange: 0 to any.
error requiredobject or null
error.code requiredstring
error.message requiredstring
error.retryable requiredbooleanDefault: false.
result requiredobject or null
descriptionstring or nullWhat 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_namestring or nullThe name of the site the job belongs to, when it has one.
environment_namestring or nullThe name of the environment the job runs on, such as live or staging.
quietbooleanTrue 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_idstring 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 requiredobject
requested_by.type requiredstringOne of: user, api_key, mcp_agent, system.
requested_by.id requiredstring or null
requested_by.label requiredstring or null
requested_by.client_namestring or nullMCP 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the environment.
domain_ids requiredquerystring
confirmquerystringAn 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

StatusBodyDescription
202JobGroupAccepted. The body is the Job object. Follow GET /jobs/{id}/events or poll GET /jobs/{id}.
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

202 response fields

NameTypeDescription
id requiredstring (uuid)UUIDv7
action requiredstring
status requiredstringOne of: running, succeeded, partial, failed, cancelled.
total requiredintegerRange: 0 to any.
succeeded requiredintegerRange: 0 to any.
failed requiredintegerRange: 0 to any.
progress requiredintegerRange: 0 to 100.
requested_by requiredobject
requested_by.type requiredstringOne of: user, api_key, mcp_agent, system.
requested_by.id requiredstring or null
requested_by.label requiredstring or null
requested_by.client_namestring or nullMCP client name and version from the handshake, for mcp_agent requests.
requested_by.client_versionstring or null
jobs requiredarray of object
jobs[].job_id requiredstring (uuid)UUIDv7
jobs[].environment_id requiredstring or null (uuid)UUIDv7
jobs[].site_id requiredstring or null (uuid)UUIDv7
jobs[].site_name requiredstring or null
jobs[].status requiredstringOne of: queued, dispatched, running, succeeded, failed, cancelled.
jobs[].error requiredobject or null
created_at requiredstring (date-time)
finished_at requiredstring 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the environment.
Idempotency-Key requiredheaderstringSend 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

NameTypeDescription
domain_idstring or null (uuid)UUIDv7

Responses

StatusBodyDescription
202JobAccepted. The body is the Job object. Follow GET /jobs/{id}/events or poll GET /jobs/{id}.
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

202 response fields

NameTypeDescription
id requiredstring (uuid)UUIDv7
type requiredstringA 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 requiredstringOne of: queued, dispatched, running, succeeded, failed, cancelled.
environment_id requiredstring or null (uuid)UUIDv7
site_id requiredstring or null (uuid)UUIDv7
node_id requiredstring or null (uuid)UUIDv7
group_id requiredstring or null (uuid)UUIDv7
progress requiredintegerRange: 0 to 100.
attempts requiredintegerRange: 0 to any.
error requiredobject or null
error.code requiredstring
error.message requiredstring
error.retryable requiredbooleanDefault: false.
result requiredobject or null
descriptionstring or nullWhat 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_namestring or nullThe name of the site the job belongs to, when it has one.
environment_namestring or nullThe name of the environment the job runs on, such as live or staging.
quietbooleanTrue 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_idstring 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 requiredobject
requested_by.type requiredstringOne of: user, api_key, mcp_agent, system.
requested_by.id requiredstring or null
requested_by.label requiredstring or null
requested_by.client_namestring or nullMCP client name and version from the handshake, for mcp_agent requests.