> ## Documentation Index
> Fetch the complete documentation index at: https://docs.member.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a hub TOS or privacy policy document

> Update a hub policy (Markdown). require_acceptance=true (TOS only) re-prompts members.



## OpenAPI

````yaml /openapi/mio-openapi.json patch /api/v1/teams/{team_id}/hubs/{identifier}/policies
openapi: 3.1.0
info:
  description: >-
    Production API reference for Membership.io. Use the authored guides for
    workflows and the generated endpoint pages for exact parameters and schemas.
  title: Membership.io API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.member.dev
security:
  - bearerAuth: []
paths:
  /api/v1/teams/{team_id}/hubs/{identifier}/policies:
    patch:
      tags:
        - hubs-admin
      summary: Update a hub TOS or privacy policy document
      description: >-
        Update a hub policy (Markdown). require_acceptance=true (TOS only)
        re-prompts members.
      operationId: >-
        hubs_admin.patch_hubs_admin_patch_teams_by_team_id_hubs_by_identifier_policies
      parameters:
        - in: path
          name: team_id
          required: true
          schema:
            title: Team Id
            type: string
        - in: path
          name: identifier
          required: true
          schema:
            maxLength: 100
            minLength: 1
            title: Identifier
            type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/PolicyUpdateEnvelope'
        required: true
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/PolicyResponse'
          description: Successful Response
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    PolicyUpdateEnvelope:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/PolicyUpdateResource'
      required:
        - data
      title: PolicyUpdateEnvelope
      type: object
    PolicyResponse:
      additionalProperties: false
      description: JSON:API single-resource response for a hub policy.
      properties:
        data:
          $ref: '#/components/schemas/PolicyResource'
      required:
        - data
      title: PolicyResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    PolicyUpdateResource:
      additionalProperties: false
      properties:
        attributes:
          $ref: '#/components/schemas/PolicyUpdateAttributes'
        type:
          const: policies
          title: Type
          type: string
      required:
        - type
        - attributes
      title: PolicyUpdateResource
      type: object
    PolicyResource:
      additionalProperties: false
      description: JSON:API resource object for a hub policy.
      properties:
        attributes:
          $ref: '#/components/schemas/PolicyAttributes'
        id:
          title: Id
          type: string
        type:
          const: policies
          default: policies
          title: Type
          type: string
      required:
        - id
        - attributes
      title: PolicyResource
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    PolicyUpdateAttributes:
      additionalProperties: false
      properties:
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
        policy_type:
          enum:
            - tos
            - privacy_policy
          title: Policy Type
          type: string
        require_acceptance:
          default: false
          title: Require Acceptance
          type: boolean
      required:
        - policy_type
      title: PolicyUpdateAttributes
      type: object
    PolicyAttributes:
      additionalProperties: false
      description: |-
        Attributes for a hub policies resource object.

        ``policy_type`` is one of "tos" or "privacy_policy". ``content`` is the
        raw document text (null if not configured). ``version`` is an opaque
        version string set by the admin. ``enabled`` reflects whether the
        overall policies gate is active. ``require_acceptance`` records the
        boolean supplied on the most recent effective content/version edit -- it
        is not a standing toggle, and absent legacy state reads as null.
      properties:
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
        enabled:
          title: Enabled
          type: boolean
        policy_type:
          enum:
            - tos
            - privacy_policy
          title: Policy Type
          type: string
        require_acceptance:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            The boolean supplied on the most recent effective content/version
            edit for this policy document. Not a standing toggle: only the edit
            that actually changed content or version updates it. A policy
            document with no such edit in its history reports null, not false.
            Only "tos" can ever be true; "privacy_policy" is always false or
            null.
          title: Require Acceptance
        version:
          anyOf:
            - type: string
            - type: 'null'
          title: Version
      required:
        - policy_type
        - enabled
      title: PolicyAttributes
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT or mio_sk API key
      description: >-
        Send platform JWTs, contact JWTs, or team API keys as `Authorization:
        Bearer <token>`.
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````