# A problem occurred while creating rules. Please let me know what is the problem!

**URL:** <https://community.smartthings.com/t/a-problem-occurred-while-creating-rules-please-let-me-know-what-is-the-problem/284514>\
**Category:** Support\
**Tags:** rules-api\
**Created:** [July 18, 2024, 1:11am UTC](https://community.smartthings.com/t/a-problem-occurred-while-creating-rules-please-let-me-know-what-is-the-problem/284514 "2024-07-18T01:11:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yongbin\_kim](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/yongbin_kim/32/200642_2.png) [@yongbin\_kim](https://community.smartthings.com/u/yongbin_kim)\
**Post date:** [July 18, 2024, 1:11am UTC](https://community.smartthings.com/t/a-problem-occurred-while-creating-rules-please-let-me-know-what-is-the-problem/284514/1 "2024-07-18T01:11:23Z")

</div>

```json
{
 "name": "every7AM. turn on light",
 "actions": [
   {
     "every": {
       "specific": {
         "daysOfWeek": [
           "Sun",
           "Mon",
           "Tue",
           "Wed",
           "Thu",
           "Fri",
           "Sat"
         ],
         "reference": "Midnight",
         "offset": {
           "value": {
             "integer": 420,
             "type": "integer"
           },
           "unit": "Minute"
         }
       },
       "actions": [
         {
           "command": {
             "devices": [
               "<deviceID>"
             ],
             "commands": [
               {
                 "component": "main",
                 "capability": "switch",
                 "command": "on"
               }
             ]
           },
           "type": "command"
         },
         {
           "command": {
             "devices": [
               "<deviceID>"
             ],
             "commands": [
               {
                 "component": "main",
                 "capability": "switch",
                 "command": "on"
               },
               {
                 "component": "main",
                 "capability": "airConditionerMode",
                 "command": "setAirConditionerMode",
                 "arguments": [
                   {
                     "string": "cool",
                     "type": "string"
                   }
                 ]
               },
               {
                 "component": "main",
                 "capability": "thermostatCoolingSetpoint",
                 "command": "setCoolingSetpoint",
                 "arguments": [
                   {
                     "integer": 23,
                     "type": "integer"
                   }
                 ]
               }
             ]
           },
           "type": "command"
         }
       ],
       "sequence": {
         "actions": "Parallel"
       }
     },
     "type": "every"
   }
 ]
}

```

when i tried to create rule, the error message below is output.

```json
{
    "error": {
        "code": "ConstraintViolationError",
        "message": "The request is malformed.",
        "details": [
            {
                "code": "BodyMalformedError",
                "target": "type",
                "message": "Unrecognized field \"type\" (class v20190122.internal.st.behaviors.Operand), not marked as ignorable",
                "details": []
            }
        ]
    }
}

```

I know the approximate cause, but I don’t know what part to fix specifically. help please!

---

<div class="post-metadata">

**Author:** ![yongbin\_kim](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/yongbin_kim/32/200642_2.png) [@yongbin\_kim](https://community.smartthings.com/u/yongbin_kim)\
**Post date:** [July 18, 2024, 1:23am UTC](https://community.smartthings.com/t/a-problem-occurred-while-creating-rules-please-let-me-know-what-is-the-problem/284514/2 "2024-07-18T01:23:24Z")

</div>

I found out why!  
rules api doesn’t support “type”.  
so i removed all “type” elements, then i receive “200 OK”! 🙂
