Skip to content
Start here

Workers Builds

Get latest builds by script IDs
GET/accounts/{account_id}/builds/builds/latest
Get builds by version IDs
GET/accounts/{account_id}/builds/builds
Get account limits
GET/accounts/{account_id}/builds/account/limits
ModelsExpand Collapse
WorkersBuildGetLatestBuildsResponse { builds }
builds: optional map[ { build_outcome, build_trigger_metadata, build_uuid, 8 more } ]
build_outcome: optional "success" or "fail" or "skipped" or 2 more
One of the following:
"success"
"fail"
"skipped"
"cancelled"
"terminated"
build_trigger_metadata: optional { author, branch, build_command, 11 more }
author: optional string
branch: optional string

Git branch name.

build_command: optional string
build_token_name: optional string
build_token_uuid: optional string

Build token UUID.

formatuuid
build_trigger_source: optional "push" or "pull_request" or "manual" or "api"
One of the following:
"push"
"pull_request"
"manual"
"api"
commit_hash: optional string

Git commit hash

commit_message: optional string
deploy_command: optional string
environment_variables: optional map[string]
provider_account_name: optional string
provider_type: optional "github"
repo_name: optional string
root_directory: optional string

Root directory path.

build_uuid: optional string

Build UUID.

formatuuid
created_on: optional string
formatdate-time
initializing_on: optional string
formatdate-time
modified_on: optional string
formatdate-time
pull_request: optional { created_on, pull_request_url }
created_on: optional string
formatdate-time
pull_request_url: optional string
formaturi
running_on: optional string
formatdate-time
status: optional "queued" or "initializing" or "running" or "stopped"
One of the following:
"queued"
"initializing"
"running"
"stopped"
stopped_on: optional string
formatdate-time
trigger: optional { branch_excludes, branch_includes, build_caching_enabled, 12 more }

Trigger information without build_token_uuid

branch_excludes: optional array of string
branch_includes: optional array of string
build_caching_enabled: optional boolean
build_command: optional string
created_on: optional string
formatdate-time
deleted_on: optional string
formatdate-time
deploy_command: optional string
external_script_id: optional string

External script identifier.

modified_on: optional string
formatdate-time
path_excludes: optional array of string
path_includes: optional array of string
repo_connection: optional { created_on, deleted_on, modified_on, 6 more }
created_on: optional string
formatdate-time
deleted_on: optional string
formatdate-time
modified_on: optional string
formatdate-time
provider_account_id: optional string

Provider account identifier.

provider_account_name: optional string
provider_type: optional "github"
repo_connection_uuid: optional string

Repository connection UUID.

formatuuid
repo_id: optional string

Repository identifier.

repo_name: optional string
root_directory: optional string

Root directory path.

trigger_name: optional string
trigger_uuid: optional string

Trigger UUID.

formatuuid
WorkersBuildGetBuildsByVersionResponse { builds }
builds: optional map[ { build_outcome, build_trigger_metadata, build_uuid, 8 more } ]
build_outcome: optional "success" or "fail" or "skipped" or 2 more
One of the following:
"success"
"fail"
"skipped"
"cancelled"
"terminated"
build_trigger_metadata: optional { author, branch, build_command, 11 more }
author: optional string
branch: optional string

Git branch name.

build_command: optional string
build_token_name: optional string
build_token_uuid: optional string

Build token UUID.

formatuuid
build_trigger_source: optional "push" or "pull_request" or "manual" or "api"
One of the following:
"push"
"pull_request"
"manual"
"api"
commit_hash: optional string

Git commit hash

commit_message: optional string
deploy_command: optional string
environment_variables: optional map[string]
provider_account_name: optional string
provider_type: optional "github"
repo_name: optional string
root_directory: optional string

Root directory path.

build_uuid: optional string

Build UUID.

formatuuid
created_on: optional string
formatdate-time
initializing_on: optional string
formatdate-time
modified_on: optional string
formatdate-time
pull_request: optional { created_on, pull_request_url }
created_on: optional string
formatdate-time
pull_request_url: optional string
formaturi
running_on: optional string
formatdate-time
status: optional "queued" or "initializing" or "running" or "stopped"
One of the following:
"queued"
"initializing"
"running"
"stopped"
stopped_on: optional string
formatdate-time
trigger: optional { branch_excludes, branch_includes, build_caching_enabled, 12 more }

Trigger information without build_token_uuid

branch_excludes: optional array of string
branch_includes: optional array of string
build_caching_enabled: optional boolean
build_command: optional string
created_on: optional string
formatdate-time
deleted_on: optional string
formatdate-time
deploy_command: optional string
external_script_id: optional string

External script identifier.

