Cloudflare Memberships API

The Memberships API from Cloudflare — 2 operation(s) for memberships.

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-memberships-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Cloudflare / Accounts Memberships 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: Memberships
paths:
  /memberships/{membership_id}:
    delete:
      tags:
      - Memberships
      summary: Cloudflare Delete Membership
      description: Remove the associated member from an account.
      operationId: user'-s-account-memberships-delete-membership
      parameters:
      - name: membership_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/iam_membership_components-schemas-identifier'
      requestBody:
        required: true
        content:
          application/json: {}
      responses:
        '200':
          description: Delete Membership response
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/iam_api-response-single'
                - type: object
                  properties:
                    result:
                      properties:
                        id:
                          $ref: '#/components/schemas/iam_membership_components-schemas-identifier'
        4XX:
          description: Delete Membership response failure
          content:
            application/json:
              schema:
                allOf:
                - allOf:
                  - $ref: '#/components/schemas/iam_api-response-single'
                  - type: object
                    properties:
                      result:
                        properties:
                          id:
                            $ref: '#/components/schemas/iam_membership_components-schemas-identifier'
                - $ref: '#/components/schemas/iam_api-response-common-failure'
      security:
      - api_email: []
        api_key: []
    get:
      tags:
      - Memberships
      summary: Cloudflare Membership Details
      description: Get a specific membership.
      operationId: user'-s-account-memberships-membership-details
      parameters:
      - name: membership_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/iam_membership_components-schemas-identifier'
      responses:
        '200':
          description: Membership Details response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/iam_single_membership_response'
        4XX:
          description: Membership Details response failure
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/iam_single_membership_response'
                - $ref: '#/components/schemas/iam_api-response-common-failure'
      security:
      - api_email: []
        api_key: []
    put:
      tags:
      - Memberships
      summary: Cloudflare Update Membership
      description: Accept or reject this account invitation.
      operationId: user'-s-account-memberships-update-membership
      parameters:
      - name: membership_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/iam_membership_components-schemas-identifier'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
              - status
              properties:
                status:
                  description: Whether to accept or reject this account invitation.
                  enum:
                  - accepted
                  - rejected
                  example: accepted
      responses:
        '200':
          description: Update Membership response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/iam_single_membership_response'
        4XX:
          description: Update Membership response failure
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/iam_single_membership_response'
                - $ref: '#/components/schemas/iam_api-response-common-failure'
      security:
      - api_email: []
        api_key: []
  /memberships:
    get:
      tags:
      - Memberships
      summary: Cloudflare List Memberships
      description: List memberships of accounts the user can access.
      operationId: user'-s-account-memberships-list-memberships
      parameters:
      - name: account.name
        in: query
        schema:
          $ref: '#/components/schemas/iam_properties-name'
      - 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 memberships per page.
          default: 20
          minimum: 5
          maximum: 50
      - name: order
        in: query
        schema:
          type: string
          description: Field to order memberships by.
          enum:
          - id
          - account.name
          - status
          example: status
      - name: direction
        in: query
        schema:
          type: string
          description: Direction to order memberships.
          enum:
          - asc
          - desc
          example: desc
      - name: name
        in: query
        schema:
          $ref: '#/components/schemas/iam_properties-name'
      - name: status
        in: query
        schema:
          type: string
          description: Status of this membership.
          enum:
          - accepted
          - pending
          - rejected
          example: accepted
      responses:
        '200':
          description: List Memberships response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/iam_collection_membership_response'
        4XX:
          description: List Memberships response failure
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/iam_collection_membership_response'
                - $ref: '#/components/schemas/iam_api-response-common-failure'
      security:
      - api_email: []
        api_key: []
