Created a Restful switch, would like to add it to area

Switch works perfectly, not sure what the YAML should look like to add it to an area.

config:

switch:
 - platform: rest
   name: 'neo pixel rainbow'
   resource: http://ip_address/rainbow
   body_on: 'on'
   body_off: 'off'