DELETE
/point-campaign/:id/Delete point campaign
You can remove a specific point campaign.
| Attributes | Type | Required | Description |
|---|---|---|---|
| id | integer | yes | A unique identifier for the point campaign which is given by User.com |
Request
- CURL
- JavaScript
- PHP
- Python
curl --location --request DELETE 'https://<your_app_subdomain>.user.com/api/public/point-campaign/1/' \
--header 'accept: application/json' \
--header 'Authorization: Token <your_64_char_api_key>' \
--header 'Accept: */*; version=2'
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open(
"DELETE",
"https://<your_app_subdomain>.user.com/api/public/point-campaign/1/"
);
xhr.setRequestHeader("accept", "application/json");
xhr.setRequestHeader("Authorization", "Token <your_64_char_api_key>");
xhr.setRequestHeader("Accept", "*/*; version=2");
xhr.send();
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://<your_app_subdomain>.user.com/api/public/point-campaign/1/',
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(
'accept: application/json',
'Authorization: Token <your_64_char_api_key>',
'Accept: */*; version=2'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://<your_app_subdomain>.user.com/api/public/point-campaign/1/"
payload={}
headers = {
'accept': 'application/json',
'Authorization': 'Token <your_64_char_api_key>',
'Accept': '*/*; version=2'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)