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

# Update Matching Policy (Beta)

export const name_0 = "Update Matching Policy"

<Note>
  The {name_0} endpoint is still in beta and is subject to change.
</Note>


## OpenAPI

````yaml put /firework/v4/matching_policies/{policy_uuid}
openapi: 3.1.0
info:
  title: Firework API
  version: v4
servers:
  - url: https://api.flare.io
security:
  - BearerAuth: []
paths:
  /firework/v4/matching_policies/{policy_uuid}:
    put:
      tags:
        - public
        - team=data-engineering
      summary: Update Matching Policy
      operationId: update_matching_policy_matching_policies__policy_uuid__put
      parameters:
        - name: policy_uuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Policy Uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateMatchingPolicyBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MatchingPolicyPayload'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UpdateMatchingPolicyBody:
      properties:
        name:
          type: string
          title: Name
          description: The new name of the matching policy
        value:
          anyOf:
            - $ref: '#/components/schemas/KeywordsValue'
            - $ref: '#/components/schemas/LuceneValue'
            - $ref: '#/components/schemas/AstpCookiesValue'
          title: Value
          description: The new value of the matching policy depending on its type
      type: object
      required:
        - name
        - value
      title: UpdateMatchingPolicyBody
    MatchingPolicyPayload:
      properties:
        uuid:
          type: string
          format: uuid4
          title: Uuid
          description: The UUID of the matching policy
        name:
          type: string
          title: Name
          description: The name of the matching policy
        policy_type:
          $ref: '#/components/schemas/MatchingPolicyType'
          description: The type of the matching policy
        value:
          anyOf:
            - $ref: '#/components/schemas/KeywordsValue'
            - $ref: '#/components/schemas/LuceneValue'
            - $ref: '#/components/schemas/AstpCookiesValue'
          title: Value
          description: The value of the matching policy depending on its type
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The date and time the matching policy was created
        last_updated_at:
          type: string
          format: date-time
          title: Last Updated At
          description: The date and time the matching policy was last updated
      type: object
      required:
        - uuid
        - name
        - policy_type
        - value
        - created_at
        - last_updated_at
      title: MatchingPolicyPayload
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    KeywordsValue:
      properties:
        keywords:
          items:
            type: string
          type: array
          title: Keywords
      type: object
      required:
        - keywords
      title: KeywordsValue
    LuceneValue:
      properties:
        query:
          type: string
          title: Query
          description: The lucene query of the matching policy
      type: object
      required:
        - query
      title: LuceneValue
    AstpCookiesValue:
      properties:
        cookie_names:
          items:
            type: string
          type: array
          title: Cookie Names
        match_subdomains:
          type: boolean
          title: Match Subdomains
          default: false
      type: object
      required:
        - cookie_names
      title: AstpCookiesValue
    MatchingPolicyType:
      type: string
      enum:
        - INCLUDED_KEYWORDS
        - EXCLUDED_KEYWORDS
        - LUCENE_QUERY
        - ASTP_COOKIES
      title: MatchingPolicyType
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````