---
title: "Edit and send"
section: "API Requests"
description: "Edit a SmartestQA API request: method, URL with Data Source keys, raw or form-data body, Bearer / Basic / inherited authorization, params, headers, Save, Send and the response."
url: https://docs.smartestqa.ai/en/api-requests-editor.html
audience: [customer, admin]
updated: 2026-11-08
keywords: "http method url body raw form-data json xml authorization bearer token basic auth inherit from parent params header save send response status time size retry"
---
# API Requests: Edit and send a request

The middle and right panels of API Requests hold one request. This page explains each field, what Save and Send do, and how status, time and size are worked out.

## In short

**On this page you can**

- Set method, URL, body, params and headers of a request.
- Choose Bearer Token, Basic Auth or inherit authorization from a collection.
- Insert a Data Source key such as {{ds:apiBase}} into the URL.
- Send the request and read status, time, size and body.
- Know exactly what Send sends and what it leaves out.

**How to use it**

1. Pick the HTTP method and type the Request URL .
2. Fill Body , then Authorization and Header in Request settings .
3. Click Save .
4. Click Send and check the status chip and the body.
5. If it fails, read the message in the response area and click Retry .

## Method and URL

| Field | Notes |
| --- | --- |
| **HTTP method** | GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS. See [what Send sends](https://docs.smartestqa.ai/en/api-requests-editor.html#what-send-sends) and [what a run sends](https://docs.smartestqa.ai/en/api-requests-in-tests.html#run-differences): not every method is sent by both. |
| **Request URL** | Up to 2,048 characters. May contain references such as `{{ds:apiBase}}/orders/{{tc:orderId}}`. Pasting a curl command fills the whole request; see [Paste a curl command](https://docs.smartestqa.ai/en/api-requests-library.html#paste-curl). |
| Data source picker (icon in the URL field) | Inserts a [Data Source key](https://docs.smartestqa.ai/en/data-source-variables.html) at the cursor. Tooltip “Data Sources - Global Parameters - Datasets”. |
| **Send** | Sends the request now and shows the response. “Sending...” while it runs. |
| **Save** | Stores the request. “Saving...” while it runs, then “API data saved”. |

## Body

- Choose **raw** or **form-data** under **Body**.
- **raw**: free text with a **Body format** for highlighting: JSON, Text, JavaScript, HTML, XML. The format does not set a header; add `Content-Type` yourself when the API needs something other than JSON.
- **form-data**: rows of **Key**, **Value**, **Description**.
- Use raw for requests you will run in tests: a run sends the raw body. See [What a run does differently](https://docs.smartestqa.ai/en/api-requests-in-tests.html#run-differences).

Example · raw JSON body with references

```json
{
  "email": "{{ds:loginEmail}}",
  "productId": {{excel:products}}_id,
  "quantity": 1
}
```

## Authorization

Open **Request settings** › **Authorization** and choose an **Authorization type**:

| Type | Fields | Adds to the request |
| --- | --- | --- |
| **None** | — | Nothing |
| **Bearer Token** | **Token** (“Enter your Bearer token...”). Accepts `{{ds:apiToken}}`; the picker icon inserts it. | `Authorization: Bearer <token>` |
| **Basic Auth** | **Username** (up to 255 characters), **Password** (up to 128, **Show password** / **Hide password**) | `Authorization: Basic <base64 of user:password>` |
| **Inherit from parent** | Shows “Inherited:” and the parent’s type | The authorization of the nearest collection or folder above that has one |

Token and password are stored encrypted, but everyone who opens the request can read them in these fields. Prefer a reference to an [encrypted key](https://docs.smartestqa.ai/en/data-source-secrets.html#encrypt).

### Inherited authorization

1. **Select the collection or folder**

   Click it in the tree. The middle says “You can set default auth for this collection from the Authorization tab on the right panel…”.
2. **Set its authorization**

   In **Authorization**, choose **Bearer Token** or **Basic Auth** and fill it: “This token will be inherited by all requests in this collection/folder”.
3. **Save Auth**

   Click **Save Auth**.

   “Authorization saved.”
4. **Inherit in the requests**

   In each request, choose **Inherit from parent** and save. If no parent has authorization: “No authorization set on parent collection/folder. Set it there first.”

> **Warning: Inheritance works on this page, not in runs**
>
> **Send** uses the inherited authorization. A test run does not apply **Inherit from parent** or **Basic Auth**. For requests you add to tests, use **Bearer Token** with `{{ds:apiToken}}`, or an `Authorization` header. See [Authorization in runs](https://docs.smartestqa.ai/en/api-requests-in-tests.html#auth-in-runs).

## Params and Header

- Both tabs hold rows of **Key**, **Value**, **Description** with **Enable row** and **Delete row**.
- Rows that are switched off are left out when you save, so they are gone after a reload. Delete them, or keep a copy of the request with [Duplicate](https://docs.smartestqa.ai/en/api-requests-library.html#duplicate).
- **Params** are query parameters. **Send** on this page does not add them to the URL; a test run does. Keep the query in the URL when you want to try it here.
- **Header** values accept references: `X-Api-Key: {{ds:apiKey}}`.

## Save

- **URL required:** “URL is required. Please enter a request URL.”
- **Relative and templated URLs are allowed:** `/api/orders` or `{{ds:apiBase}}/orders` can be saved; a test run fills in the references.
- **[Data Source keys](https://docs.smartestqa.ai/en/data-source-variables.html) must lead to a real address:** when the URL contains a Data Source key and the key’s value does not start with `http://` or `https://`, saving shows “Invalid URL. Please enter the address starting with http:// or https://.”
- **Unsaved changes:** selecting another item or leaving the page asks “Are you sure to exit without saving?” with **Exit without saving**, **Cancel** and **Save and Exit**.
- The name is saved separately, as soon as you leave the name field.

## What Send sends

**Send** works on what is on the screen, saved or not. The request goes out from the SmartestQA server and has 30 seconds to answer.

| Part | Sent as |
| --- | --- |
| URL | [Data Source keys](https://docs.smartestqa.ai/en/data-source-variables.html) in the URL are replaced by their default value (not an environment variant). The result must start with `http://` or `https://`. Other references such as `{{tc:…}}` stay as typed. |
| Method | POST and PUT with the body, DELETE without a body. GET, PATCH, HEAD and OPTIONS are sent as GET. |
| Headers | The rows that are switched on, plus `Content-Type: application/json` unless you set a Content-Type yourself. References in headers stay as typed. |
| Params | Not added. Only the query already in the URL is sent. |
| Body | raw: the text as typed. form-data: a JSON object made of the rows that are switched on. |
| Authorization | Bearer, Basic, or the inherited one. A reference in the token stays as typed. |

To try a request with references and real values, use **Send** on its [API step](https://docs.smartestqa.ai/en/automate-steps-api.html) in Automate, which asks for test values, or a [Dry Run](https://docs.smartestqa.ai/en/automate-dry-run.html). See [Try the step](https://docs.smartestqa.ai/en/api-requests-in-tests.html#try-in-step).

## Read the response

- **Status chip:** the code and its name, for example “201 Created”. Any status is a successful Send: 404 and 500 are answers too.
- **Time and size** next to the chip; see [below](https://docs.smartestqa.ai/en/api-requests-editor.html#response-numbers).
- ****Response format**:** JSON (pretty-printed when the body is valid JSON), XML, HTML, Text, JavaScript. It changes the display only.
- **Errors** appear in the response area under “Could not send the request”, with **Retry** for network errors. See [Troubleshooting › Send](https://docs.smartestqa.ai/en/api-requests-troubleshooting.html#send).
- Selecting another request or leaving the page cancels a request that is still running.

### How status, time and size are worked out

**Status chip colour** — Shown in: Response header

```text
2xx → ok (green)   3xx → info (blue)   4xx → warning (amber)   5xx → error (red)
```

**Example:** 200 OK, 401 Unauthorized, 503 Service Unavailable. A 401 is shown in amber, not red: the API answered, but refused.

**Time** — Shown in: Response header, in ms

```text
time = moment the answer reached your browser − moment you clicked Send     (rounded to whole ms)
```

**Example:** the API needs 180 ms, the trip from the SmartestQA server to the API and back to your browser adds 132 ms: the chip shows 312 ms. It is not the API’s own response time; use it to compare, not to measure performance.

**Size** — Shown in: Response header

```text
bytes = length of the response body in UTF-8
size  = bytes "B"                       if bytes < 1,024
      = bytes ÷ 1,024 "KB"              1 decimal below 10 KB, whole above
      = bytes ÷ 1,048,576 "MB"          1 decimal
```

**Example:** a body of 1,250 bytes shows 1.2 KB; 52,000 bytes show 51 KB. Headers are not counted.

## If something goes wrong

- [“…to send it directly from here, the URL must start with http:// or https://.”](https://docs.smartestqa.ai/en/api-requests-troubleshooting.html#fix-send-requires-http)
- [“The request timed out (30s). The target did not respond.”](https://docs.smartestqa.ai/en/api-requests-troubleshooting.html#fix-timeout)
- [“No authorization set on parent collection/folder…”](https://docs.smartestqa.ai/en/api-requests-troubleshooting.html#fix-no-auth-on-parent)
- [PATCH or HEAD behaves like GET on this page](https://docs.smartestqa.ai/en/api-requests-troubleshooting.html#fix-patch-as-get)
