Cloudflare Projects API

Manage Pages projects including creation, configuration, and deletion.

Documentation

📖
Documentation
https://developers.cloudflare.com/api/
📖
GettingStarted
https://developers.cloudflare.com/fundamentals/api/get-started/
📖
Authentication
https://developers.cloudflare.com/fundamentals/api/get-started/create-token/
📖
RateLimits
https://developers.cloudflare.com/fundamentals/api/reference/limits/
📖
Documentation
https://developers.cloudflare.com/api/operations/accounts-list-accounts
📖
APIReference
https://developers.cloudflare.com/api/resources/accounts/
📖
APIReference
https://developers.cloudflare.com/ssl/
📖
Documentation
https://developers.cloudflare.com/api/operations/ip-access-rules-for-a-user-list-ip-access-rules
📖
Documentation
https://developers.cloudflare.com/api/operations/user'-s-account-memberships-list-memberships
📖
Documentation
https://developers.cloudflare.com/api/operations/radar-get-search-global
📖
APIReference
https://developers.cloudflare.com/radar/
📖
GettingStarted
https://developers.cloudflare.com/radar/get-started/
📖
Documentation
https://developers.cloudflare.com/api/operations/user-user-details
📖
APIReference
https://developers.cloudflare.com/api/resources/user/
📖
Documentation
https://developers.cloudflare.com/api/operations/zones-get
📖
APIReference
https://developers.cloudflare.com/api/resources/zones/
📖
Documentation
https://developers.cloudflare.com/dns/
📖
APIReference
https://developers.cloudflare.com/api/resources/dns/
📖
Documentation
https://developers.cloudflare.com/workers/
📖
APIReference
https://developers.cloudflare.com/api/resources/workers/
📖
GettingStarted
https://developers.cloudflare.com/workers/get-started/
📖
Documentation
https://developers.cloudflare.com/workers-ai/
📖
GettingStarted
https://developers.cloudflare.com/workers-ai/get-started/rest-api/
📖
APIReference
https://developers.cloudflare.com/workers-ai/configuration/open-ai-compatibility/
📖
APIReference
https://developers.cloudflare.com/workers-ai/models/
📖
Documentation
https://developers.cloudflare.com/ai-gateway/
📖
APIReference
https://developers.cloudflare.com/ai-gateway/usage/providers/
📖
GettingStarted
https://developers.cloudflare.com/ai-gateway/get-started/
📖
Documentation
https://developers.cloudflare.com/r2/
📖
APIReference
https://developers.cloudflare.com/r2/api/s3/api/
📖
GettingStarted
https://developers.cloudflare.com/r2/get-started/
📖
Documentation
https://developers.cloudflare.com/d1/
📖
APIReference
https://developers.cloudflare.com/api/resources/d1/
📖
GettingStarted
https://developers.cloudflare.com/d1/get-started/
📖
Documentation
https://developers.cloudflare.com/kv/
📖
APIReference
https://developers.cloudflare.com/api/resources/kv/
📖
GettingStarted
https://developers.cloudflare.com/kv/get-started/
📖
Documentation
https://developers.cloudflare.com/queues/
📖
APIReference
https://developers.cloudflare.com/api/resources/queues/
📖
GettingStarted
https://developers.cloudflare.com/queues/get-started/
📖
Documentation
https://developers.cloudflare.com/durable-objects/
📖
GettingStarted
https://developers.cloudflare.com/durable-objects/get-started/
📖
APIReference
https://developers.cloudflare.com/durable-objects/api/
📖
Documentation
https://developers.cloudflare.com/vectorize/
📖
GettingStarted
https://developers.cloudflare.com/vectorize/get-started/intro/
📖
APIReference
https://developers.cloudflare.com/vectorize/reference/client-api/
📖
Documentation
https://developers.cloudflare.com/pages/
📖
APIReference
https://developers.cloudflare.com/pages/configuration/api/
📖
GettingStarted
https://developers.cloudflare.com/pages/get-started/
📖
Documentation
https://developers.cloudflare.com/stream/
📖
GettingStarted
https://developers.cloudflare.com/stream/get-started/
📖
APIReference
https://developers.cloudflare.com/api/resources/stream/
📖
Documentation
https://developers.cloudflare.com/images/
📖
GettingStarted
https://developers.cloudflare.com/images/get-started/
📖
APIReference
https://developers.cloudflare.com/api/resources/images/
📖
Documentation
https://developers.cloudflare.com/turnstile/
📖
GettingStarted
https://developers.cloudflare.com/turnstile/get-started/
📖
APIReference
https://developers.cloudflare.com/api/resources/turnstile/
📖
Documentation
https://developers.cloudflare.com/logs/
📖
APIReference
https://developers.cloudflare.com/api/resources/logpush/
📖
GettingStarted
https://developers.cloudflare.com/logs/get-started/
📖
Documentation
https://developers.cloudflare.com/hyperdrive/
📖
APIReference
https://developers.cloudflare.com/api/resources/hyperdrive/
📖
GettingStarted
https://developers.cloudflare.com/hyperdrive/get-started/

Specifications

Other Resources

OpenAPI Specification

cloudflare-projects-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Cloudflare / Accounts Projects API
  description: Needs description.
  license:
    name: BSD-3-Clause
    url: https://opensource.org/licenses/BSD-3-Clause
  version: 4.0.0
servers:
- url: https://api.cloudflare.com/client/v4
  description: Client API
security:
- api_email: []
  api_key: []
- api_token: []
- user_service_key: []
tags:
- name: Projects
  description: Manage Pages projects including creation, configuration, and deletion.
