Cloudflare User API

Provides the ability to manage all of the users across a Cloudflare account.

OpenAPI Specification

cloudflare-user--openapi-original.yml Raw ↑
openapi: 3.0.3
components:
  schemas:
    aaa_audit_logs_response_collection:
      oneOf:
        - properties:
            errors:
              type: object
              nullable: true
            messages:
              type: array
              example: []
              items: {}
            result:
              type: array
              items:
                $ref: '#/components/schemas/aaa_audit-logs'
            success:
              type: boolean
              example: true
        - $ref: '#/components/schemas/aaa_api-response-common'
    bill-subs-api_billing_history_collection:
      allOf:
        - $ref: '#/components/schemas/bill-subs-api_api-response-collection'
        - properties:
            result:
              type: array
              items:
                $ref: '#/components/schemas/bill-subs-api_billing-history'
    bill-subs-api_billing_response_single:
      allOf:
        - $ref: '#/components/schemas/bill-subs-api_api-response-single'
        - type: object
          properties:
            result:
              type: object
    legacy-jhs_rule_collection_response:
      allOf:
        - $ref: '#/components/schemas/legacy-jhs_api-response-collection'
        - properties:
            result:
              type: array
              items:
                $ref: '#/components/schemas/legacy-jhs_rule'
    legacy-jhs_rule_single_response:
      allOf:
        - $ref: '#/components/schemas/legacy-jhs_api-response-single'
        - properties:
            result:
              $ref: '#/components/schemas/legacy-jhs_rule'
    legacy-jhs_rule_single_id_response:
      allOf:
        - $ref: '#/components/schemas/legacy-jhs_api-response-single'
        - properties:
            result:
              type: object
              properties:
                id:
                  $ref: >-
                    #/components/schemas/legacy-jhs_rule_components-schemas-identifier
    iam_schemas-collection_invite_response:
      allOf:
        - $ref: '#/components/schemas/iam_api-response-collection'
        - type: object
          properties:
            result:
              type: array
              items:
                $ref: '#/components/schemas/iam_schemas-invite'
    iam_single_invite_response:
      allOf:
        - $ref: '#/components/schemas/iam_api-response-single'
        - type: object
          properties:
            result:
              type: object
    load-balancing_monitor-response-collection:
      allOf:
        - $ref: '#/components/schemas/load-balancing_api-response-collection'
        - properties:
            result:
              type: array
              items:
                $ref: '#/components/schemas/load-balancing_monitor'
    load-balancing_monitor-response-single:
      allOf:
        - $ref: '#/components/schemas/load-balancing_api-response-single'
        - properties:
            result:
              $ref: '#/components/schemas/load-balancing_monitor'
    load-balancing_id_response:
      allOf:
        - $ref: '#/components/schemas/load-balancing_api-response-single'
        - properties:
            result:
              type: object
              properties:
                id:
                  $ref: '#/components/schemas/load-balancing_identifier'
    load-balancing_preview_response:
      allOf:
        - $ref: '#/components/schemas/load-balancing_api-response-single'
        - properties:
            result:
              type: object
              properties:
                pools:
                  type: object
                  description: Monitored pool IDs mapped to their respective names.
                  example:
                    abwlnp5jbqn45ecgxd03erbgtxtqai0d: WNAM Datacenter
                    ve8h9lrcip5n5bbga9yqmdws28ay5d0l: EEU Datacenter
                preview_id:
                  $ref: '#/components/schemas/load-balancing_identifier'
    load-balancing_references_response:
      allOf:
        - $ref: '#/components/schemas/load-balancing_api-response-collection'
        - properties:
            result:
              type: array
              description: List of resources that reference a given monitor.
              example:
                - reference_type: referrer
                  resource_id: 17b5962d775c646f3f9725cbc7a53df4
                  resource_name: primary-dc-1
                  resource_type: pool
              items:
                type: object
                properties:
                  reference_type:
                    type: string
                    enum:
                      - '*'
                      - referral
                      - referrer
                  resource_id:
                    type: string
                  resource_name:
                    type: string
                  resource_type:
                    type: string
    load-balancing_schemas-response_collection:
      allOf:
        - $ref: '#/components/schemas/load-balancing_api-response-collection'
        - properties:
            result:
              type: array
              items:
                $ref: '#/components/schemas/load-balancing_pool'
    load-balancing_schemas-single_response:
      allOf:
        - $ref: '#/components/schemas/load-balancing_api-response-single'
        - properties:
            result:
              $ref: '#/components/schemas/load-balancing_pool'
    load-balancing_schemas-id_response:
      allOf:
        - $ref: '#/components/schemas/load-balancing_api-response-single'
        - properties:
            result:
              type: object
              properties:
                id:
                  $ref: '#/components/schemas/load-balancing_schemas-identifier'
    load-balancing_health_details:
      allOf:
        - $ref: '#/components/schemas/load-balancing_api-response-single'
        - properties:
            result:
              type: object
              description: >-
                A list of regions from which to run health checks. Null means
                every Cloudflare data center.
              example:
                pool_id: 17b5962d775c646f3f9725cbc7a53df4
                pop_health:
                  Amsterdam, NL:
                    healthy: true
                    origins:
                      - 2001:DB8::5:
                          failure_reason: No failures
                          healthy: true
                          response_code: 401
                          rtt: 12.1ms
    load-balancing_schemas-references_response:
      allOf:
        - $ref: '#/components/schemas/load-balancing_api-response-collection'
        - properties:
            result:
              type: array
              description: List of resources that reference a given pool.
              example:
                - reference_type: referrer
                  resource_id: 699d98642c564d2e855e9661899b7252
                  resource_name: www.example.com
                  resource_type: load_balancer
                - reference_type: referral
                  resource_id: f1aba936b94213e5b8dca0c0dbf1f9cc
                  resource_name: Login page monitor
                  resource_type: monitor
              items:
                type: object
                properties:
                  reference_type:
                    type: string
                    enum:
                      - '*'
                      - referral
                      - referrer
                  resource_id:
                    type: string
                  resource_name:
                    type: string
                  resource_type:
                    type: string
    load-balancing_preview_result_response:
      allOf:
        - $ref: '#/components/schemas/load-balancing_api-response-single'
        - properties:
            result:
              $ref: '#/components/schemas/load-balancing_preview_result'
    load-balancing_components-schemas-response_collection:
      allOf:
        - $ref: '#/components/schemas/load-balancing_api-response-collection'
        - properties:
            result:
              type: array
              items:
                $ref: '#/components/schemas/load-balancing_analytics'
    iam_collection_organization_response:
      allOf:
        - $ref: '#/components/schemas/iam_api-response-collection'
        - type: object
          properties:
            result:
              type: array
              items:
                $ref: '#/components/schemas/iam_organization'
    iam_single_organization_response:
      allOf:
        - $ref: '#/components/schemas/iam_api-response-single'
        - type: object
          properties:
            result:
              type: object
    bill-subs-api_user_subscription_response_collection:
      allOf:
        - $ref: '#/components/schemas/bill-subs-api_api-response-collection'
        - type: object
          properties:
            result:
              type: array
              items:
                $ref: '#/components/schemas/bill-subs-api_subscription'
    bill-subs-api_user_subscription_response_single:
      allOf:
        - $ref: '#/components/schemas/bill-subs-api_api-response-single'
        - type: object
          properties:
            result:
              type: object
    iam_response_collection:
      allOf:
        - $ref: '#/components/schemas/iam_api-response-collection'
        - type: object
          properties:
            result:
              type: array
              items:
                type: object
    iam_response_create:
      allOf:
        - $ref: '#/components/schemas/iam_api-response-single'
        - type: object
          properties:
            result:
              allOf:
                - type: object
                - type: object
                  properties:
                    value:
                      $ref: '#/components/schemas/iam_value'
    iam_api-response-single-id:
      allOf:
        - $ref: '#/components/schemas/iam_api-response-common'
        - properties:
            result:
              type: object
              nullable: true
              required:
                - id
              properties:
                id:
                  $ref: >-
                    #/components/schemas/iam_common_components-schemas-identifier
      type: object
    iam_response_single:
      allOf:
        - $ref: '#/components/schemas/iam_api-response-single'
        - type: object
          properties:
            result:
              type: object
    iam_response_single_value:
      allOf:
        - $ref: '#/components/schemas/iam_api-response-single'
        - type: object
          properties:
            result:
              $ref: '#/components/schemas/iam_value'
    iam_schemas-response_collection:
      allOf:
        - $ref: '#/components/schemas/iam_api-response-collection'
        - type: object
          properties:
            result:
              type: array
              example:
                - id: 7cf72faf220841aabcfdfab81c43c4f6
                  name: Billing Read
                  scopes:
                    - com.cloudflare.api.account
                - id: 9d24387c6e8544e2bc4024a03991339f
                  name: 'Load Balancing: Monitors and Pools Read'
                  scopes:
                    - com.cloudflare.api.account
                - id: d2a1802cc9a34e30852f8b33869b2f3c
                  name: 'Load Balancing: Monitors and Pools Write'
                  scopes:
                    - com.cloudflare.api.account
                - id: 8b47d2786a534c08a1f94ee8f9f599ef
                  name: Workers KV Storage Read
                  scopes:
                    - com.cloudflare.api.account
                - id: f7f0eda5697f475c90846e879bab8666
                  name: Workers KV Storage Write
                  scopes:
                    - com.cloudflare.api.account
                - id: 1a71c399035b4950a1bd1466bbe4f420
                  name: Workers Scripts Read
                  scopes:
                    - com.cloudflare.api.account
                - id: e086da7e2179491d91ee5f35b3ca210a
                  name: Workers Scripts Write
                  scopes:
                    - com.cloudflare.api.account
              items:
                type: object
    iam_response_single_segment:
      allOf:
        - $ref: '#/components/schemas/iam_api-response-single'
        - type: object
          properties:
            result:
              required:
                - id
                - status
              properties:
                expires_on:
                  $ref: '#/components/schemas/iam_expires_on'
                id:
                  $ref: '#/components/schemas/iam_components-schemas-identifier'
                not_before:
                  $ref: '#/components/schemas/iam_not_before'
                status:
                  $ref: '#/components/schemas/iam_status'
