I think you can clean up your payload construction a bit. What about just a single literal

```
payload = {
   'api_key' : self.api_key,
   'uuid':get_uuid(),
   'events' : {
       'api': self.events
   }
}
```