---
title: "API Requests"
section: "API Requests"
description: "API Requests is the SmartestQA API library: build, import and try HTTP requests in collections and folders, then reuse them as API steps in test cases."
url: https://docs.smartestqa.ai/en/api-requests.html
audience: [customer, admin]
updated: 2026-11-08
keywords: "api requests api library rest http request collection folder postman swagger openapi curl send response bearer basic auth api step"
---
# API Requests

API Requests is the project’s API library. You build or import HTTP requests here, try them with Send, and add them as API steps to test cases, so UI and API checks live in the same scenario.

## In short

**On this page you can**

- Keep the project’s HTTP requests in collections and folders.
- Import requests from Postman, Swagger / OpenAPI or a curl command.
- Try a request with Send and read status, time, size and body.
- Set authorization once on a collection or folder for its requests.
- Add a saved request to a test case as an API step.

**How to use it**

1. Open API Requests and create a collection with Add Collection .
2. Click New Request , or import with Import Postman or Import Swagger / OpenAPI .
3. Fill method, URL, body and Request settings , then Save .
4. Click Send to check the response.
5. In Automate, add an API step and pick the request in Select API Request .

**At a glance**

- **Where:** Main menu › **API Requests**. Left: the API tree. Middle: the request. Right: [**Request settings**](https://docs.smartestqa.ai/en/api-requests-editor.html#authorization) (**Authorization**, **Params**, **Header**).
- **Who:** Every project member creates, edits, sends and deletes requests. Deleting a folder or collection that is not empty needs an [Admin](https://docs.smartestqa.ai/en/company-settings-roles.html).
- **You need:** A selected project and the API’s address. For **Send**, the API must be reachable from the SmartestQA server.
- **Time:** A request takes a minute; a Swagger import of a whole API takes seconds.
- **Produces:** Saved requests: method, URL, headers, query parameters, body and authorization.
- **Used by:** [API steps](https://docs.smartestqa.ai/en/automate-steps-api.html) in Automate (each step keeps its own copy) and AI assistants through [MCP](https://docs.smartestqa.ai/en/mcp.html).
- **Project types:** The same in WEB, MOBILE and DESKTOP projects. API steps can sit next to UI steps in any scenario.

## Start from your question

I want to…

- [Create a request](https://docs.smartestqa.ai/en/api-requests-library.html#create-request)
- [Import my OpenAPI spec](https://docs.smartestqa.ai/en/api-requests-library.html#import-swagger)
- [Paste a curl command](https://docs.smartestqa.ai/en/api-requests-library.html#paste-curl)
- [Set one token for many requests](https://docs.smartestqa.ai/en/api-requests-editor.html#inherit-auth)
- [Use a request in a test case](https://docs.smartestqa.ai/en/api-requests-in-tests.html#add-step)

Something is wrong

- [Send says the URL must start with http](https://docs.smartestqa.ai/en/api-requests-troubleshooting.html#fix-send-requires-http)
- [“Connection refused…” or “Host not found…”](https://docs.smartestqa.ai/en/api-requests-troubleshooting.html#fix-conn-refused)
- [Works on this page, 401 in the run](https://docs.smartestqa.ai/en/api-requests-troubleshooting.html#fix-401-in-run)
- [My step did not pick up my changes](https://docs.smartestqa.ai/en/api-requests-troubleshooting.html#fix-step-not-updated)
- [All API Requests problems](https://docs.smartestqa.ai/en/api-requests-troubleshooting.html)

How does it work?

- [What Send really sends](https://docs.smartestqa.ai/en/api-requests-editor.html#what-send-sends)
- [How time and size are measured](https://docs.smartestqa.ai/en/api-requests-editor.html#response-numbers)
- [Why a step keeps its own copy](https://docs.smartestqa.ai/en/api-requests-in-tests.html#copy)
- [What a run does differently](https://docs.smartestqa.ai/en/api-requests-in-tests.html#run-differences)
- [Which machine sends the request](https://docs.smartestqa.ai/en/data-source-in-tests.html#where-it-connects)

## Where API Requests fits

API Requests sits beside the order of work, like [Data Source](https://docs.smartestqa.ai/en/data-source.html). You fill the library before or while you automate; [Automate](https://docs.smartestqa.ai/en/automate.html) copies requests into steps.

1. **Discover** — Pages and controls
2. **Analyze** — [Requirements](https://docs.smartestqa.ai/en/analyze-requirements.html)
3. **Automate** — [API steps](https://docs.smartestqa.ai/en/automate-steps-api.html) copy saved requests ← this page
4. **Schedule** — Pipelines run them
5. **Report** — Request and response in the step log
6. **Maintenance** — Fix the step’s copy

## Why use it

- **UI and API in one scenario.** Create an order through the API, check it in the browser, or the other way round.
- **Start from what you have.** Postman collections, Swagger / OpenAPI specs and curl commands from the browser’s developer tools become requests.
- **One place for authorization.** Set a Bearer token or Basic Auth on a collection or folder and let requests inherit it while you try them here.
- **Data from Data Source.** URLs, headers and bodies can hold `{{ds:apiBase}}` and other references, with a different value per environment. See [Reference syntax](https://docs.smartestqa.ai/en/data-source-in-tests.html#reference-syntax).

## The building blocks

- **Collection:** The top level of the tree, usually one per API or service. An import always creates one.
- **Folder:** Groups requests inside a collection or another folder. Swagger imports create one folder per tag.
- **Request:** One HTTP call: method, URL, headers, query parameters, body and authorization. Shown with a colored method chip.
- **Authorization:** **None**, [**Bearer Token**](https://docs.smartestqa.ai/en/api-requests-editor.html#authorization), [**Basic Auth**](https://docs.smartestqa.ai/en/api-requests-editor.html#authorization) or [**Inherit from parent**](https://docs.smartestqa.ai/en/api-requests-editor.html#inherit-auth). Collections and folders can hold one for their requests.
- **Send:** Sends the request now, from the SmartestQA server, and shows the response. Nothing is saved.
- **API step:** A step in a test case made from a saved request. It keeps its own copy of the request.
- **Reference:** `{{ds:key}}`, `{{tc:name}}` or `{{excel:name}}_column` inside a request, filled in by the run.

## The screen

![API Requests with a request and its response.](https://docs.smartestqa.ai/media/shots/API-SHOT-01.png)

| Area | What it does | More |
| --- | --- | --- |
| API tree | [**New Request**](https://docs.smartestqa.ai/en/api-requests-library.html#create-request), **More** ([**Add Collection**](https://docs.smartestqa.ai/en/api-requests-library.html#organize), **Add Folder**, [**Import Postman**](https://docs.smartestqa.ai/en/api-requests-library.html#import-postman), [**Import Swagger / OpenAPI**](https://docs.smartestqa.ai/en/api-requests-library.html#import-swagger)), search, and a menu on every item. | [The API library](https://docs.smartestqa.ai/en/api-requests-library.html) |
| Request | Editable name, [**HTTP method**](https://docs.smartestqa.ai/en/api-requests-editor.html#request-line), [**Request URL**](https://docs.smartestqa.ai/en/api-requests-editor.html#request-line), **Send**, **Save**, **Body** and **Response**. | [Edit and send](https://docs.smartestqa.ai/en/api-requests-editor.html) |
| [**Request settings**](https://docs.smartestqa.ai/en/api-requests-editor.html#authorization) | **Authorization**, **Params**, **Header**. On narrow screens it folds into a strip of tabs at the right edge. | [Authorization](https://docs.smartestqa.ai/en/api-requests-editor.html#authorization) |
| Footer | **Created by** and **Updated by** with dates. |  |

On screens narrower than 1600 pixels the tree folds into a rail on the left (“Show the tree”). The last selected item and the open folders are remembered for the session.

## Who can do what

| Task | User | Admin |
| --- | --- | --- |
| Create, edit, duplicate, move, send and import | Yes | Yes |
| Delete a request or an empty folder or collection | Yes | Yes |
| Delete a folder or collection that has content | No | Yes |

The top folder of the tree cannot be deleted. Roles: [Roles & permissions](https://docs.smartestqa.ai/en/company-settings-roles.html).

## Before you start

- **Know where the API runs.** **Send** and Swagger URL imports go out from the SmartestQA server; runs go out from the machine that runs the test. An API on your intranet needs an [agent](https://docs.smartestqa.ai/en/quick-start-connect.html#agent) for runs and cannot be tried with **Send**.
- **Put the base URL in a key.** `{{ds:apiBase}}/orders` with `apiBase`, `apiBase_TEST`… in [Data Source](https://docs.smartestqa.ai/en/data-source-variables.html#environments).
- **Put tokens in encrypted keys.** A token typed into a request is visible to everyone who opens it. See [Where secrets belong](https://docs.smartestqa.ai/en/data-source-secrets.html#where-secrets-belong).

## Best practices

#### Do

- One collection per API, folders per resource.
- Name requests by what they do: “Create order”, “Get order by id”.
- Use `{{ds:…}}` for base URLs and secrets.
- Use [**Bearer Token**](https://docs.smartestqa.ai/en/api-requests-editor.html#authorization) or an Authorization header for anything you will run in tests.
- Check the response with **Send** before you add the request to a test.

#### Don’t

- Paste production tokens into requests.
- Expect a step to change when you edit the saved request.
- Rely on [**Basic Auth**](https://docs.smartestqa.ai/en/api-requests-editor.html#authorization) or [**Inherit from parent**](https://docs.smartestqa.ai/en/api-requests-editor.html#inherit-auth) in a run; see [Authorization in runs](https://docs.smartestqa.ai/en/api-requests-in-tests.html#auth-in-runs).
- Leave path placeholders such as `{id}` from an import in the URL.

## In this section

- [The API library](https://docs.smartestqa.ai/en/api-requests-library.html) — Create requests, collections and folders, rename, duplicate, move and delete them, and import from Postman, Swagger / OpenAPI or curl.
- [Edit and send](https://docs.smartestqa.ai/en/api-requests-editor.html) — Method, URL, body, authorization, params and headers; what Save checks, what Send really sends, and how to read the response.
- [Use requests in tests](https://docs.smartestqa.ai/en/api-requests-in-tests.html) — Add a saved request as an API step, create one from curl, understand the step’s own copy, and what a run sends differently from Send.
- [Troubleshooting](https://docs.smartestqa.ai/en/api-requests-troubleshooting.html) — Every API Requests message and symptom, with why it happens, what to check and how to fix it.
- [FAQ, MCP & limits](https://docs.smartestqa.ai/en/api-requests-faq.html) — Questions and answers about API Requests, AI assistants through MCP, and the limits.

## Related

- [API Request step reference](https://docs.smartestqa.ai/en/automate-steps-api.html)
- [Checks and assertions](https://docs.smartestqa.ai/en/automate-steps-assertions.html)
- [Turn recorded network calls into API tests](https://docs.smartestqa.ai/en/maintenance-network-calls.html)
- [Data Source keys](https://docs.smartestqa.ai/en/data-source-variables.html)
- [Secrets and credentials](https://docs.smartestqa.ai/en/data-source-secrets.html)
