---
title: "Create multiple rules"
method: POST
path: "/participant-pools/{participantPoolId}/rules/bulk-create"
tags: ["Rules"]
---

# Create multiple rules

`POST /participant-pools/{participantPoolId}/rules/bulk-create`

## Request

- Base URL: `https://rest.api.pactima.com/v1`
- URL: `https://rest.api.pactima.com/v1/participant-pools/{participantPoolId}/rules/bulk-create`
- Auth: HTTP bearer

Create multiple rules for the participant pool

## Request body

- object
  - `rules` ParticipantPoolRule[], required
    - `id` string: Unique identifier for the rule
    - `name` string, required: Human-readable rule name (e.g., "department", "experience_years")
    - `description` string: Detailed description of what this rule validates
    - `dataType` 'STRING' | 'NUMBER' | 'BOOLEAN' | 'DATE', required: Data type for participant pool rule values
    - `selectionMode` 'SINGLE' | 'MULTIPLE' | 'RANGE' | 'FREEFORM', required: Selection mode for participant pool rule values
    - `allowedValues` union[]: Predefined values for SINGLE/MULTIPLE selection modes
      - union
        - string
        - number
        - boolean
    - `values` union[]: Actual selected/assigned values for this rule instance
      - union
        - string
        - number
        - boolean
    - `constraints` ParticipantPoolRuleConstraints: Additional validation constraints for Participant Pools - Rules
      - `minValue` number: Minimum numeric value (for NUMBER dataType)
      - `maxValue` number: Maximum numeric value (for NUMBER dataType)
      - `minLength` integer: Minimum string length (for STRING dataType)
      - `maxLength` integer: Maximum string length (for STRING dataType)
      - `pattern` string: Regular expression pattern for string validation (for STRING dataType)
      - `minDate` string, date: Minimum date value (for DATE dataType)
      - `maxDate` string, date: Maximum date value (for DATE dataType)
    - `createdAt` string, date-time: Timestamp when the rule was created
    - `updatedAt` string, date-time: Timestamp when the rule was last updated
    - `isEditable` boolean: Whether this rule is editable

## Response `201`

Returns an object with a `data` property containing an array of rule objects if they were successfully created.

- object
  - `data` ParticipantPoolRule[]
    - `id` string: Unique identifier for the rule
    - `name` string, required: Human-readable rule name (e.g., "department", "experience_years")
    - `description` string: Detailed description of what this rule validates
    - `dataType` 'STRING' | 'NUMBER' | 'BOOLEAN' | 'DATE', required: Data type for participant pool rule values
    - `selectionMode` 'SINGLE' | 'MULTIPLE' | 'RANGE' | 'FREEFORM', required: Selection mode for participant pool rule values
    - `allowedValues` union[]: Predefined values for SINGLE/MULTIPLE selection modes
      - union
        - string
        - number
        - boolean
    - `values` union[]: Actual selected/assigned values for this rule instance
      - union
        - string
        - number
        - boolean
    - `constraints` ParticipantPoolRuleConstraints: Additional validation constraints for Participant Pools - Rules
      - `minValue` number: Minimum numeric value (for NUMBER dataType)
      - `maxValue` number: Maximum numeric value (for NUMBER dataType)
      - `minLength` integer: Minimum string length (for STRING dataType)
      - `maxLength` integer: Maximum string length (for STRING dataType)
      - `pattern` string: Regular expression pattern for string validation (for STRING dataType)
      - `minDate` string, date: Minimum date value (for DATE dataType)
      - `maxDate` string, date: Maximum date value (for DATE dataType)
    - `createdAt` string, date-time: Timestamp when the rule was created
    - `updatedAt` string, date-time: Timestamp when the rule was last updated
    - `isEditable` boolean: Whether this rule is editable

---

[API](https://skmtc.dev/pactima/apis/participant-pools-api.md) - [All operations](https://skmtc.dev/pactima/apis/participant-pools-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pactima/apis/participant-pools-api/revisions/43bdfd66fa8c?raw)
