Campaign mailings added as an API endpoint to Paubox Marketing
A few weeks ago, we wrote aboutthree things you didn’t know you could do with Paubox Marketing API. In a nutshell, the Paubox Marketing API is a...
1 min read
Hoala Greevy
June 10, 2022
Last week we wrote about how we extended the functionality of the Paubox Marketing API by adding campaign mailings as an API endpoint.
This week we're going to cover how to add and delete contacts in bulk using the Paubox Marketing API.
In a nutshell, the Paubox Marketing API is a growing collection of API endpoints we've exposed to allow customers greater flexibility. The goal here is to make Paubox Marketing, our HIPAA compliant email marketing platform, easier to use.
{
"subscriber_ids" : "[string]", //required - will delete from default subscription list
"subscription_list" : "string" //optional - populate to delete id's from specific list
}
Now let's see some Ruby:
def bulk_create
unless params[:subscribers]&.present?
render json: {}
return
end
subs = SubscribersCreator.call(
api_customer: @api_customer,
subscribers_data: params[:subscribers],
subscription_list_id: params[:subscription_list_id],
email: params[:email]
)
num_subscribers_added = subs[:created_count]
render json: {
data: {
num_subscribers_added: num_subscribers_added,
errors: subs[:errors]
}
}
end
def bulk_delete
unless params[:subscriber_ids]
render json: {}
return
end
SubscribersDeleter.call(
api_customer: @api_customer,
subscriber_ids: params[:subscriber_ids],
subscription_list_id: params[:subscription_list_id]
)
render json: {}
end
Paubox Marketing is HITRUST CSF certified and is free to use for up to 100 contacts. The free plan also includes a business associate agreement.
A few weeks ago, we wrote aboutthree things you didn’t know you could do with Paubox Marketing API. In a nutshell, the Paubox Marketing API is a...
The Paubox Marketing API is a growing collection of API endpoints we’ve exposed to allow customers greater flexibility to Paubox Marketing, our HIPAA...
Earlier this month, we shared our API first approach to HIPAA compliant marketing automation. In essence, we outlined how we're building API...
Every Friday we bring you the most important news from Paubox. Our aim is to make you smarter, faster.