Skip to main content

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

ParameterTypeDescriptionRequiredDefault Value
nameStringThe name of the group to be created.Yes-
statusStringThe status of the group. Options: Active, Inactive.NoActive
isFavouriteBooleanPins the group (true or false).Nofalse

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 CodeDescription
200Group created successfully.
400Invalid group payload.
401Unauthorized action.
500Server error.
I