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

# Post apiv2organizations lead filterspreview



## OpenAPI

````yaml https://api.osiro.com/doc post /api/v2/organizations/{orgId}/lead-filters/preview
openapi: 3.0.0
info:
  title: osiro API
  version: 2.0.0
servers: []
security: []
tags:
  - name: Funnel
    description: Public funnel rendering, submission, Lead verification, and analytics.
  - name: Booking
    description: A lead's cancel and reschedule of their booking, via the manage link.
  - name: Training
    description: Org-scoped sales-training catalogs, sessions, and call records.
  - name: Attribution
    description: Cross-domain PostHog identity handoff for the marketing site.
  - name: Billing
    description: Org-scoped checkouts, plans, trials and the Stripe billing portal.
  - name: Leads
    description: Org-scoped lead reads and actions.
  - name: Ad copy
    description: Org-scoped ad guidelines and Meta ad copy generation.
paths:
  /api/v2/organizations/{orgId}/lead-filters/preview:
    post:
      tags:
        - Lead filters
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: orgId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                filter:
                  type: object
                  nullable: true
                  properties:
                    version:
                      type: number
                      enum:
                        - 1
                    missing:
                      type: string
                      enum:
                        - dont_sell
                        - sell
                      default: dont_sell
                    conditions:
                      type: array
                      items:
                        oneOf:
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - number
                              key:
                                type: string
                                minLength: 1
                                maxLength: 200
                              op:
                                type: string
                                enum:
                                  - gte
                                  - lte
                                  - eq
                                  - neq
                              value:
                                type: number
                            required:
                              - kind
                              - key
                              - op
                              - value
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - choice
                              key:
                                type: string
                                minLength: 1
                                maxLength: 200
                              op:
                                type: string
                                enum:
                                  - eq
                                  - neq
                                  - in
                                  - not_in
                              values:
                                type: array
                                items:
                                  type: string
                                  minLength: 1
                                  maxLength: 200
                                minItems: 1
                                maxItems: 200
                            required:
                              - kind
                              - key
                              - op
                              - values
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - multi
                              key:
                                type: string
                                minLength: 1
                                maxLength: 200
                              op:
                                type: string
                                enum:
                                  - any_of
                                  - none_of
                              values:
                                type: array
                                items:
                                  type: string
                                  minLength: 1
                                  maxLength: 200
                                minItems: 1
                                maxItems: 200
                            required:
                              - kind
                              - key
                              - op
                              - values
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - funnel
                              op:
                                type: string
                                enum:
                                  - in
                                  - not_in
                              funnelIds:
                                type: array
                                items:
                                  type: string
                                  format: uuid
                                minItems: 1
                                maxItems: 200
                            required:
                              - kind
                              - op
                              - funnelIds
                      maxItems: 20
                  required:
                    - version
                    - conditions
                area:
                  type: object
                  properties:
                    area_mode:
                      type: string
                      enum:
                        - nationwide
                        - regional
                    area_radii:
                      type: array
                      items:
                        type: object
                        properties:
                          code:
                            type: string
                            pattern: ^\d{5}$
                          km:
                            type: integer
                            minimum: 1
                            maximum: 300
                        required:
                          - code
                          - km
                      maxItems: 20
                    area_postcodes:
                      type: array
                      items:
                        type: string
                      maxItems: 2000
                  required:
                    - area_mode
                    - area_radii
                    - area_postcodes
              required:
                - filter
                - area
      responses:
        '200':
          description: >-
            How many of the org's leads from the last 30 days a buyer with this
            draft filter and area would have got, why the others didn't fit, and
            the draft's stale conditions. Cap and pause are left out.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LeadFilterPreview'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    LeadFilterPreview:
      type: object
      properties:
        total:
          type: integer
        matching:
          type: integer
        outsideArea:
          type: integer
        filter:
          type: integer
        missingOnly:
          type: integer
        warnings:
          type: array
          items:
            oneOf:
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - unreadable
                required:
                  - type
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - field_gone
                  index:
                    type: integer
                  key:
                    type: string
                required:
                  - type
                  - index
                  - key
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - option_gone
                  index:
                    type: integer
                  key:
                    type: string
                    nullable: true
                  missing:
                    type: array
                    items:
                      type: string
                required:
                  - type
                  - index
                  - key
                  - missing
      required:
        - total
        - matching
        - outsideArea
        - filter
        - missingOnly
        - warnings
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
            - message
      required:
        - error

````

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