modified_on: optional string
formatdate-time
path_excludes: optional array of string
path_includes: optional array of string
repo_connection: optional { created_on, deleted_on, modified_on, 6 more }
created_on: optional string
formatdate-time
deleted_on: optional string
formatdate-time
modified_on: optional string
formatdate-time
provider_account_id: optional string

Provider account identifier.

provider_account_name: optional string
provider_type: optional "github"
repo_connection_uuid: optional string

Repository connection UUID.

formatuuid
repo_id: optional string

Repository identifier.

repo_name: optional string
root_directory: optional string

Root directory path.

trigger_name: optional string
trigger_uuid: optional string

Trigger UUID.

formatuuid
WorkersBuildGetAccountLimitsResponse { build_minutes_refresh_on, has_reached_build_minutes_limit }
build_minutes_refresh_on: optional string

When build minutes will refresh (only for non-paid plans)

formatdate-time
has_reached_build_minutes_limit: optional boolean

Whether build minutes limit has been reached (only for non-paid plans)

Workers BuildsTriggers

List triggers by script
GET/accounts/{account_id}/builds/workers/{external_script_id}/triggers
Create trigger
POST/accounts/{account_id}/builds/triggers
Update trigger
PATCH/accounts/{account_id}/builds/triggers/{trigger_uuid}
Delete trigger
DELETE/accounts/{account_id}/builds/triggers/{trigger_uuid}
Purge build cache
POST/accounts/{account_id}/builds/triggers/{trigger_uuid}/purge_build_cache
Create manual build
POST/accounts/{account_id}/builds/triggers/{trigger_uuid}/builds
ModelsExpand Collapse
TriggerListResponse { branch_excludes, branch_includes, build_caching_enabled, 14 more }
branch_excludes: optional array of string
branch_includes: optional array of string
build_caching_enabled: optional boolean
build_command: optional string
build_token_name: optional string
build_token_uuid: optional string

Build token UUID.

formatuuid
created_on: optional string
formatdate-time
deleted_on: optional string
formatdate-time
deploy_command: optional string
external_script_id: optional string

External script identifier.

modified_on: optional string
formatdate-time
path_excludes: optional array of string
path_includes: optional array of string
repo_connection: optional { created_on, deleted_on, modified_on, 6 more }
created_on: optional string
formatdate-time
deleted_on: optional string
formatdate-time
modified_on: optional string
formatdate-time
provider_account_id: optional string

Provider account identifier.

provider_account_name: optional string
provider_type: optional "github"
repo_connection_uuid: optional string

Repository connection UUID.

formatuuid
repo_id: optional string

Repository identifier.

repo_name: optional string
root_directory: optional string

Root directory path.

trigger_name: optional string
trigger_uuid: optional string

Trigger UUID.

formatuuid
TriggerCreateResponse { branch_excludes, branch_includes, build_caching_enabled, 14 more }
branch_excludes: optional array of string
branch_includes: optional array of string
build_caching_enabled: optional boolean
build_command: optional string
build_token_name: optional string
build_token_uuid: optional string

Build token UUID.

formatuuid
created_on: optional string
formatdate-time
deleted_on: optional string
formatdate-time
deploy_command: optional string
external_script_id: optional string

External script identifier.

modified_on: optional string
formatdate-time
path_excludes: optional array of string
path_includes: optional array of string
repo_connection: optional { created_on, deleted_on, modified_on, 6 more }
created_on: optional string
formatdate-time
deleted_on: optional string
formatdate-time
modified_on: optional string
formatdate-time
provider_account_id: optional string

Provider account identifier.

provider_account_name: optional string
provider_type: optional "github"
repo_connection_uuid: optional string

Repository connection UUID.

formatuuid
repo_id: optional string

Repository identifier.

repo_name: optional string
root_directory: optional string

Root directory path.

trigger_name: optional string
trigger_uuid: optional string

Trigger UUID.

formatuuid
TriggerUpdateResponse { branch_excludes, branch_includes, build_caching_enabled, 14 more }
branch_excludes: optional array of string
branch_includes: optional array of string
build_caching_enabled: optional boolean
build_command: optional string
build_token_name: optional string
build_token_uuid: optional string

Build token UUID.

formatuuid
created_on: optional string
formatdate-time
deleted_on: optional string
formatdate-time
deploy_command: optional string
external_script_id: optional string

External script identifier.

modified_on: optional string
formatdate-time
path_excludes: optional array of string
path_includes: optional array of string
repo_connection: optional { created_on, deleted_on, modified_on, 6 more }
created_on: optional string
formatdate-time
deleted_on: optional string
formatdate-time
modified_on: optional string
formatdate-time
provider_account_id: optional string

Provider account identifier.

provider_account_name: optional string
provider_type: optional "github"
repo_connection_uuid: optional string

Repository connection UUID.

