api

How to Build and Format an HTTP Request

Use the HTTP Request Builder to construct any REST API request visually and get the equivalent curl command to run or share.

Tool Used

HTTP Request Builder

Open tool
1

Select the HTTP method and enter the URL

Open the HTTP Request Builder tool. Select the HTTP method from the dropdown: GET for retrieving data, POST for creating, PUT for replacing, PATCH for partial updates, DELETE for removing. Enter the full URL of the endpoint including the base URL, path, and any path parameters. For example: https://api.example.com/v1/users/123.

2

Add query parameters

For GET requests or any request with URL query parameters, add them in the Query Parameters section. Enter each key and value in the provided fields — the builder URL-encodes values automatically and appends them to the URL. For example, add page=1 and limit=20 to produce ?page=1&limit=20 in the URL.

3

Add request headers

Add headers in the Headers section. The most important headers are: Content-Type: application/json (required when sending a JSON body), Authorization: Bearer <token> or X-API-Key: <key> for authentication, and Accept: application/json to specify the response format. Add any custom headers required by the specific API.

4

Add the request body

For POST, PUT, and PATCH requests, add the request body in the Body section. Select the content type (JSON, form-encoded, or raw). For JSON, type or paste your JSON object — the builder validates and formats it. For form-encoded, add each key-value pair in the provided fields.

5

Copy the curl command

Click Generate to see the formatted request summary and the equivalent curl command. The curl command includes all headers, the method flag, the URL, and the body with correct escaping. Copy it to run in a terminal, share with a teammate, or use as documentation. The curl command is a complete, self-contained representation of the request that works on any machine.

All done!

You are ready to use HTTP Request Builder like a pro.

Try it now
All guides