Creating Alert using python requests

data = {‘default’: True, ‘severity’: ‘ok’, ‘name’: ‘Device rebooted’, ‘rule’: ‘devices.uptime < “300” && macros.device = “1”’, ‘extra’: ‘{“count”: 1}’}

{u’status’: u’error’, u’message’: u’Failed to create new alert rule’}

I am doing a normal post using python requests.I am not able to create the alert rule it is throwing the above error.I really need to create a alert using python request.Can you help me sort it out.