For Workers & Pages, what is the name of the domain?
n/a
What is the error number?
12002
What is the error message?
Invalid request body
What is the issue or error you’re encountering
POSTing data to https://api.cloudflare.com/client/v4/accounts/[MYACCOUNTID]/builds/triggers doesn’t work; POSTing data to https://dash.cloudflare.com/api/v4/accounts/[MYACCOUNTID]/builds/triggers works fine
What steps have you taken to resolve the issue?
There are no steps to take. I have copied the same POST data from both requests to confirm they are byte-identical. This is a problem on the CF side. There is also no documentation on these endpoints yet, so I cannot confirm whether things have changed on the backend that have not been communicated.
What are the steps to reproduce the issue?
Run the following command:
curl ‘https://api.cloudflare.com/client/v4/accounts/[MYACCOUNTID]/builds/triggers’ --compressed -X POST -H ‘User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:137.0) Gecko/20100101 Firefox/137.0’ -H ‘Accept: /’ -H ‘content-type: application/json’ -H ‘Authorization: Bearer [API TOKEN]’ --data-raw ‘{“external_script_id”:“[SCRIPT_ID]”,“trigger_name”:“Deploy default branch”,“build_command”:“”,“deploy_command”:“npx wrangler deploy”,“root_directory”:“/”,“branch_includes”:[“main”],“branch_excludes”:,“build_token_uuid”:“[TOKEN_UUID]”,“build_caching_enabled”:false,“path_includes”:[“*”],“path_excludes”:,“repo_connection_uuid”:“[CONNECTION_UUID]”}’