# Quotas

## 👥 What are quotas ?

Quotas enable you to limit access to a survey based on the number of responses to certain conditions. Once the specified number of responses is reached, the survey can either be closed or access to it can be restricted.

## 🚀 How to enable quotas ?

To enable quotas you need to create your first quota condition and define the number of respondents that will match that quota.

In the example below we have defined a quota of 1000 respondents for the "Apple" answer. the quota condition will return true if there are over 1000 respondents in the survey that answered "Apple".&#x20;

<div><figure><img src="/files/7Jo8oHZozgwowOUP3Pgp" alt=""><figcaption></figcaption></figure> <figure><img src="/files/ZvEKW3MdmC9n3nIHeI66" alt=""><figcaption></figcaption></figure></div>

Once you have defined your quota you can use your quota either any of your [condition rules](/form-management/form-designer/condition-rules/conditions-rules.md), using the [quota restriction](/form-management/security/security-items/quota-restrictions.md) security feature or as is.

If your using the quota as is you can use to automatically end a survey by leveraging the "End survey" feature . This approach promptly finishes the survey for participants who choose the "Apple" option once its designated quota has been reached. Using this option you can terminate an survey based on a quota while still allowing other answers not matching the quota to flow in.

<figure><img src="/files/mbVSmiUzUPywnF4zijy9" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
By default, ngSurvey automatically discards responses once a survey's quota is reached. However, if you wish to retain responses exceeding the quota, you can enable this by selecting the "Keep over quota answers" option.&#x20;
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ngsurvey.com/form-management/form-designer/form-settings/quotas.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
