Send API Request

Simplify API testing with Requestly's API client. Send HTTP and GraphQL requests, view responses, and add parameters.

The API client in Requestly allows you to easily send API requests, such as HTTP and GraphQL, without the need for writing code or using a terminal. It lets you test APIs, retrieve data, and explore how they work by simply creating a request, clicking Send, and viewing the response within Requestly.

This feature is perfect for developers testing API endpoints during development, QA engineers validating API responses for edge cases, and support engineers debugging API issues in real-time.

Send Your First API Request

Step 1: Open API Client and Create a New Request

Click the API Client link in the left sidebar of the Requestly application, then click the + New button to create a new request and select Request from the menu.

The image shows the Requestly interface with the "New" button highlighted, displaying options: "Request," "Collection," and "Environment" in a dropdown menu.

Step 2: Name Your API Request

Choose a descriptive title for your request to make it easy to identify later.

The image shows the Requestly interface's new request creation flow, with an input field for entering the request name, labeled "Send API Request".

Step 3: Enter the API URL and HTTP Method

Pick the HTTP method (e.g., GET, POST) and type the URL of the API you want to test.

Step 4: Save & Send the Request

Click the Save & Send button to execute your request.

The image shows the Requestly API client interface with a POST request to https://app.requestly.io/echo and the "Send" button towards the top right corner highlighted for executing the request.


Response

1. View the Response Body

Once the request is sent, check the response body in the Response Body section. You can switch between formatted (pretty) and raw views.

Response Body - Send API Request

2. Check the Response Headers

Review the headers sent back by the server in the Headers tab.

Response Headers - Send API Request


Query Parameters

In the Query Params section, you can add query parameters as key-value pairs to send extra information with the URL. To add more parameters, click on the + Add More button.

For example:

  • Adding uid=123 to https://app.requestly.io/echo results in: https://app.requestly.io/echo?uid=123

The checkboxes next to each parameter let you include or exclude them without deleting them. For instance, if you uncheck the Key parameter, the final URL will not include it

Query Param - Send API Request


Request Body

For POST or PUT requests, use the Body tab to send data:

  • RAW: Send raw data.

  • JSON: Send data in JSON format.

  • Form: Send key-value form data. The system automatically sets headers like Content-Type, but you can adjust these in the Headers tab.

Request Body - Send API Request


Headers

The Headers tab allows you to include additional information in your API request. Headers are key-value pairs that provide essential details for the request, such as authentication tokens, content type, or other metadata required by the API. To add more headers, click on the + Add More button.

For example: You can add headers like Authorization: Bearer <token> to authenticate your request, or Content-Type: application/json to specify the format of the data you're sending.

The checkboxes next to each parameter let you include or exclude them without deleting them. For instance, if you uncheck the Key parameter, the final URL will not include it

Headers - Send API Request


Scripts

  • Pre-Scripts: Execute code before sending the request, like generating tokens or setting dynamic headers.

  • Post-Scripts: Execute code after receiving the response, useful for processing or saving the response data.

Scripts - Send API Request

To learn more about using scripts visit Scripts Documentation.

Updated on