info:
  title: 'Cloudflare user/'
  description: Needs description.
  license:
    name: BSD-3-Clause
    url: https://opensource.org/licenses/BSD-3-Clause
  version: 4.0.0
paths:
  /user/audit_logs:
    get:
      tags:
        - User
      summary: Cloudflare Get user audit logs
      description: >-
        Gets a list of audit logs for a user account. Can be filtered by who
        made the change, on which zone, and the timeframe of the change.
      operationId: audit-logs-get-user-audit-logs
      parameters:
        - name: id
          in: query
          schema:
            type: string
            description: Finds a specific log by its ID.
            example: f174be97-19b1-40d6-954d-70cd5fbd52db
        - name: export
          in: query
          schema:
            type: boolean
            description: Indicates that this request is an export of logs in CSV format.
            example: true
        - name: action.type
          in: query
          schema:
            type: string
            description: Filters by the action type.
            example: add
        - name: actor.ip
          in: query
          schema:
            type: string
            description: >-
              Filters by the IP address of the request that made the change by
              specific IP address or valid CIDR Range.
            example: 17.168.228.63
        - name: actor.email
          in: query
          schema:
            type: string
            format: email
            description: Filters by the email address of the actor that made the change.
            example: [email protected]
        - name: since
          in: query
          schema:
            type: string
            format: date-time
            description: >-
              Limits the returned results to logs newer than the specified date.
              This can be a date string `2019-04-30` or an absolute timestamp
              that conforms to RFC3339.
            example: '2019-04-30T01:12:20Z'
        - name: before
          in: query
          schema:
            type: string
            format: date-time
            description: >-
              Limits the returned results to logs older than the specified date.
              This can be a date string `2019-04-30` or an absolute timestamp
              that conforms to RFC3339.
            example: '2019-04-30T01:12:20Z'
        - name: zone.name
          in: query
          schema:
            type: string
            description: Filters by the name of the zone associated to the change.
            example: example.com
        - name: direction
          in: query
          schema:
            type: string
            description: Changes the direction of the chronological sorting.
            enum:
              - desc
              - asc
            default: desc
            example: desc
        - name: per_page
          in: query
          schema:
            type: number
            description: Sets the number of results to return per page.
            default: 100
            example: 25
            minimum: 1
            maximum: 1000
        - name: page
          in: query
          schema:
            type: number
            description: Defines which page of results to return.
            default: 1
            example: 50
            minimum: 1
        - name: hide_user_logs
          in: query
          schema:
            type: boolean
            description: Indicates whether or not to hide user level audit logs.
            default: false
      responses:
        '200':
          description: Get user audit logs response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/aaa_audit_logs_response_collection'
        4XX:
          description: Get user audit logs response failure
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/aaa_audit_logs_response_collection'
                  - $ref: '#/components/schemas/aaa_api-response-common-failure'
      security:
        - api_token: []
        - api_email: []
          api_key: []
  /user/billing/history:
    get:
      tags:
        - User
      summary: Cloudflare Billing History Details
      description: Accesses your billing history object.
      operationId: user-billing-history-(-deprecated)-billing-history-details
      parameters:
        - name: page
          in: query
          schema:
            type: number
            description: Page number of paginated results.
            default: 1
            minimum: 1
        - name: per_page
          in: query
          schema:
            type: number
            description: Number of items per page.
            default: 20
            minimum: 5
            maximum: 50
        - name: order
          in: query
          schema:
            type: string
            description: Field to order billing history by.
            enum:
              - type
              - occured_at
              - action
            example: occured_at
        - name: occured_at
          in: query
          schema:
            $ref: '#/components/schemas/bill-subs-api_occurred_at'
        - name: occurred_at
          in: query
          schema:
            $ref: '#/components/schemas/bill-subs-api_occurred_at'
        - name: type
          in: query
          schema:
            type: string
            description: The billing item type.
            example: charge
            readOnly: true
            maxLength: 30
        - name: action
          in: query
          schema:
            type: string
            description: The billing item action.
            example: subscription
            readOnly: true
            maxLength: 30
      responses:
        '200':
          description: Billing History Details response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bill-subs-api_billing_history_collection'
        4XX:
          description: Billing History Details response failure
          content:
            application/json:
              schema:
                allOf:
                  - $ref: >-
                      #/components/schemas/bill-subs-api_billing_history_collection
                  - $ref: >-
                      #/components/schemas/bill-subs-api_api-response-common-failure
      deprecated: true
      security:
        - api_email: []
          api_key: []
          api_token: []
  /user/billing/profile:
    get:
      tags:
        - User
      summary: Cloudflare Billing Profile Details
      description: Accesses your billing profile object.
      operationId: user-billing-profile-(-deprecated)-billing-profile-details
      responses:
        '200':
          description: Billing Profile Details response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bill-subs-api_billing_response_single'
        4XX:
          description: Billing Profile Details response failure
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/bill-subs-api_billing_response_single'
                  - $ref: >-
                      #/components/schemas/bill-subs-api_api-response-common-failure
      deprecated: true
      security:
        - api_email: []
          api_key: []
          api_token: []
  /user/firewall/access_rules/rules:
    get:
      tags:
        - User
      summary: Cloudflare List IP Access rules
      description: >-
        Fetches IP Access rules of the user. You can filter the results using
        several optional parameters.
      operationId: ip-access-rules-for-a-user-list-ip-access-rules
      parameters:
        - name: filters
          in: query
          schema:
            $ref: '#/components/schemas/legacy-jhs_schemas-filters'
        - name: egs-pagination.json
          in: query
          schema:
            $ref: '#/components/schemas/legacy-jhs_egs-pagination'
        - name: page
          in: query
          schema:
            type: number
            description: Requested page within paginated list of results.
            example: 1
        - name: per_page
          in: query
          schema:
            type: number
            description: Maximum number of results requested.
            example: 20
        - name: order
          in: query
          schema:
            type: string
            description: The field used to sort returned rules.
            enum:
              - configuration.target
              - configuration.value
              - mode
            example: mode
        - name: direction
          in: query
          schema:
            type: string
            description: The direction used to sort returned rules.
            enum:
              - asc
              - desc
            example: desc
      responses:
        '200':
          description: List IP Access rules response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/legacy-jhs_rule_collection_response'
        4xx:
          description: List IP Access rules response failure
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/legacy-jhs_rule_collection_response'
                  - $ref: >-
                      #/components/schemas/legacy-jhs_api-response-common-failure
      security:
        - api_email: []
          api_key: []
        - api_token: []
    post:
      tags:
        - User
      summary: Cloudflare Create an IP Access rule
      description: >-
        Creates a new IP Access rule for all zones owned by the current user.


        Note: To create an IP Access rule that applies to a specific zone, refer
        to the [IP Access rules for a zone](#ip-access-rules-for-a-zone)
        endpoints.
      operationId: ip-access-rules-for-a-user-create-an-ip-access-rule
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - mode
                - configuration
              properties:
                configuration:
                  $ref: '#/components/schemas/legacy-jhs_schemas-configuration'
                mode:
                  $ref: '#/components/schemas/legacy-jhs_schemas-mode'
                notes:
                  $ref: '#/components/schemas/legacy-jhs_notes'
      responses:
        '200':
          description: Create an IP Access rule response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/legacy-jhs_rule_single_response'
        4xx:
          description: Create an IP Access rule response failure
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/legacy-jhs_rule_single_response'
                  - $ref: >-
                      #/components/schemas/legacy-jhs_api-response-common-failure
      security:
        - api_email: []
          api_key: []
        - api_token: []
  /user/firewall/access_rules/rules/{identifier}:
    delete:
      tags:
        - User
      summary: Cloudflare Delete an IP Access rule
      description: >-
        Deletes an IP Access rule at the user level.


        Note: Deleting a user-level rule will affect all zones owned by the
        user.
      operationId: ip-access-rules-for-a-user-delete-an-ip-access-rule
      parameters:
        - name: identifier
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/legacy-jhs_rule_components-schemas-identifier'
      requestBody:
        required: true
        content:
          application/json: {}
      responses:
        '200':
          description: Delete an IP Access rule response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/legacy-jhs_rule_single_id_response'
        4xx:
          description: Delete an IP Access rule response failure
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/legacy-jhs_rule_single_id_response'
                  - $ref: >-
                      #/components/schemas/legacy-jhs_api-response-common-failure
      security:
        - api_email: []
          api_key: []
        - api_token: []
    patch:
      tags:
        - User
      summary: Cloudflare Update an IP Access rule
      description: >-
        Updates an IP Access rule defined at the user level. You can only update
        the rule action (`mode` parameter) and notes.
      operationId: ip-access-rules-for-a-user-update-an-ip-access-rule
      parameters:
        - name: identifier
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/legacy-jhs_rule_components-schemas-identifier'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                mode:
                  $ref: '#/components/schemas/legacy-jhs_schemas-mode'
                notes:
                  $ref: '#/components/schemas/legacy-jhs_notes'
      responses:
        '200':
          description: Update an IP Access rule response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/legacy-jhs_rule_single_response'
        4xx:
          description: Update an IP Access rule response failure
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/legacy-jhs_rule_single_response'
                  - $ref: >-
                      #/components/schemas/legacy-jhs_api-response-common-failure
      security:
        - api_email: []
          api_key: []
        - api_token: []
  /user/invites:
    get:
      tags:
        - User
      summary: Cloudflare List Invitations
      description: Lists all invitations associated with my user.
      operationId: user'-s-invites-list-invitations
      responses:
        '200':
          description: List Invitations response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/iam_schemas-collection_invite_response'
        4XX:
          description: List Invitations response failure
          content:
            application/json:
              schema:
                allOf:
                  - $ref: >-
                      #/components/schemas/iam_schemas-collection_invite_response
                  - $ref: '#/components/schemas/iam_api-response-common-failure'
      security:
        - api_email: []
          api_key: []
  /user/invites/{invite_id}:
    get:
      tags:
        - User
      summary: Cloudflare Invitation Details
      description: Gets the details of an invitation.
      operationId: user'-s-invites-invitation-details
      parameters:
        - name: invite_id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/iam_invite_components-schemas-identifier'
      responses:
        '200':
          description: Invitation Details response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/iam_single_invite_response'
        4XX:
          description: Invitation Details response failure
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/iam_single_invite_response'
                  - $ref: '#/components/schemas/iam_api-response-common-failure'
      security:
        - api_email: []
          api_key: []
    patch:
      tags:
        - User
      summary: Cloudflare Respond to Invitation
      description: Responds to an invitation.
      operationId: user'-s-invites-respond-to-invitation
      parameters:
        - name: invite_id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/iam_invite_components-schemas-identifier'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - status
              properties:
                status:
                  description: >-
                    Status of your response to the invitation (rejected or
                    accepted).
                  enum:
                    - accepted
                    - rejected
                  example: accepted
      responses:
        '200':
          description: Respond to Invitation response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/iam_single_invite_response'
        4XX:
          description: Respond to Invitation response failure
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/iam_single_invite_response'
                  - $ref: '#/components/schemas/iam_api-response-common-failure'
      security:
        - api_email: []
          api_key: []
  /user/load_balancers/monitors:
    get:
      tags:
        - User
      summary: Cloudflare List Monitors
      description: List configured monitors for a user.
      operationId: load-balancer-monitors-list-monitors
      responses:
        '200':
          description: List Monitors response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/load-balancing_monitor-response-collection
        4XX:
          description: List Monitors response failure
          content:
            application/json:
              schema:
                allOf:
                  - $ref: >-
                      #/components/schemas/load-balancing_monitor-response-collection
                  - $ref: >-
                      #/components/schemas/load-balancing_api-response-common-failure
      security:
        - api_email: []
          api_key: []
          api_token: []
    post:
      tags:
        - User
      summary: Cloudflare Create Monitor
      description: Create a configured monitor.
      operationId: load-balancer-monitors-create-monitor
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/load-balancing_monitor-editable'
                - required:
                    - expected_codes
      responses:
        '200':
          description: Create Monitor response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/load-balancing_monitor-response-single'
        4XX:
          description: Create Monitor response failure
          content:
            application/json:
              schema:
                allOf:
                  - $ref: >-
                      #/components/schemas/load-balancing_monitor-response-single
                  - $ref: >-
                      #/components/schemas/load-balancing_api-response-common-failure
      security:
        - api_email: []
          api_key: []
          api_token: []
  /user/load_balancers/monitors/{monitor_id}:
    delete:
      tags:
        - User
      summary: Cloudflare Delete Monitor
      description: Delete a c

# --- truncated at 32 KB (75 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/cloudflare/refs/heads/main/openapi/cloudflare-user--openapi-original.yml