Blasts
Blasts are email communications targeted at a certain group of your Subscribers (or all of them if you're feeling dangerous). While Cerkl's UI provides a complete Blast building experience, you can also generate and manage them programmatically should you choose to do so.
Adding Blasts
To add a Blast, make a
$ curl --request POST 'api.cerkl.com/v3/blast' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--data-raw '{
"template": {
"version": "3.0",
"data": [
{
"status": {
"id": 0
},
"blast_template": {
"id": 0
},
"blast_merge_fields": [
{
"id": 0,
"type": {
"id": 0
},
"value": "string"
}
],
"name": "string",
"reply_to_email": "string",
"reply_to_name": "string",
"subject": "string",
"message": "string",
"target_segments": [
{
"id": 0
}
],
"target_categories": [
{
"id": 0
}
],
"target_conditional": {
"id": 0
},
"date_scheduled_utc": "string"
}
]
}
}'
Note: the domain of the
Blast Statuses
There are 4 different Blast Status IDs that can be used to fulfill the
Blast Status ID | Blast Status Description |
---|---|
1 | Draft |
2 | Sending now |
3 | Scheduled |
4 | Sent |
You can also retrieve these Blast Status ID values using the API by hitting our
$ curl --request GET 'api.cerkl.com/v3/blast_status' \
--header 'Authorization: Bearer {ACCESS_TOKEN}'
Retrieving Blasts
To get all of your organization's Cerkl Blasts, use a
$ curl --request GET 'api.cerkl.com/v3/blast' \
--header 'Authorization: Bearer {ACCESS_TOKEN}'
To retrieve a specific Blast, simply append the
$ curl --request GET 'api.cerkl.com/v3/blast/12345' \
--header 'Authorization: Bearer {ACCESS_TOKEN}'
Updating Blasts
To update an existing Blast, use the same URL pattern ending with the Blast's
$ curl --request PUT 'api.cerkl.com/v3/blast/12345' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--data-raw '{
"template": {
"version": "3.0",
"data": [
{
"status": {
"id": 0
},
"blast_template": {
"id": 0
},
"blast_merge_fields": [
{
"id": 0,
"type": {
"id": 0
},
"value": "string"
}
],
"name": "string",
"reply_to_email": "string",
"reply_to_name": "string",
"subject": "string",
"message": "string",
"target_segments": [
{
"id": 0
}
],
"target_categories": [
{
"id": 0
}
],
"target_conditional": {
"id": 0
},
"date_scheduled_utc": "string"
}
]
}
}'
Deleting Blasts
To delete an existing Blast, simply make a
$ curl --request DELETE 'api.cerkl.com/v3/blast/12345' \
--header 'Authorization: Bearer {ACCESS_TOKEN}'