Create Layout Rule

POST {{baseUrl}}/api/v1/layouts/:layout_id/layoutRules?name=<string> max chars : 255&fieldName=<string> max chars : 100&fieldConditions=<list>

This API creates a rule for a field in a layout.

OAuth Scope

  • Desk.settings.CREATE

Request Params

KeyDatatypeRequiredDescription
includestringAdditional information related to the rules. Values allowed are: creator and modifier.
namestringName of the rule
descriptionstringA short description of the rule
fieldNamestringName of the primary field to be used for creating the rule
displayLabelstringDisplay Label of the primary field to be used for creating the rule
statusstringActivation status of the rule: ACTIVE or DEACTIVE
executeInHelpCentrestringTo execute the rule in help centre or not: true or false
fieldConditionsstringConditions in the layout rule

HEADERS

KeyDatatypeRequiredDescription
Authorizationstring

RESPONSES

status: OK

{&quot;fieldConditions&quot;:[{&quot;name&quot;:&quot;condition 2&quot;,&quot;pattern&quot;:&quot;(1and2)&quot;,&quot;conditions&quot;:[{&quot;condition&quot;:&quot;is&quot;,&quot;fieldName&quot;:&quot;email&quot;,&quot;value&quot;:[&quot;carol@zylker.com&quot;]},{&quot;condition&quot;:&quot;is&quot;,&quot;fieldName&quot;:&quot;phone&quot;,&quot;value&quot;:[&quot;9993292892&quot;]}],&quot;actions&quot;:{&quot;showSections&quot;:[&quot;Additional Information&quot;],&quot;showFields&quot;:[&quot;subject&quot;],&quot;setMandatoryFields&quot;:[&quot;priority&quot;]}}],&quot;modifiedTime&quot;:&quot;2018-09-14T01:08:42.000Z&quot;,&quot;fieldName&quot;:&quot;email&quot;,&quot;description&quot;:&quot;Rule 2 for layout&quot;,&quot;systemGenerated&quot;:false,&quot;layoutId&quot;:&quot;4000000007723&quot;,&quot;executeInHelpCentre&quot;:true,&quot;createdBy&quot;:&quot;4000000015963&quot;,&quot;name&quot;:&quot;Rule 2&quot;,&quot;createdTime&quot;:&quot;2018-09-14T01:07:22.000Z&quot;,&quot;modifiedBy&quot;:&quot;4000000015963&quot;,&quot;id&quot;:&quot;4000000021001&quot;,&quot;status&quot;:&quot;active&quot;}