Use REST API Tester

Enter your data below to use the REST API Tester

📌 Try these examples:
RESULT

Last updated

GET Request

Fetch a list of users from a REST API:

Method: GET
URL: https://api.example.com/users?page=1&limit=10

Headers:
  Accept: application/json
  Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Response (200 OK):
{
  "data": [
    { "id": 1, "name": "Sarah Bennett", "email": "sarah@example.com" },
    { "id": 2, "name": "Marcus Webb", "email": "marcus@example.com" }
  ],
  "total": 42,
  "page": 1,
  "limit": 10
}

POST Request with JSON Body

Create a new resource:

Method: POST
URL: https://api.example.com/users
Headers:
  Content-Type: application/json
  Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Body:
{
  "name": "Priya Sharma",
  "email": "priya@example.com",
  "role": "user"
}

Response (201 Created):
{
  "id": 43,
  "name": "Priya Sharma",
  "email": "priya@example.com",
  "role": "user",
  "createdAt": "2026-03-17T14:23:01Z"
}

Basic Authentication

Authenticate with username and password:

Method: GET
URL: https://api.example.com/protected
Auth type: Basic Auth
Username: admin
Password: secret123

Generated header:
  Authorization: Basic YWRtaW46c2VjcmV0MTIz

Bearer Token Authentication

Method: GET
URL: https://api.example.com/profile
Auth type: Bearer Token
Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAxIn0.abc123

Generated header:
  Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

API Key Authentication

Method: GET
URL: https://api.example.com/data
Auth type: API Key
Key name: X-API-Key
Key value: sk_live_aK7mPx3nQr9wLt2v

Generated header:
  X-API-Key: sk_live_aK7mPx3nQr9wLt2v

Or as a query parameter:
  https://api.example.com/data?api_key=sk_live_aK7mPx3nQr9wLt2v

Environment Variables

Define variables to reuse across requests:

Environment: Development
Variables:
  BASE_URL = https://dev-api.example.com
  API_KEY  = sk_test_aK7mPx3nQr9wLt2v
  USER_ID  = 1001

Usage in requests:
  URL: {{BASE_URL}}/users/{{USER_ID}}
  Header: X-API-Key: {{API_KEY}}

Switch to Production environment:
  BASE_URL = https://api.example.com
  API_KEY  = sk_live_BcDeFgHiJkLmNoP

Generated Code Snippets

The tester generates equivalent code for the same request in multiple languages:

JavaScript (fetch):
  const response = await fetch('https://api.example.com/users', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer TOKEN'
    },
    body: JSON.stringify({ name: 'Priya Sharma', email: 'priya@example.com' })
  });

Python (requests):
  import requests
  response = requests.post(
    'https://api.example.com/users',
    headers={'Authorization': 'Bearer TOKEN'},
    json={'name': 'Priya Sharma', 'email': 'priya@example.com'}
  )

curl:
  curl -X POST https://api.example.com/users \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer TOKEN" \
    -d '{"name":"Priya Sharma","email":"priya@example.com"}'

Test Script — Automated Assertions

Write test scripts that run after the response is received:

// Test script (runs after response)
const response = pm.response;

// Assert status code
pm.test("Status is 201", () => {
  pm.expect(response.status).to.equal(201);
});

// Assert response body
pm.test("User has an ID", () => {
  const body = response.json();
  pm.expect(body.id).to.be.a('number');
});

// Save ID for use in next request
pm.environment.set("NEW_USER_ID", response.json().id);

GraphQL Request

Method: POST
URL: https://api.example.com/graphql
Headers:
  Content-Type: application/json

Body:
{
  "query": "query GetUser($id: ID!) { user(id: $id) { name email role } }",
  "variables": { "id": "1001" }
}

Response:
{
  "data": {
    "user": { "name": "Sarah Bennett", "email": "sarah@example.com", "role": "admin" }
  }
}

Examples

PUT Request — Full Update

Replace an entire resource:

Method: PUT
URL: https://api.example.com/users/43
Headers:
  Content-Type: application/json

Body:
{
  "name": "Priya Sharma",
  "email": "priya.sharma@example.com",
  "role": "admin"
}

Response (200 OK):
{ "id": 43, "name": "Priya Sharma", "email": "priya.sharma@example.com", "role": "admin" }

PATCH Request — Partial Update

Update only specific fields:

Method: PATCH
URL: https://api.example.com/users/43
Headers:
  Content-Type: application/json

Body:
{ "role": "admin" }

Response (200 OK):
{ "id": 43, "name": "Priya Sharma", "email": "priya@example.com", "role": "admin" }

DELETE Request

Method: DELETE
URL: https://api.example.com/users/43
Headers:
  Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Response (204 No Content):
  [empty body]

Frequently Asked Questions

Simply enter your data, click the process button, and get instant results. All processing happens in your browser for maximum privacy and security.

Yes! REST API Tester is completely free to use with no registration required. All processing is done client-side in your browser.

Absolutely! All processing happens locally in your browser. Your data never leaves your device, ensuring complete privacy and security.