Skip to navigation

AddRule

View as Markdown

Adds a new rule for the application.

Allowed roles: Owner, Admin, Developer.

Example request: Add a new rule.

Authentication

AuthorizationBearer

Voximplant Management API uses signed JWT tokens generated from your service-account private key. Pass the token in the Authorization header as a Bearer value:

Authorization: Bearer $VOXIMPLANT_TOKEN

See Authorization for ready-to-copy snippets in bash, Python, Node.js and Go that turn your credentials.json into a token.

Query parameters

application_idintegerOptional

The application ID. Required unless application_name is provided.

application_namestringOptional

The application name. Required unless application_id is provided.

rule_namestringRequired
The rule name. The length must be less than 100
rule_patternstringRequired
The rule pattern regex. The length must be less than 64 KB
rule_pattern_excludestringOptional
The exclude pattern regex. The length must be less than 64 KB
video_conferencebooleanOptionalDefaults to false
Whether video conference is required
bind_key_idstringOptional

The service account ID to bind to the rule. Read more in the guide

scenario_idlist of integersOptional

The scenario ID list separated by semicolons (;). Required unless scenario_name is provided.

scenario_namelist of stringsOptional

The scenario name list separated by semicolons (;). Required unless scenario_id is provided.

Response

Successful response
resultintegerOptional
Returns 1 if the request has been completed successfully
rule_idintegerOptional
The new rule ID