Link

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 POST request to our /blast endpoint. Your request body must contain a minimum

    $ 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 reply_to_email address must match the domain of the verified reply-to email address for newsletters.

Blast Statuses

There are 4 different Blast Status IDs that can be used to fulfill the status id field in a Blast request body. These status values control what happens to a Blast when it is created or updated.

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 /blast_status endpoint using a GET request:

    $ 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 GET request to hit our /blast endpoint:

    $ curl --request GET 'api.cerkl.com/v3/blast' \
        --header 'Authorization: Bearer {ACCESS_TOKEN}'

To retrieve a specific Blast, simply append the id (12345 in this example) of an existing Blast to the previous request URL to make use of our /blast/{id} endpoint:

    $ 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 id (12345 in our example) and make a PUT request to the /blast/{id} endpoint:

    $ 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 DELETE request to the /blast/{id} endpoint using the Blast’s id value. If we stick with our Blast id = 12345 example, it should look something like this:

    $ curl --request DELETE 'api.cerkl.com/v3/blast/12345' \
        --header 'Authorization: Bearer {ACCESS_TOKEN}'