Search
Close this search box.

< / >

APIs Campaign

13. Delete Campaign

URL:

https://wv{{wolkvox_server}}.wolkvox.com/api/v2/campaign.php?api=delete_campaign&type_campaign={{type_campaign}}&campaign_id={{campaign_id}}

Description:

This API deletes specific campaigns according to your needs, providing a programmatic and efficient way to carry out this action. You can delete both predictive and preview type campaigns.

Benefit:

The API for deleting specific campaigns offers the benefit of automating and streamlining campaign management by providing users with an efficient way to programmatically delete campaigns. This automation speeds up cleaning and administrative processes, allowing users to make informed decisions about campaign deletion according to their needs. However, it’s important to remember that this irreversible function requires careful evaluation to ensure the preservation of important data and to make conscious decisions in line with operational objectives.

How does it work?

  • The consumption of this API is done through the DELETE method.
  • Parameters are added in the JSON according to the operation or process to be performed.
  • To consume this API, you must replace {{wolkvox_server}} in the URL with the nomenclature of your operation’s server.
  • The wolkvox-token header must be used to utilize the authorization token.
  • Keep in mind that the same token cannot be consumed simultaneously; therefore, you can program the next API consumption after the successful result of the previous one.
  • Important: Please ensure careful evaluation before consuming this API to delete a campaign. This action is irreversible, so we recommend verifying that no critical data needs to be preserved.

REQUEST

NAME DESCRIPTION TYPE
type_campaign (URL) Campaign type. This field can accept the values “preview” or “predictive”. String
campaign_id Refers to the campaign ID for identification. String

RESPONSE

NAME DESCRIPTION TYPE
code Response code. int
error Error. String
msg Response description. String

Possible response codes
				
					$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://wv{{wolkvox_server}}.wolkvox.com/api/v2/campaign.php?api=delete_campaign&type_campaign={{type_campaign}}&campaign_id={{campaign_id}}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_HTTPHEADER => array(
    'wolkvox_server: {{wolkvox_server}}',
    'wolkvox-token: {{wolkvox-token}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

				
			

RESPONSE

				
					{
    "code": "200",
    "error": null,
    "msg": "Campaign {{campaign_id}} has been deleted."
}
				
			
We use cookies, if you continue browsing we will assume that you agree. You can read more about the use of cookies in our privacy policies and treatment of personal data