components:
  schemas:
    iam_permissions:
      type: object
      example:
        analytics:
          read: true
          write: false
        zones:
          read: true
          write: true
      properties:
        analytics:
          $ref: '#/components/schemas/iam_grants'
        billing:
          $ref: '#/components/schemas/iam_grants'
        cache_purge:
          $ref: '#/components/schemas/iam_grants'
        dns:
          $ref: '#/components/schemas/iam_grants'
        dns_records:
          $ref: '#/components/schemas/iam_grants'
        lb:
          $ref: '#/components/schemas/iam_grants'
        logs:
          $ref: '#/components/schemas/iam_grants'
        organization:
          $ref: '#/components/schemas/iam_grants'
        ssl:
          $ref: '#/components/schemas/iam_grants'
        waf:
          $ref: '#/components/schemas/iam_grants'
        zone_settings:
          $ref: '#/components/schemas/iam_grants'
        zones:
          $ref: '#/components/schemas/iam_grants'
    iam_properties-name:
      type: string
      description: Account name
      example: Demo Account
      maxLength: 100
    iam_collection_membership_response:
      allOf:
      - $ref: '#/components/schemas/iam_api-response-collection'
      - type: object
        properties:
          result:
            type: array
            items:
              $ref: '#/components/schemas/iam_membership'
    iam_api-response-collection:
      allOf:
      - $ref: '#/components/schemas/iam_api-response-common'
      - properties:
          result:
            type: array
            nullable: true
            items: {}
          result_info:
            $ref: '#/components/schemas/iam_result_info'
      type: object
    iam_account:
      type: object
      required:
      - id
      - name
      properties:
        created_on:
          type: string
          format: date-time
          description: Timestamp for the creation of the account
          example: '2014-03-01T12:21:02.0000Z'
          readOnly: true
        id:
          $ref: '#/components/schemas/iam_common_components-schemas-identifier'
        name:
          type: string
          description: Account name
          example: Demo Account
          maxLength: 100
        settings:
          type: object
          description: Account settings
          properties:
            default_nameservers:
              type: string
              description: 'Specifies the default nameservers to be used for new zones added to this account.


                - `cloudflare.standard` for Cloudflare-branded nameservers

                - `custom.account` for account custom nameservers

                - `custom.tenant` for tenant custom nameservers


                See [Custom Nameservers](https://developers.cloudflare.com/dns/additional-options/custom-nameservers/)

                for more information.'
              enum:
              - cloudflare.standard
              - custom.account
              - custom.tenant
              default: cloudflare.standard
            enforce_twofactor:
              type: boolean
              description: 'Indicates whether membership in this account requires that

                Two-Factor Authentication is enabled'
              default: false
            use_account_custom_ns_by_default:
              type: boolean
              description: 'Indicates whether new zones should use the account-level custom

                nameservers by default.


                Deprecated in favor of `default_nameservers`.'
              default: false
              deprecated: true
    iam_roles:
      type: array
      description: List of role names for the user at the account.
      readOnly: true
      items:
        type: string
        example: Account Administrator
        maxLength: 120
    iam_api-response-common-failure:
      type: object
      required:
      - success
      - errors
      - messages
      - result
      properties:
        errors:
          allOf:
          - $ref: '#/components/schemas/iam_messages'
          example:
          - code: 7003
            message: No route for the URI
          minLength: 1
        messages:
          allOf:
          - $ref: '#/components/schemas/iam_messages'
          example: []
        result:
          type: object
          enum:
          - null
          nullable: true
        success:
          type: boolean
          description: Whether the API call was successful
          enum:
          - false
          example: false
    iam_result_info:
      type: object
      properties:
        count:
          type: number
          description: Total number of results for the requested service
          example: 1
        page:
          type: number
          description: Current page within paginated list of results
          example: 1
        per_page:
          type: number
          description: Number of results per page of results
          example: 20
        total_count:
          type: number
          description: Total results available without any search parameters
          example: 2000
    iam_api-response-common:
      type: object
      required:
      - success
      - errors
      - messages
      - result
      properties:
        errors:
          $ref: '#/components/schemas/iam_messages'
        messages:
          $ref: '#/components/schemas/iam_messages'
        result:
          anyOf:
          - type: object
          - type: array
            items: {}
          - type: string
        success:
          type: boolean
          description: Whether the API call was successful
          enum:
          - true
          example: true
    iam_common_components-schemas-identifier:
      type: string
      description: Identifier
      example: 023e105f4ecef8ad9ca31a8372d0c353
      readOnly: true
      maxLength: 32
    iam_membership:
      type: object
      properties:
        account:
          $ref: '#/components/schemas/iam_schemas-account'
        api_access_enabled:
          $ref: '#/components/schemas/iam_api_access_enabled'
        code:
          $ref: '#/components/schemas/iam_code'
        id:
          $ref: '#/components/schemas/iam_membership_components-schemas-identifier'
        permissions:
          allOf:
          - $ref: '#/components/schemas/iam_permissions'
          description: All access permissions for the user at the account.
          readOnly: true
        roles:
          $ref: '#/components/schemas/iam_roles'
        status:
          $ref: '#/components/schemas/iam_schemas-status'
    iam_single_membership_response:
      allOf:
      - $ref: '#/components/schemas/iam_api-response-single'
      - type: object
        properties:
          result:
            type: object
    iam_api-response-single:
      allOf:
      - $ref: '#/components/schemas/iam_api-response-common'
      - properties:
          result:
            anyOf:
            - type: object
              nullable: true
            - type: string
              nullable: true
      type: object
    iam_membership_components-schemas-identifier:
      type: string
      description: Membership identifier tag.
      example: 4536bcfad5faccb111b47003c79917fa
      readOnly: true
      maxLength: 32
    iam_api_access_enabled:
      type: boolean
      description: Enterprise only. Indicates whether or not API access is enabled specifically for this user on a given account.
      example: true
      nullable: true
    iam_messages:
      type: array
      example: []
      items:
        type: object
        uniqueItems: true
        required:
        - code
        - message
        properties:
          code:
            type: integer
            minimum: 1000
          message:
            type: string
    iam_schemas-status:
      type: string
      description: Status of this membership.
      enum:
      - accepted
      - pending
      - rejected
      example: accepted
    iam_code:
      type: string
      description: The unique activation code for the account membership.
      example: 05dd05cce12bbed97c0d87cd78e89bc2fd41a6cee72f27f6fc84af2e45c0fac0
      readOnly: true
      maxLength: 64
    iam_grants:
      type: object
      example:
        read: true
        write: false
      properties:
        read:
          type: boolean
          example: true
        write:
          type: boolean
          example: true
    iam_schemas-account:
      allOf:
      - $ref: '#/components/schemas/iam_account'
      readOnly: true