For the complete documentation index, see llms.txt. This page is also available as Markdown.

Cancel a Scheduled Send

This request is used to cancel the scheduled sending of a voice message or voice SMS

URL

DELETE https://api.voicepartner.fr/v1/campaign/cancel

Required Parameters

Name
Value

campaignId

Message ID

Requests

<?php

// Enable error display for debugging
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

// The API URL to cancel the campaign
$apiKey = 'YOUR_API_KEY'; // Replace with your actual API key
$campaignId = 'CAMPAIGN_ID'; // Replace with the actual campaign ID

// Build the URL with the API key and campaign ID
$url = "https://api.voicepartner.fr/v1/campaign/cancel/$apiKey/$campaignId";

// Initialize cURL
$curl = curl_init($url);

// Configure cURL options for a DELETE request
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
    'Cache-Control: no-cache'
));

// Execute the cURL request and store the response
$response = curl_exec($curl);

// Check whether an error occurred during the request
if (curl_errno($curl)) {
    echo 'cURL Error: ' . curl_error($curl);
} else {
    // Display the response
    echo 'Response: ' . $response;
}

// Close the cURL session
curl_close($curl);

Response

Error Codes

Response Code
Message

400

Bad request

401

Action not authorized

404

Resource not authorized

200

Everything went fine!

Last updated