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

# Update MaterializedSegment

> Update a rule. The segment and variants referred to by the rule must exist.



## OpenAPI

````yaml /api/flags/api/materialized-segments.openapi.json patch /v1/materializedSegments/{materializedSegment}
openapi: 3.1.0
info:
  title: Confidence Materialized-segments API
  version: 1.0.0
  description: API documentation for materialized-segments
servers: []
security: []
paths:
  /v1/materializedSegments/{materializedSegment}:
    patch:
      summary: Update MaterializedSegment
      description: >-
        Update a rule. The segment and variants referred to by the rule must
        exist.
      operationId: MaterializedSegment.update
      parameters:
        - name: materializedSegment
          in: path
          required: true
          schema:
            type: string
        - name: updateMask
          in: query
          required: false
          description: >-
            The list of fields in the Rule that you want to update e.g.
            'display_name',
             if empty all mutable properties are updated.
             Fields are specified relative to the materialization.
          schema:
            type: object
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/confidence.flags.admin.v1.UpdateMaterializedSegmentRequest
        required: true
      responses:
        '200':
          description: >-
            Returns a
            [MaterializedSegment](/api-reference/schemas/materializedsegment).
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/confidence.flags.admin.v1.MaterializedSegment
      security:
        - admin: []
      servers:
        - url: https://flags.eu.confidence.dev
        - url: https://flags.us.confidence.dev
        - url: https://flags.confidence.dev
components:
  schemas:
    confidence.flags.admin.v1.UpdateMaterializedSegmentRequest:
      title: UpdateMaterializedSegmentRequest
      type: object
      description: Update an existing materialized segment.
      properties:
        materializedSegment:
          $ref: '#/components/schemas/confidence.flags.admin.v1.MaterializedSegment'
          description: >-
            [MaterializedSegment](/api-reference/schemas/materializedsegment):
            The properties of the materialization to update.
        updateMask:
          type: object
          description: >-
            The list of fields in the Rule that you want to update e.g.
            'display_name',
             if empty all mutable properties are updated.
             Fields are specified relative to the materialization.
      required:
        - materializedSegment
    confidence.flags.admin.v1.MaterializedSegment:
      title: MaterializedSegment
      type: object
      description: >-
        A slice of the entity population that has is materialized as individual
        entity identifiers stored in a database.
         Useful for segmenting a large list of entities that cannot otherwise be easily targeted through evaluation context.
      properties:
        name:
          type: string
          description: |-
            The resource name of the materialized segment.
             For example:
             `materializedSegment/0smva5nxuhv4yts6paxt`
        displayName:
          type: string
          description: A human-friendly name for the segment.
        labels:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
          description: General labels for this resource.
        createTime:
          type: object
          description: Time when the segment was first created.
        updateTime:
          type: object
          description: Time when the segment was last updated.
        creator:
          type: string
          description: Reference to the identity that created this segment.
        updater:
          type: string
          description: Reference to the identity that last updated this segment.
        owner:
          type: string
          description: The owner of the resource. If not set will default to the creator.
      required:
        - displayName
        - createTime
        - updateTime
        - creator
        - updater
  securitySchemes:
    admin:
      type: http
      scheme: bearer

````