Getting Started
Getting Started
Installation
Installation
Inspect Traffic
Inspect Traffic
HTTP Rules (Modify Traffic)
HTTP Rules (Modify Traffic)
Overview
Request Modification β Redirect URL (Map Local, Map Remote)
Request Modification β Replace Strings (Switch Hosts, API Endpoints)
Request Modification β Modify Headers
Request Modification β Modify Request Body
Response Modification β Modify Response Body
Request Modification β Modify Query Params
Request Modification β Modify User Agents
Request Modification β Delay Request
Request Modification β Map Local
Request Modification β Map Remote
Response Modification β Modify DOM/Inject scripts
Response Modification β Cancel Rule
Predefined Functions
Organizing Rule β Grouping
Organizing Rule β Import/Export Rules from File
Organizing Rule β Pause/Resume Requestly
Organizing Rule β Rule Operators
Organizing Rule β Advance Targeting
Organizing Rule β Sharing Rules
Organizing Rule β Pinning Rules
GraphQL - Modify Request & Response
Import / Export β Charles Proxy Rules
Test Rules β Test URL Condition
Test Rules β Test this Rule
Session Book
Session Book
File Server
File Server
Public API
Public API
Guides
Guides
TroubleShooting
TroubleShooting
Subscription & Billing
Subscription & Billing
Getting Started
Getting Started
Installation
Installation
Inspect Traffic
Inspect Traffic
HTTP Rules (Modify Traffic)
HTTP Rules (Modify Traffic)
Overview
Request Modification β Redirect URL (Map Local, Map Remote)
Request Modification β Replace Strings (Switch Hosts, API Endpoints)
Request Modification β Modify Headers
Request Modification β Modify Request Body
Response Modification β Modify Response Body
Request Modification β Modify Query Params
Response Modification β Modify DOM/Inject scripts
Request Modification β Modify User Agents
Request Modification β Delay Request
Response Modification β Cancel Rule
Organizing Rule β Grouping
Organizing Rule β Import/Export Rules from File
Organizing Rule β Pause/Resume Requestly
Organizing Rule β Rule Operators
Organizing Rule β Advance Targeting
Organizing Rule β Sharing Rules
Request Modification β Map Local
Request Modification β Map Remote
Organizing Rule β Pinning Rules
GraphQL - Modify Request & Response
Import / Export β Charles Proxy Rules
Test Rules β Test URL Condition
Predefined Functions
Test Rules β Test this Rule
File Server
File Server
Public API
Public API
Guides
Guides
Session Book
Session Book
Subscription & Billing
Subscription & Billing
Β
Authentication
To authenticate with the API, use the custom header
x-api-key
with your provided API key.Example:
curl -H "x-api-key: YOUR_API_KEY" https://api2.requestly.io/v1/rules
Requestly API is currently in
BETA
. Fill this form to get your API key today.Endpoints
The current APIs give all the basic crud capabilities for rules and groups. In case you want to quickly try these out on this playground https://requestly.readme.io/
Retrieve Groups
Get All Groups
Endpoint:
GET /groups
CURL Example:
curl -H "x-api-key: YOUR_API_KEY" https://api2.requestly.io/v1/groups
Sample Response:
{ "success": true, "data": [ { "createdBy": "Gw9geGxr4aWejyB1erPKMnyFNNZW", "creationDate": 1707893324459, "currentOwner": "Gw9geGxr4aWejyB1erPKMnyFNNZW", "description": "", "groupId": "", "id": "Cancel_jcgzx", "isSample": false, "lastModifiedBy": "Gw9geGxr4aWejyB1erPKMnyFNNZW", "modificationDate": 1707893326371, "name": "cancel-1707893324464", "objectType": "rule", "pairs": [ { "id": "vr1e2", "source": { "key": "Url", "operator": "Contains", "value": "sdfa" } } ], "ruleType": "Cancel", "status": "Active" }, // other groups ] }
Get a Specific Group
Endpoint:
GET /groups/:id
CURL Example:
curl -H "x-api-key: YOUR_API_KEY" https://api2.requestly.io/v1/groups/Group_1a2b3c
Sample Response:
{ "success": true, "data": { "id": "Group_4bfu8", "creationDate": 1707893421467, "modificationDate": 1707894488025, "createdBy": "Gw9geGxr4aWejyB1erPKMnyFNNZW", "lastModifiedBy": "Gw9geGxr4aWejyB1erPKMnyFNNZW", "name": "now this is active", "objectType": "group", "status": "Active", "isFavourite": false } }
Create a Group
Endpoint:
POST /groups
CURL Example:
curl -X POST -H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" -d '{ "name": "New Awesome Group", "status": "Active" }' https://api2.requestly.io/v1/groups
Sample Response:
{ "success": true, "data": { "id": "Group_08j61", "creationDate": 1707894094078, "modificationDate": 1707894094078, "createdBy": "Gw9geGxr4aWejyB1erPKMnyFNNZW", "lastModifiedBy": "Gw9geGxr4aWejyB1erPKMnyFNNZW", "name": "New Awesome Group", "objectType": "group", "status": "Active", "isFavourite": false, "currentOwnerId": "Gw9geGxr4aWejyB1erPKMnyFNNZW" }}
Update a Group
Endpoint:
PUT /groups/:id
CURL Example:
curl -X PUT -H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" -d '{ "name": "Updated Group Name", "status": "Inactive" }' https://api2.requestly.io/v1/groups/Group_1a2b3c
Sample Response:
{ "success": true, "data": { "id": "Group_1a2b3c", "creationDate": 1707893421467, "modificationDate": 1707894488025, "createdBy": "Gw9geGxr4aWejyB1erPKMnyFNNZW", "lastModifiedBy": "Gw9geGxr4aWejyB1erPKMnyFNNZW", "name": "Updated Group Name", "objectType": "group", "status": "Inactive", "isFavourite": false } }
Delete a Group
Endpoint:
DELETE /groups/:id
CURL Example:
curl -X DELETE -H "x-api-key: YOUR_API_KEY" https://api2.requestly.io/v1/groups/Group_1a2b3c
Sample Response:
{ "success": true, "message": "Group successfully deleted." }
Possible Errors
- Group not found: The specified group does not exist.
- Unauthorized action: You do not have access to the specified group.
- Invalid Group Id: The provided group ID is invalid.
- Invalid Group Payload: The entire group payload is invalid.
- Group Name Required: A group name is required.
Each error returns a response in the format:
{ "success": false, "message": "Error message here." }