---
title: Write a request
project: TotalAPI
version: Latest
section: guides
language: en
license: 
url: https://totaljs.es/docs/totalapi/latest/guides/requests/
updated: 2026-12-02T15:40:11.062Z
---

# Write a request

> A request has a name, a method and an address, and the parts that go with them, each in its tab.

## Add a request

Press the plus next to the name of the collection, or ⌘N on the Mac and Ctrl+N on Windows and Linux. To put it in a folder, right-click the folder and choose **New request here**.

Write its name over **New request**, choose the method and write the address. The methods are GET, POST, PUT, PATCH, DELETE, HEAD and OPTIONS. Only `http` and `https` addresses are sent.

## Its parts

| Tab | What it has |
| --- | --- |
| **Action** | The form of a [Total.js action](/totalapi/latest/guides/total-js-apps/), only in those requests |
| **Query** | What goes after the `?` of the address, as names and values |
| **Headers** | The headers that you add |
| **Body** | What the request sends |
| **Auth** | [How it signs in](/totalapi/latest/guides/sign-in/) |
| **Checks** | [What the answer must be](/totalapi/latest/guides/checks/), and [the values to keep](/totalapi/latest/guides/keep-values/) |
| **Notes** | What the request is for, in your words. Notes are not sent |

In **Query** and **Headers**, press **+ Add** for a new row. The box at its start turns it off without removing it.

## Choose the body

- **No body**: nothing is sent.
- **JSON**: a text that must be valid JSON, or the request is not sent. **Lay out the JSON** writes it in lines. The header `Content-Type: application/json` is added if you did not write another.
- **Text**: any text, with the headers that you write.
- **Form**: names and values, sent as `application/x-www-form-urlencoded`. Files cannot be sent.

[Variables](/totalapi/latest/guides/variables/) work in the address, the query, the headers, the auth and the body.

## Put requests in order

A right click on a request or on a folder opens its menu:

- **Rename…** changes the name.
- **Duplicate** makes a copy next to it, with everything it has.
- **New folder here** adds a folder inside a folder. For one at the top level, choose **New folder** among the commands (⇧⌘P on the Mac, Ctrl+Shift+P on Windows and Linux).
- **Auth…**, in a folder, sets [how its requests sign in](/totalapi/latest/guides/sign-in/#set-it-once-for-many-requests).
- **Remove…** takes it out, after asking.

> There is no way back inside the app. A folder goes with all its requests.
