> For the complete documentation index, see [llms.txt](https://docs.mocklets.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mocklets.com/managing-mock-apis/using-query-params.md).

# Using Query Params

When working on a mock API, you will often need to configure your API in a way that will affect the working of the rest of your team. So to handle those scenarios, Mocklets enables you to control some of the configuration using query params while making the API request.

Currently, we allow users to configure response HTTP status and delay parameters by adding query params to their API calls.

### Configure HTTP Status

You can request a specific HTTP status in response by adding `x_response_status` param to your api. So, if you api is `https://api.mocklets.com/mock12675/pets` which has its active response HTTP status set as `200`, but you want it to return a `401` response, you just have to call

```http
https://api.mocklets.com/mock12675/pets?x_response_status=401
```

{% hint style="info" %}
**Please note** You need to add the requested status code to your api, otherwise it will return `404 NOT FOUND`  error.
{% endhint %}

### Configure Response delay

User can add custom delay to the api request using query param without effecting the behavior of other team members using the same api. You need to add `x_response_delay` param to you api. So, if your api is `https://api.mocklets.com/mock12675/pets` and you want to set the delay as `15 seconds`, you have to call

```http
https://api.mocklets.com/mock12675/pets?x_response_delay=15
```

The maximum delay supported in `60 seconds`, any value above it will be ignored and `60 second` delay will be set for that request.

We are adding more configuration that can be managed using query params. Please stay tuned for more.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.mocklets.com/managing-mock-apis/using-query-params.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
