> ## 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.

# List Matching Policies (Beta)

> List the matching policies of the tenant the caller is acting in, sorted by name then last update date in the direction given by `order`. Results are paginated with a cursor: pass the `next` value of a response as `from` to get the following page, and stop when `next` is `null`.

&#x20;Required API key permission: **Read Tenant**

> [!NOTE]
>
> The List Matching Policies endpoint is still in beta and is subject to change.


## OpenAPI

````yaml firework-v4-openapi get /firework/v4/matching-policies
openapi: 3.1.0
info:
  title: Firework API
  version: v4
servers:
  - url: https://api.flare.io
security:
  - BearerAuth: []
tags:
  - name: Audit Logs
    description: Audit trail of actions performed in the platform.
  - name: Credentials
    description: >-
      Leaked credentials: search across all sources or within a tenant, and
      remediate or ignore them.
  - name: Entities
    description: >-
      Threat intelligence entities such as actors, chat channels, forum threads
      and domains, and the relations between them.
  - name: Events
    description: >-
      Events collected by Flare: global search, tenant and identifier feeds,
      event details, actions and saved feed views.
  - name: Identifiers
    description: >-
      Identifiers are the assets a tenant monitors, such as domains, keywords
      and email addresses. Includes recommendations and authorization of
      sensitive identifiers.
  - name: Matching Policies
    description: >-
      Matching policies refine which events match identifiers. Manage policies
      and their assignment to identifiers.
  - name: Sandbox
    description: File uploads and their sandbox analysis.
  - name: Threat Flow
    description: >-
      Threat Flow intelligence requests, generated reports and conversation
      summaries.
paths:
  /firework/v4/matching-policies:
    get:
      tags:
        - Matching Policies
      summary: List matching policies
      description: >-
        List the matching policies of the tenant the caller is acting in, sorted
        by name then last update date in the direction given by `order`. Results
        are paginated with a cursor: pass the `next` value of a response as
        `from` to get the following page, and stop when `next` is `null`.
      operationId: list_matching_policies_matching_policies_get
      parameters:
        - name: from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: From
            description: >-
              Pagination cursor: pass the `next` value of the previous response
              to get the following page, omit it for the first page.
          description: >-
            Pagination cursor: pass the `next` value of the previous response to
            get the following page, omit it for the first page.
        - name: size
          in: query
          required: false
          schema:
            type: integer
            maximum: 25
            exclusiveMinimum: 0
            description: Maximum number of items to return, from 1 to 25.
            default: 25
            title: Size
          description: Maximum number of items to return, from 1 to 25.
        - name: order
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/OrderType'
            description: Sort direction of the results.
            default: desc
          description: Sort direction of the results.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PaginatedResults_MatchingPolicyPayload_str_
        '401':
          description: UNAUTHORIZED
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    properties:
                      code:
                        type: string
                        enum:
                          - UNAUTHORIZED
                      data:
                        anyOf:
                          - additionalProperties: true
                            type: object
                          - type: 'null'
                        title: Data
                      message:
                        anyOf:
                          - type: string
                          - items: {}
                            type: array
                          - type: 'null'
                        title: Message
                    required:
                      - code
                      - data
                      - message
                    title: HTTPError
                    type: object
                required:
                  - error
        '403':
          description: FORBIDDEN
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    properties:
                      code:
                        type: string
                        enum:
                          - FORBIDDEN
                      data:
                        anyOf:
                          - additionalProperties: true
                            type: object
                          - type: 'null'
                        title: Data
                      message:
                        anyOf:
                          - type: string
                          - items: {}
                            type: array
                          - type: 'null'
                        title: Message
                    required:
                      - code
                      - data
                      - message
                    title: HTTPError
                    type: object
                required:
                  - error
        '404':
          description: NOT_FOUND
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    properties:
                      code:
                        type: string
                        enum:
                          - NOT_FOUND
                      data:
                        anyOf:
                          - additionalProperties: true
                            type: object
                          - type: 'null'
                        title: Data
                      message:
                        anyOf:
                          - type: string
                          - items: {}
                            type: array
                          - type: 'null'
                        title: Message
                    required:
                      - code
                      - data
                      - message
                    title: HTTPError
                    type: object
                required:
                  - error
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    OrderType:
      type: string
      enum:
        - asc
        - desc
      title: OrderType
    PaginatedResults_MatchingPolicyPayload_str_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/MatchingPolicyPayload'
          type: array
          title: Items
          description: Results of the current page.
        next:
          anyOf:
            - type: string
            - type: 'null'
          title: Next
          description: >-
            Cursor to send in the next request to continue after this page, or
            `null` when no further page is available.
      type: object
      required:
        - items
        - next
      title: PaginatedResults[MatchingPolicyPayload, str]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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:
          $ref: '#/components/schemas/PolicyReadValue'
          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
    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
    MatchingPolicyType:
      type: string
      enum:
        - INCLUDED_KEYWORDS
        - EXCLUDED_KEYWORDS
        - LUCENE_QUERY
        - ASTP_COOKIES
        - ASTP_DOMAIN
        - LOOKALIKE_STRATEGIES
      title: MatchingPolicyType
    PolicyReadValue:
      anyOf:
        - $ref: '#/components/schemas/KeywordsValue'
        - $ref: '#/components/schemas/LuceneValue'
        - $ref: '#/components/schemas/AstpCookiesReadValue'
        - $ref: '#/components/schemas/AstpDomainValue'
        - $ref: '#/components/schemas/LookalikeMatchStrategiesValue'
    KeywordsValue:
      properties:
        keywords:
          items:
            type: string
          type: array
          title: Keywords
          description: The keywords of the matching policy, at most 50.
      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
    AstpCookiesReadValue:
      properties:
        cookie_names:
          items:
            type: string
          type: array
          title: Cookie Names
          description: The cookie names to monitor, from 1 to 20 names
        match_subdomains:
          type: boolean
          title: Match Subdomains
          description: >-
            Whether this policy will be applied to monitor subdomains of the
            assigned domain identifiers
          default: false
        match_prefix:
          type: boolean
          title: Match Prefix
          description: >-
            Whether the cookie names are matched as prefixes rather than
            exactly. Read-only: it cannot be set through this API.
          default: false
      type: object
      required:
        - cookie_names
      title: AstpCookiesReadValue
    AstpDomainValue:
      properties:
        match_mode:
          $ref: '#/components/schemas/DomainMatchMode'
          description: >-
            The domain match mode for this policy: whether leaked credentials
            match the domain identifier on the email domain, on the
            authentication domain, or on either
          default: email_domain_only
      type: object
      title: AstpDomainValue
    LookalikeMatchStrategiesValue:
      properties:
        match_strategies:
          items:
            $ref: '#/components/schemas/Heuristic'
          type: array
          title: Match Strategies
          description: >-
            The lookalike domain match strategies to monitor: at least one, and
            `various` is not accepted
      type: object
      required:
        - match_strategies
      title: LookalikeMatchStrategiesValue
    DomainMatchMode:
      type: string
      enum:
        - email_domain_only
        - auth_domain_and_email_domain
        - auth_domain_only
      title: DomainMatchMode
    Heuristic:
      type: string
      enum:
        - addition
        - bitsquatting
        - cyrillic
        - dictionary
        - ends-with
        - homoglyph
        - hyphenation
        - insertion
        - omission
        - plural
        - repetition
        - replacement
        - starts-with
        - subdomain
        - tld-swap
        - transposition
        - various
        - vowel-swap
      title: Heuristic
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.