formatuuid
repo_id: optional string

Repository identifier.

repo_name: optional string
root_directory: optional string

Root directory path.

trigger_name: optional string
trigger_uuid: optional string

Trigger UUID.

formatuuid
TriggerDeleteResponse = unknown
TriggerPurgeCacheResponse = unknown
TriggerCreateBuildResponse { build_uuid, created_on }
build_uuid: optional string

Build UUID.

formatuuid
created_on: optional string
formatdate-time

Workers BuildsTriggersEnvironment Variables

List environment variables
GET/accounts/{account_id}/builds/triggers/{trigger_uuid}/environment_variables
Upsert environment variables
PATCH/accounts/{account_id}/builds/triggers/{trigger_uuid}/environment_variables
Delete environment variable
DELETE/accounts/{account_id}/builds/triggers/{trigger_uuid}/environment_variables/{environment_variable_key}
ModelsExpand Collapse
EnvironmentVariableListResponse = map[ { created_on, is_secret, value } ]
created_on: string
formatdate-time
is_secret: boolean
value: optional string

Value is null for secret environment variables

EnvironmentVariableUpsertResponse = map[ { created_on, is_secret, value } ]
created_on: string
formatdate-time
is_secret: boolean
value: optional string

Value is null for secret environment variables

EnvironmentVariableDeleteResponse = unknown

Workers BuildsTokens

Create build token
POST/accounts/{account_id}/builds/tokens
List build tokens
GET/accounts/{account_id}/builds/tokens
Delete build token
DELETE/accounts/{account_id}/builds/tokens/{build_token_uuid}
ModelsExpand Collapse
TokenCreateResponse { build_token_name, build_token_uuid, cloudflare_token_id, owner_type }
build_token_name: optional string
build_token_uuid: optional string

Build token UUID.

formatuuid
cloudflare_token_id: optional string
owner_type: optional string
TokenListResponse { build_token_name, build_token_uuid, cloudflare_token_id, owner_type }
build_token_name: optional string
build_token_uuid: optional string

Build token UUID.

formatuuid
cloudflare_token_id: optional string
owner_type: optional string
TokenDeleteResponse = unknown

Workers BuildsRepos

Workers BuildsReposConnections

Create or update repository connection
PUT/accounts/{account_id}/builds/repos/connections
Delete repository connection
DELETE/accounts/{account_id}/builds/repos/connections/{repo_connection_uuid}
ModelsExpand Collapse
ConnectionUpsertResponse { created_on, deleted_on, modified_on, 6 more }
created_on: optional string
formatdate-time
deleted_on: optional string
formatdate-time
modified_on: optional string
formatdate-time
provider_account_id: optional string

Provider account identifier.

provider_account_name: optional string
provider_type: optional "github"
repo_connection_uuid: optional string

Repository connection UUID.

formatuuid
repo_id: optional string

Repository identifier.

repo_name: optional string
ConnectionDeleteResponse = unknown

Workers BuildsReposConfig Autofill

Get repository configuration autofill
GET/accounts/{account_id}/builds/repos/{provider_type}/{provider_account_id}/{repo_id}/config_autofill
ModelsExpand Collapse
ConfigAutofillGetResponse { config_file, default_worker_name, env_worker_names, 2 more }
config_file: optional string
default_worker_name: optional string
env_worker_names: optional map[string]
package_manager: optional "npm" or "yarn" or "pnpm" or 2 more
One of the following:
"npm"
"yarn"
"pnpm"
"bun"
"uv"
scripts: optional map[string]

Workers BuildsBuilds

List builds by script
GET/accounts/{account_id}/builds/workers/{external_script_id}/builds
Get build by UUID
GET/accounts/{account_id}/builds/builds/{build_uuid}
Cancel build
PUT/accounts/{account_id}/builds/builds/{build_uuid}/cancel
ModelsExpand Collapse
BuildListResponse { build_outcome, build_trigger_metadata, build_uuid, 8 more }
build_outcome: optional "success" or "fail" or "skipped" or 2 more
One of the following:
"success"
"fail"
"skipped"
"cancelled"
"terminated"
build_trigger_metadata: optional { author, branch, build_command, 11 more }
author: optional string
branch: optional string

Git branch name.

build_command: optional string
build_token_name: optional string
build_token_uuid: optional string

Build token UUID.

formatuuid
build_trigger_source: optional "push" or "pull_request" or "manual" or "api"
One of the following:
"push"
"pull_request"
"manual"
"api"
commit_hash: optional string

Git commit hash

commit_message: optional string
deploy_command: optional string
environment_variables: optional map[string]
provider_account_name: optional string
provider_type: optional "github"
repo_name: optional string
root_directory: optional string

Root directory path.

build_uuid: optional string

