create

View as Markdown
### Create Project Rule This endpoint allows the user to create a new rule for a specific project within their account. #### Request Body - `name` (string): The name of the rule. - `action` (string): The action to be performed by the rule (e.g., "block"). - `isActive` (boolean): Indicates whether the rule is active or not. - `condition` (object): The condition that triggers the rule. - `fieldName` (string): The field name to be evaluated. - `predicate` (string): The comparison predicate (e.g., "EQ" for equal). - `value` (string): The value to compare against. - `type` (string): The type of condition (e.g., "criteria"). #### Response `200` with the id of the created custom rule, as a bare JSON string. ``` json "0198c39a-6f1b-7c4e-9a2d-5e8f10b3c7d4" ``` > **Accepted permissions** > `Project → Project → Custom rules → Create` > > **Token scope** > `Project Action`

Authentication

X-Api-Keystring
Personal access token. Create it in your BotBye account under **Profile → Personal Access Tokens**, tick the scopes the endpoints you call require (see each endpoint's **Token scope**), and send the token in the `X-Api-Key` request header. A token works only for the account it was created in.

Path parameters

account_idstringRequired
project_idstringRequired

Request

This endpoint expects an object.

Response headers

Content-Lengthinteger
ConnectionstringOptional

Response

success