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

> Sparse target edit. One entry per bucket; omitted buckets are untouched. Tracked-only is { op: track }. Rules and progress are not rewritten.

# Update quota targets



## OpenAPI

````yaml patch /v1/projects/{projectId}/quotas/targets
openapi: 3.0.0
info:
  title: Partner API
  description: Public API for partner integrations
  version: '1.0'
  contact: {}
servers:
  - url: https://api-staging.respondent.io
security: []
tags: []
paths:
  /v1/projects/{projectId}/quotas/targets:
    patch:
      tags:
        - quotas
      summary: Update quota targets
      operationId: QuotasController_patchTargets
      parameters:
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
        - name: x-api-secret
          in: header
          required: true
          schema:
            type: string
        - name: projectId
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/QuotaTargetEntryDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuotaDto'
components:
  schemas:
    QuotaTargetEntryDto:
      type: object
      properties:
        groupId:
          type: string
        segmentId:
          type: string
        target:
          $ref: '#/components/schemas/QuotaTargetDto'
      required:
        - groupId
        - segmentId
        - target
    QuotaDto:
      type: object
      properties:
        id:
          type: string
        projectId:
          type: string
        version:
          type: string
          enum:
            - v2
        revision:
          type: number
        source:
          $ref: '#/components/schemas/QuotaSource'
        filled:
          type: boolean
        closed:
          type: boolean
        groups:
          type: array
          items:
            $ref: '#/components/schemas/QuotaGroupDto'
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
      required:
        - projectId
        - version
        - revision
        - filled
        - closed
        - groups
    QuotaTargetDto:
      type: object
      properties:
        op:
          $ref: '#/components/schemas/QuotaTargetOperator'
        value:
          type: number
          minimum: 0
      required:
        - op
    QuotaSource:
      type: string
      enum:
        - app
        - api
        - agent
        - migration
    QuotaGroupDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        segments:
          type: array
          items:
            $ref: '#/components/schemas/QuotaSegmentDto'
        noMatch:
          $ref: '#/components/schemas/QuotaBucketDto'
        filled:
          type: boolean
        closed:
          type: boolean
        minProtected:
          type: boolean
      required:
        - id
        - name
        - segments
        - noMatch
        - filled
        - closed
        - minProtected
    QuotaTargetOperator:
      type: string
      enum:
        - min
        - max
        - exact
        - track
    QuotaSegmentDto:
      type: object
      properties:
        target:
          $ref: '#/components/schemas/QuotaTargetDto'
        progress:
          $ref: '#/components/schemas/QuotaProgressDto'
        filled:
          type: boolean
        closed:
          type: boolean
        overTarget:
          type: boolean
        id:
          type: string
        name:
          type: string
        rule:
          oneOf:
            - $ref: '#/components/schemas/QuotaRuleGroupNodeDto'
            - $ref: '#/components/schemas/QuotaRuleConditionNodeDto'
      required:
        - target
        - progress
        - filled
        - closed
        - overTarget
        - id
        - name
        - rule
    QuotaBucketDto:
      type: object
      properties:
        target:
          $ref: '#/components/schemas/QuotaTargetDto'
        progress:
          $ref: '#/components/schemas/QuotaProgressDto'
        filled:
          type: boolean
        closed:
          type: boolean
        overTarget:
          type: boolean
      required:
        - target
        - progress
        - filled
        - closed
        - overTarget
    QuotaProgressDto:
      type: object
      properties:
        pending:
          type: number
        qualified:
          type: number
        invited:
          type: number
        attended:
          type: number
        externalFills:
          type: number
      required:
        - pending
        - qualified
        - invited
        - attended
        - externalFills
    QuotaRuleGroupNodeDto:
      type: object
      properties:
        kind:
          $ref: '#/components/schemas/QuotaRuleGroupKind'
        connector:
          $ref: '#/components/schemas/QuotaRuleConnector'
        children:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/QuotaRuleGroupNodeDto'
              - $ref: '#/components/schemas/QuotaRuleConditionNodeDto'
      required:
        - kind
        - connector
        - children
    QuotaRuleConditionNodeDto:
      type: object
      properties:
        kind:
          $ref: '#/components/schemas/QuotaRuleConditionKind'
        condition:
          oneOf:
            - $ref: '#/components/schemas/QuotaAttributeSetConditionDto'
            - $ref: '#/components/schemas/QuotaJobTitleConditionDto'
            - $ref: '#/components/schemas/QuotaAgeRangeConditionDto'
            - $ref: '#/components/schemas/QuotaAgeComparisonConditionDto'
            - $ref: '#/components/schemas/QuotaScreenerConditionDto'
            - $ref: '#/components/schemas/QuotaExternalScreenerConditionDto'
      required:
        - kind
        - condition
    QuotaRuleGroupKind:
      type: string
      enum:
        - group
    QuotaRuleConnector:
      type: string
      enum:
        - AND
        - OR
    QuotaRuleConditionKind:
      type: string
      enum:
        - condition
    QuotaAttributeSetConditionDto:
      type: object
      properties:
        source:
          type: string
          enum:
            - attribute
        attribute:
          $ref: '#/components/schemas/QuotaSetAttribute'
        op:
          type: string
          enum:
            - in
            - notIn
        values:
          type: array
          items:
            type: string
      required:
        - source
        - attribute
        - op
        - values
    QuotaJobTitleConditionDto:
      type: object
      properties:
        source:
          type: string
          enum:
            - attribute
        attribute:
          type: string
          enum:
            - jobTitle
        op:
          type: string
          enum:
            - in
            - notIn
        values:
          type: array
          items:
            type: string
        resolvedFamilyGroupIds:
          readOnly: true
          type: array
          items:
            type: number
        groupingVersion:
          type: number
          readOnly: true
      required:
        - source
        - attribute
        - op
        - values
    QuotaAgeRangeConditionDto:
      type: object
      properties:
        source:
          type: string
          enum:
            - attribute
        attribute:
          type: string
          enum:
            - age
        op:
          type: string
          enum:
            - range
        min:
          type: number
          minimum: 0
        max:
          type: number
          minimum: 0
      required:
        - source
        - attribute
        - op
    QuotaAgeComparisonConditionDto:
      type: object
      properties:
        source:
          type: string
          enum:
            - attribute
        attribute:
          type: string
          enum:
            - age
        op:
          type: string
          enum:
            - gt
            - lt
        value:
          type: number
          minimum: 0
      required:
        - source
        - attribute
        - op
        - value
    QuotaScreenerConditionDto:
      type: object
      properties:
        source:
          type: string
          enum:
            - screener
        questionUid:
          type: string
        match:
          $ref: '#/components/schemas/QuotaMatch'
        answerUids:
          type: array
          items:
            type: string
        count:
          description: >-
            Required when `match` is `count` and not accepted otherwise: `min`
            (at least), `max` (at most) or `exact` `value` of the listed answers
            selected. CHECKBOX questions only.
          allOf:
            - $ref: '#/components/schemas/QuotaCountBoundDto'
      required:
        - source
        - questionUid
        - match
        - answerUids
    QuotaExternalScreenerConditionDto:
      type: object
      properties:
        source:
          type: string
          enum:
            - externalScreener
        questionId:
          type: string
        match:
          $ref: '#/components/schemas/QuotaMatch'
        optionIds:
          description: '`options[].id` values declared on the referenced external question.'
          type: array
          items:
            type: string
        count:
          description: >-
            Required when `match` is `count` and not accepted otherwise: `min`
            (at least), `max` (at most) or `exact` `value` of the listed answers
            selected. CHECKBOX questions only.
          allOf:
            - $ref: '#/components/schemas/QuotaCountBoundDto'
      required:
        - source
        - questionId
        - match
        - optionIds
    QuotaSetAttribute:
      type: string
      enum:
        - gender
        - ethnicity
        - country
        - industry
        - companySize
        - seniority
        - education
    QuotaMatch:
      type: string
      enum:
        - any
        - all
        - none
        - count
    QuotaCountBoundDto:
      type: object
      properties:
        op:
          $ref: '#/components/schemas/QuotaCountOperator'
        value:
          type: integer
          minimum: 0
      required:
        - op
        - value
    QuotaCountOperator:
      type: string
      enum:
        - min
        - max
        - exact

````