paths:
  /accounts/{account_id}/pages/projects:
    get:
      operationId: listPagesProjects
      summary: Cloudflare List Pages Projects
      description: Returns a list of all Pages projects for the account.
      tags:
      - Projects
      parameters:
      - $ref: '#/components/parameters/AccountId'
      responses:
        '200':
          description: List of Pages projects.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectListResponse'
              examples:
                Listpagesprojects200Example:
                  summary: Default listPagesProjects 200 response
                  x-microcks-default: true
                  value:
                    result:
                    - id: abc123
                      name: Example Title
                      subdomain: example_value
                      domains: {}
                      production_branch: example_value
                      created_on: '2026-01-15T10:30:00Z'
                      build_config: {}
                    success: true
        '401':
          description: Unauthorized.
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      operationId: createPagesProject
      summary: Cloudflare Create Pages Project
      description: Create a new Pages project with the specified build configuration and deployment settings.
      tags:
      - Projects
      parameters:
      - $ref: '#/components/parameters/AccountId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectInput'
            examples:
              CreatepagesprojectRequestExample:
                summary: Default createPagesProject request
                x-microcks-default: true
                value:
                  name: Example Title
                  production_branch: example_value
                  build_config:
                    build_command: example_value
                    destination_dir: example_value
                    root_dir: example_value
      responses:
        '200':
          description: Project created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectResponse'
              examples:
                Createpagesproject200Example:
                  summary: Default createPagesProject 200 response
                  x-microcks-default: true
                  value:
                    result:
                      id: abc123
                      name: Example Title
                      subdomain: example_value
                      domains:
                      - {}
                      production_branch: example_value
                      created_on: '2026-01-15T10:30:00Z'
                      build_config:
                        build_command: example_value
                        destination_dir: example_value
                        root_dir: example_value
                    success: true
                    errors:
                    - {}
                    messages:
                    - {}
        '400':
          description: Bad request.
        '401':
          description: Unauthorized.
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /accounts/{account_id}/pages/projects/{project_name}:
    get:
      operationId: getPagesProject
      summary: Cloudflare Get Pages Project
      description: Retrieve details of a specific Pages project.
      tags:
      - Projects
      parameters:
      - $ref: '#/components/parameters/AccountId'
      - $ref: '#/components/parameters/ProjectName'
      responses:
        '200':
          description: Project details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectResponse'
              examples:
                Getpagesproject200Example:
                  summary: Default getPagesProject 200 response
                  x-microcks-default: true
                  value:
                    result:
                      id: abc123
                      name: Example Title
                      subdomain: example_value
                      domains:
                      - {}
                      production_branch: example_value
                      created_on: '2026-01-15T10:30:00Z'
                      build_config:
                        build_command: example_value
                        destination_dir: example_value
                        root_dir: example_value
                    success: true
                    errors:
                    - {}
                    messages:
                    - {}
        '401':
          description: Unauthorized.
        '404':
          description: Project not found.
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      operationId: updatePagesProject
      summary: Cloudflare Update Pages Project
      description: Update the configuration of a Pages project.
      tags:
      - Projects
      parameters:
      - $ref: '#/components/parameters/AccountId'
      - $ref: '#/components/parameters/ProjectName'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectInput'
            examples:
              UpdatepagesprojectRequestExample:
                summary: Default updatePagesProject request
                x-microcks-default: true
                value:
                  name: Example Title
                  production_branch: example_value
                  build_config:
                    build_command: example_value
                    destination_dir: example_value
                    root_dir: example_value
      responses:
        '200':
          description: Project updated successfully.
        '401':
          description: Unauthorized.
        '404':
          description: Project not found.
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      operationId: deletePagesProject
      summary: Cloudflare Delete Pages Project
      description: Delete a Pages project and all its deployments.
      tags:
      - Projects
      parameters:
      - $ref: '#/components/parameters/AccountId'
      - $ref: '#/components/parameters/ProjectName'
      responses:
        '200':
          description: Project deleted successfully.
        '401':
          description: Unauthorized.
        '404':
          description: Project not found.
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  parameters:
    AccountId:
      name: account_id
      in: path
      required: true
      description: The unique identifier of the Cloudflare account.
      schema:
        type: string
    ProjectName:
      name: project_name
      in: path
      required: true
      description: The name of the Pages project.
      schema:
        type: string
  schemas:
    ProjectInput:
      type: object
      properties:
        name:
          type: string
          description: The name of the project.
          example: Example Title
        production_branch:
          type: string
          description: The production branch name.
          example: example_value
        build_config:
          type: object
          properties:
            build_command:
              type: string
            destination_dir:
              type: string
            root_dir:
              type: string
          example: example_value
    ProjectListResponse:
      type: object
      properties:
        result:
          type: array
          items:
            $ref: '#/components/schemas/Project'
          example: []
        success:
          type: boolean
          example: true
    Project:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the project.
          example: abc123
        name:
          type: string
          description: The name of the project.
          example: Example Title
        subdomain:
          type: string
          description: The subdomain for the project.
          example: example_value
        domains:
          type: array
          items:
            type: string
          description: Custom domains attached to the project.
          example: []
        production_branch:
          type: string
          description: The production branch name.
          example: example_value
        created_on:
          type: string
          format: date-time
          description: When the project was created.
          example: '2026-01-15T10:30:00Z'
        build_config:
          type: object
          properties:
            build_command:
              type: string
              description: The build command to run.
            destination_dir:
              type: string
              description: The output directory for build assets.
            root_dir:
              type: string
              description: The root directory of the project.
          example: example_value
    ProjectResponse:
      type: object
      properties:
        result:
          $ref: '#/components/schemas/Project'
        success:
          type: boolean
          example: true
        errors:
          type: array
          items:
            type: object
          example: []
        messages:
          type: array
          items:
            type: object
          example: []