The keys sent to transmissions.send() don't match the SparkPost API documentation. Worse, these mismatched keys aren't documented anywhere, so you have to go into the code to trace down the issue.
For example: model['campaign_id'] = kwargs.get('campaign')
It should just use campaign_id to match the API. Better yet, don't qualify the passed data; just send it to the API.
The keys sent to transmissions.send() don't match the SparkPost API documentation. Worse, these mismatched keys aren't documented anywhere, so you have to go into the code to trace down the issue.
For example:
model['campaign_id'] = kwargs.get('campaign')
It should just use
campaign_id
to match the API. Better yet, don't qualify the passed data; just send it to the API.