Unable to Create Cloudflare Pages Project via API (Error Code: 8000000)

Description:
I'm encountering an issue when attempting to create a Cloudflare Pages project using the Cloudflare API. Despite providing all required fields in the payload and using a valid API token, the API returns the following error:
"An unknown error occurred. Contact your account team or Cloudflare support: https://cfl.re/3WgEyrH." Details:
- Account ID: 300ee1b0a1ac9d0e5d5527cc6678c5f9
- API Endpoint: POST /accounts/{account_id}/pages/projects
- Payload:
{
"name": "test-project",
"production_branch": "main",
"source": {
"type": "local"
}
}

{
"name": "test-project",
"production_branch": "main",
"source": {
"type": "local"
}
}


- Response:
{
"result": null,
"success": false,
"errors": [
{
"code": 8000000,
"message": "An unknown error occurred. Contact your account team or Cloudflare support: https://cfl.re/3WgEyrH."
}
],
"messages": []
}

{
"result": null,
"success": false,
"errors": [
{
"code": 8000000,
"message": "An unknown error occurred. Contact your account team or Cloudflare support: https://cfl.re/3WgEyrH."
}
],
"messages": []
}

Steps Taken:
1. Verified the API token is valid using the /tokens/verify endpoint (result: active).
2. Ensured the token has Cloudflare Pages: Edit and Account Settings: Read permissions.
3. Tested with minimal payloads and different project names to rule out conflicts.
4. Verified that the account has no billing or standing issues. Steps to Reproduce:
1. Use a valid API token with the required permissions.
2. Send a POST request to the Pages project creation endpoint with the payload above.
3. Observe the API response with error code 8000000. Would appreciate any insights or guidance from the community or Cloudflare team! Let me know if more details are needed.
1 Reply
Erisa
Erisa3mo ago
Where are you seeing that you should add this bit?
"source": {
"type": "local"
}
"source": {
"type": "local"
}
I don't see it on https://developers.cloudflare.com/api/resources/pages/subresources/projects/methods/create/#(params)%20default%20%3E%20(param)%20account_id%20%3E%20(schema) but maybe there are other docs that say it?
Cloudflare API | Pages › Projects › Create Project
Interact with Cloudflare's products and services via the Cloudflare API

Did you find this page helpful?