Create A New Group

Learn how to create groups in Requestly's API for better rule organization and management


This endpoint allows you to create a new group in your Requestly account. Groups help in organizing and managing rules efficiently.

For a live view and to test this API interactively, visit the API Playground.


Endpoint

  • Method: POST

  • URL: https://api2.requestly.io/v1/groups


Body Parameters

Parameter

Type

Description

Required

Default Value

name

String

The name of the group to be created.

Yes

-

status

String

The status of the group. Options: Active, Inactive.

No

Active

isFavourite

Boolean

Pins the group (true or false).

No

false


cURL Request

curl --request POST \
  --url https://api2.requestly.io/v1/groups \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'x-api-key: your_api_key' \
  --data '{
    "name": "Group",
    "status": "Active",
    "isFavourite": false
  }'

Sample Response

{
  "success": true,
  "data": {
    "id": "Group_qrszh",
    "creationDate": 1736059835086,
    "modificationDate": 1736059835086,
    "createdBy": "IUAGkRiEx6XI0B6qCc82qbwroKX2",
    "lastModifiedBy": "IUAGkRiEx6XI0B6qCc82qbwroKX2",
    "name": "Group",
    "objectType": "group",
    "status": "Inactive",
    "isFavourite": false,
    "currentOwnerId": "IUAGkRiEx6XI0B6qCc82qbwroKX2"
  }
}

Response Codes

Status Code

Description

200

Group created successfully.

400

Invalid group payload.

401

Unauthorized action.

500

Server error.

Updated on