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

# Retrieve a project's quota

> Retrieve a V2 quota and its progress. A project with no quota returns 200 with version v2 and an empty groups array. A project that still has a V1 quota returns the V1 body, documented on its own page.

> [!NOTE]
>
> Quotas V2 is rolling out gradually and is enabled per organization.
> **Contact your Respondent account manager to enable Quotas V2 for your
> account.** Until it's enabled, quota writes are not part of your
> available API surface.

The `version: "v1"` body is [Retrieve a quota (V1)](https://developers.respondent.io/quotas/retrieve-quota-v1.md).


## OpenAPI

````yaml get /v1/projects/{projectId}/quotas
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:
    get:
      tags:
        - quotas
      summary: Retrieve a project's quota
      operationId: QuotasController_get
      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
      responses:
        '200':
          description: >-
            The V2 quota, an empty V2 quota when the project has none, or the V1
            quota when that is what the project still has. `version` selects the
            body.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/QuotaDto'
                  - $ref: '#/components/schemas/QuotaV1Dto'
                discriminator:
                  propertyName: version
                  mapping:
                    v2: '#/components/schemas/QuotaDto'
                    v1: '#/components/schemas/QuotaV1Dto'
components:
  schemas:
    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
    QuotaV1Dto:
      type: object
      properties:
        id:
          type: string
          format: ObjectId
        projectId:
          type: string
          format: ObjectId
        version:
          $ref: '#/components/schemas/QuotaVersion'
        totalTarget:
          type: number
          minimum: 1
        status:
          $ref: '#/components/schemas/QuotaStatus'
        criteria:
          $ref: '#/components/schemas/QuotaCriteriaV1Dto'
        progress:
          type: object
          description: Quota progress by segment ID
          example:
            '1':
              currentCount: 10
              targetCount: 25
            '2':
              currentCount: 15
              targetCount: 30
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
      required:
        - progress
    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
    QuotaVersion:
      type: string
      enum:
        - v1
    QuotaStatus:
      type: string
      enum:
        - IN_PROGRESS
        - FILLED
    QuotaCriteriaV1Dto:
      type: object
      properties:
        category:
          enum:
            - age
            - gender
            - ethnicity
            - location
          type: string
          description: The category this quota applies to
          example: gender
        segments:
          description: Array of quota segments
          type: array
          items:
            $ref: '#/components/schemas/QuotaSegmentV1Dto'
      required:
        - category
        - segments
    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
    QuotaSegmentV1Dto:
      type: object
      properties:
        value:
          $ref: '#/components/schemas/QuotaCategoryValue'
          example: male
        percentage:
          type: number
          minimum: 0
          maximum: 100
          description: The target percentage for this segment (0-100)
          example: 50
        id:
          type: string
          description: Unique identifier for the segment
          example: '1'
      required:
        - value
        - percentage
        - id
    QuotaTargetDto:
      type: object
      properties:
        op:
          $ref: '#/components/schemas/QuotaTargetOperator'
        value:
          type: number
          minimum: 0
      required:
        - op
    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/QuotaNumericRangeConditionDto'
            - $ref: '#/components/schemas/QuotaNumericComparisonConditionDto'
            - $ref: '#/components/schemas/QuotaScreenerSetConditionDto'
            - $ref: '#/components/schemas/QuotaScreenerCountConditionDto'
            - $ref: '#/components/schemas/QuotaExternalScreenerSetConditionDto'
            - $ref: '#/components/schemas/QuotaExternalScreenerCountConditionDto'
      required:
        - kind
        - condition
    QuotaCategoryValue:
      type: string
      description: >-
        The value for this segment (e.g., "Male" for gender, "18-24" for age,
        "USA" for location). Type depends on category.
      enum:
        - male
        - female
        - other
        - nonbinary
        - transmale
        - transfemale
        - prefernottoanswer
        - 18-20
        - 21-29
        - 30-39
        - 40-54
        - 55+
        - americanindianalaskannative
        - hispaniclatino
        - blackorafricanamerican
        - asianpacificislander
        - whitecaucasian
        - middleeastern
        - multipleethnicity
        - prefernotdisclose
        - AX
        - AL
        - DZ
        - AS
        - AD
        - AI
        - AQ
        - AG
        - AR
        - AM
        - AW
        - AU
        - AT
        - BS
        - BH
        - BD
        - BB
        - BY
        - BE
        - BZ
        - BJ
        - BM
        - BT
        - BO
        - BA
        - BW
        - BV
        - BR
        - VG
        - IO
        - BN
        - BG
        - BF
        - BI
        - CV
        - CM
        - CA
        - KY
        - CF
        - TD
        - CL
        - CX
        - CC
        - CO
        - KM
        - CG
        - CK
        - CR
        - HR
        - CU
        - CW
        - CY
        - CZ
        - CI
        - CD
        - DK
        - DJ
        - DM
        - EC
        - EG
        - SV
        - GQ
        - ER
        - EE
        - SZ
        - ET
        - FK
        - FO
        - FJ
        - FI
        - FR
        - GF
        - PF
        - TF
        - GA
        - GM
        - GE
        - DE
        - GI
        - GR
        - GL
        - GD
        - GP
        - GU
        - GT
        - GG
        - GN
        - GW
        - GY
        - HT
        - HM
        - VA
        - HN
        - HK
        - HU
        - IS
        - IN
        - ID
        - IR
        - IQ
        - IE
        - IM
        - IL
        - IT
        - JM
        - JP
        - JE
        - JO
        - KZ
        - KE
        - KI
        - LA
        - LV
        - LB
        - LR
        - LY
        - LI
        - LT
        - LU
        - MG
        - MW
        - MY
        - MV
        - ML
        - MT
        - MH
        - MQ
        - MR
        - MU
        - YT
        - MX
        - FM
        - MD
        - MC
        - MN
        - ME
        - MS
        - MA
        - MZ
        - NA
        - NR
        - NP
        - NL
        - NC
        - NZ
        - NI
        - NE
        - NU
        - NF
        - KP
        - MK
        - MP
        - 'NO'
        - OM
        - PW
        - PA
        - PG
        - PY
        - PE
        - PH
        - PN
        - PL
        - PT
        - PR
        - QA
        - RO
        - RW
        - RE
        - SH
        - KN
        - LC
        - PM
        - VC
        - WS
        - SM
        - ST
        - SA
        - RS
        - SC
        - SL
        - SG
        - SK
        - SI
        - SB
        - SO
        - ZA
        - GS
        - KR
        - ES
        - LK
        - SR
        - SJ
        - SE
        - CH
        - TZ
        - TW
        - TH
        - TL
        - TG
        - TK
        - TO
        - TT
        - TN
        - TR
        - TM
        - TC
        - TV
        - VI
        - UG
        - AE
        - GB
        - UM
        - US
        - UY
        - VU
        - VE
        - VN
        - WF
        - EH
        - ZM
        - ZW
        - all
    QuotaTargetOperator:
      type: string
      enum:
        - min
        - max
        - exact
        - track
    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
    QuotaNumericRangeConditionDto:
      type: object
      properties:
        source:
          type: string
          enum:
            - attribute
        attribute:
          $ref: '#/components/schemas/QuotaNumericAttribute'
        op:
          type: string
          enum:
            - range
        min:
          type: number
          minimum: 0
        max:
          type: number
          minimum: 0
      required:
        - source
        - attribute
        - op
    QuotaNumericComparisonConditionDto:
      type: object
      properties:
        source:
          type: string
          enum:
            - attribute
        attribute:
          $ref: '#/components/schemas/QuotaNumericAttribute'
        op:
          type: string
          enum:
            - gt
            - lt
        value:
          type: number
          minimum: 0
      required:
        - source
        - attribute
        - op
        - value
    QuotaScreenerSetConditionDto:
      type: object
      properties:
        source:
          type: string
          enum:
            - screener
        questionUid:
          type: string
        match:
          $ref: '#/components/schemas/QuotaSetMatch'
        answerUids:
          type: array
          items:
            type: string
      required:
        - source
        - questionUid
        - match
        - answerUids
    QuotaScreenerCountConditionDto:
      type: object
      properties:
        source:
          type: string
          enum:
            - screener
        questionUid:
          type: string
        match:
          type: string
          enum:
            - count
        op:
          $ref: '#/components/schemas/QuotaCountOperator'
        value:
          type: integer
          description: Number of selected options to compare with.
          minimum: 0
      required:
        - source
        - questionUid
        - match
        - op
        - value
    QuotaExternalScreenerSetConditionDto:
      type: object
      properties:
        source:
          type: string
          enum:
            - externalScreener
        questionId:
          type: string
        match:
          $ref: '#/components/schemas/QuotaSetMatch'
        optionIds:
          description: '`options[].id` values declared on the referenced external question.'
          type: array
          items:
            type: string
      required:
        - source
        - questionId
        - match
        - optionIds
    QuotaExternalScreenerCountConditionDto:
      type: object
      properties:
        source:
          type: string
          enum:
            - externalScreener
        questionId:
          type: string
        match:
          type: string
          enum:
            - count
        op:
          $ref: '#/components/schemas/QuotaCountOperator'
        value:
          type: integer
          description: Number of selected options to compare with.
          minimum: 0
      required:
        - source
        - questionId
        - match
        - op
        - value
    QuotaSetAttribute:
      type: string
      enum:
        - gender
        - ethnicity
        - country
        - education
        - householdIncome
        - industry
        - companySize
        - seniority
        - jobFunctions
        - militaryServiceStatus
        - workSetting
        - relationshipStatus
        - languages
        - livingSituation
        - pets
        - homeOwner
        - nationality
        - areaType
        - onlineShoppingFrequency
        - cloudPlatforms
        - codingAITools
        - designPrototypingTools
        - foodDeliveryServices
        - healthWellnessApps
        - onlineBankingTools
        - onlineLearningPlatforms
        - onlineMarketplacePlatforms
        - onlineTravelBooking
        - productivitySoftware
        - smartHomeDevices
        - socialNetworkPlatforms
        - streamingServices
        - vehicleBrands
        - webcam
        - mobilePhoneWithInternet
        - headsetWithMicrophone
        - programmingLanguages
        - browsers
        - smartphoneOS
        - tabletOS
        - computerOS
    QuotaNumericAttribute:
      type: string
      enum:
        - age
    QuotaSetMatch:
      type: string
      description: '`all` is CHECKBOX only.'
      enum:
        - any
        - all
        - none
    QuotaCountOperator:
      type: string
      enum:
        - eq
        - ne
        - gt
        - gte
        - lt
        - lte

````

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