create

View as Markdown
### POST /api/v1/{account_id}/projects/{project_id}/rate_limiters This endpoint is used to create a rate limiter for a specific project within an account. #### Request The request body should be in JSON format and include the following parameters: - `name` (string): The name of the rate limiter. - `action` (string): The action to be taken when the rate limit is reached. - `isActive` (boolean): Indicates whether the rate limiter is active. - `condition` (object): An object containing the condition for the rate limiter, including fieldName, predicate, value, and type. - `periodInSec` (integer): The time period in seconds for the rate limiter. - `limit` (integer): The limit for the rate limiter. #### Response `200` with the id of the created rate limiter, as a bare JSON string. ``` json "0198c39a-6f1b-7c4e-9a2d-5e8f10b3c7d4" ``` > **Accepted permissions** > `Project → Project → Rate limiting 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

Errors

400
Bad Request Error