Build UUID.

formatuuid
created_on: optional string
formatdate-time
initializing_on: optional string
formatdate-time
modified_on: optional string
formatdate-time
pull_request: optional { created_on, pull_request_url }
created_on: optional string
formatdate-time
pull_request_url: optional string
formaturi
running_on: optional string
formatdate-time
status: optional "queued" or "initializing" or "running" or "stopped"
One of the following:
"queued"
"initializing"
"running"
"stopped"
stopped_on: optional string
formatdate-time
trigger: optional { branch_excludes, branch_includes, build_caching_enabled, 12 more }

Trigger information without build_token_uuid

branch_excludes: optional array of string
branch_includes: optional array of string
build_caching_enabled: optional boolean
build_command: optional string
created_on: optional string
formatdate-time
deleted_on: optional string
formatdate-time
deploy_command: optional string
external_script_id: optional string

External script identifier.

modified_on: optional string
formatdate-time
path_excludes: optional array of string
path_includes: optional array of string
repo_connection: optional { created_on, deleted_on, modified_on, 6 more }
created_on: optional string
formatdate-time
deleted_on: optional string
formatdate-time
modified_on: optional string
formatdate-time
provider_account_id: optional string

Provider account identifier.

provider_account_name: optional string
provider_type: optional "github"
repo_connection_uuid: optional string

Repository connection UUID.

formatuuid
repo_id: optional string

Repository identifier.

repo_name: optional string
root_directory: optional string

Root directory path.

trigger_name: optional string
trigger_uuid: optional string

Trigger UUID.

formatuuid
BuildGetResponse { build_outcome, build_trigger_metadata, build_uuid, 8 more }
build_outcome: optional "success" or "fail" or "skipped" or 2 more
One of the following:
"success"
"fail"
"skipped"
"cancelled"
"terminated"
build_trigger_metadata: optional { author, branch, build_command, 11 more }
author: optional string
branch: optional string

Git branch name.

build_command: optional string
build_token_name: optional string
build_token_uuid: optional string

Build token UUID.

formatuuid
build_trigger_source: optional "push" or "pull_request" or "manual" or "api"
One of the following:
"push"
"pull_request"
"manual"
"api"
commit_hash: optional string

Git commit hash

commit_message: optional string
deploy_command: optional string
environment_variables: optional map[string]
provider_account_name: optional string
provider_type: optional "github"
repo_name: optional string
root_directory: optional string

Root directory path.

build_uuid: optional string

Build UUID.

formatuuid
created_on: optional string
formatdate-time
initializing_on: optional string
formatdate-time
modified_on: optional string
formatdate-time
pull_request: optional { created_on, pull_request_url }
created_on: optional string
formatdate-time
pull_request_url: optional string
formaturi
running_on: optional string
formatdate-time
status: optional "queued" or "initializing" or "running" or "stopped"
One of the following:
"queued"
"initializing"
"running"
"stopped"
stopped_on: optional string
formatdate-time
trigger: optional { branch_excludes, branch_includes, build_caching_enabled, 12 more }

Trigger information without build_token_uuid

branch_excludes: optional array of string
branch_includes: optional array of string
build_caching_enabled: optional boolean
build_command: optional string
created_on: optional string
formatdate-time
deleted_on: optional string
formatdate-time
deploy_command: optional string
external_script_id: optional string

External script identifier.

modified_on: optional string
formatdate-time
path_excludes: optional array of string
path_includes: optional array of string
repo_connection: optional { created_on, deleted_on, modified_on, 6 more }
created_on: optional string
formatdate-time
deleted_on: optional string
formatdate-time
modified_on: optional string
formatdate-time
provider_account_id: optional string

Provider account identifier.

provider_account_name: optional string
provider_type: optional "github"
repo_connection_uuid: optional string

Repository connection UUID.

formatuuid
repo_id: optional string

Repository identifier.

repo_name: optional string
root_directory: optional string

Root directory path.

trigger_name: optional string
trigger_uuid: optional string

Trigger UUID.

formatuuid
BuildCancelResponse { build_outcome, build_uuid, stopped_on }
build_outcome: optional "success" or "fail" or "skipped" or 2 more
One of the following:
"success"
"fail"
"skipped"
"cancelled"
"terminated"
build_uuid: optional string

Build UUID.

formatuuid
stopped_on: optional string
formatdate-time

Workers BuildsBuildsLogs

Get build logs
GET/accounts/{account_id}/builds/builds/{build_uuid}/logs
ModelsExpand Collapse
LogGetResponse { cursor, lines, truncated }
cursor: optional string

Pagination cursor for log retrieval.

lines: optional array of array of number or string
One of the following:
number

Unix epoch timestamp

string

Log message

truncated: optional boolean