API request builder and test workspace

An API request is a method, URL, headers, and optional body sent to an endpoint; curl and fetch are two common ways to send one from a terminal or JavaScript.

Draft an API request with headers, params and a JSON body, get curl and fetch snippets, and test assertions on a sample response. Runs in your browser.

Browser-sideNo accountCopy, download, or print

Last reviewed

Your inputs are saved as a draft in this browser only. Nothing is uploaded.

Jump to result
Interactive workspace

Inputs

Result

More export options

MethodGET
Authbearer
Assertions passed3 / 3
Response bodyvalid JSON

Assertion results

AssertionResultDetail
status == 200passexpected status 200
body.data is arraypassresolved [{"customerId":"C-1001","name":"Acme Manufacturing"}]
body.meta.count >= 1passresolved 1
response time < 500msskippedNo runtime timing in the browser preview.
curl:

curl -X GET 'https://api.example.com/customers?limit=25&include=orders' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

fetch:

await fetch("https://api.example.com/customers?limit=25&include=orders", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json",
    "Accept": "application/json"
  },
});

How to use it

  1. Choose the method and endpoint, then pick an auth type such as bearer token, API key header, or basic auth.
  2. Add headers as name: value and query params as name=value; params are merged into the final request URL.
  3. Paste the JSON request body, the expected status code, and a sample response body to validate.
  4. Write assertions like status == 200 or body.data is array, then copy the generated curl and fetch snippets.

Questions

Does the workspace actually send the API request?
No. It drafts the request and generates matching curl and fetch snippets for you to run in your own terminal or code. Assertions are evaluated against the expected status code and the sample response body you paste.
What assertion syntax can I use?
Status checks like status == 200, path comparisons like body.meta.count >= 1 using ==, !=, >=, <=, >, or <, and type checks like body.data is array, object, string, number, boolean, null, or present. Response-time assertions are listed but skipped because the browser preview has no runtime timing.
Is my API token or request data uploaded?
No. The workspace runs entirely in your browser and nothing is uploaded. If you prefer, keep placeholders like <token> in the Authorization header instead of a real credential.
How are query params added to the URL?
Each name=value line is URL-encoded and appended to the endpoint, so https://api.example.com/customers with limit=25 becomes https://api.example.com/customers?limit=25. If the endpoint already has a query string, the params are added after it with &.