Delete a plan (partner-api)
Deletes one of your plans, only when no customer is on it right now (the same rule as Delete in the portal). A plan in use answers 409; deactivate it with is_active false instead. A plan of another partner answers 404; a global Voxbi plan answers 403.
Required scopes: partner-api and partner-plans-write.
Partner API key. A bearer token that a Reseller Admin generates in the partner
portal under Settings, API keys. It belongs to the reseller partner, not to a
person, and carries the scopes ticked at creation time. Send it on every request as
Authorization: Bearer <partner_api_key>.
Every response is confined to the partner the key belongs to. Keep the key secret and call the API from your server only, never from a browser app.
- HTTP Authorization Scheme
bearer- Bearer format
Bearer <partner_api_key>
application/jsonResponses
This API key is missing a required scope.required_scopesarray<string>
This API key is missing a required scope.required_scopesarray<string>
This API key is missing a required scope.required_scopesarray<string>
https://cockpit.voxbi.com/api/v1/api/v1/plans/{plan}
curl -X DELETE 'https://cockpit.voxbi.com/api/v1/api/v1/plans/{plan}' \
-H 'Authorization: Bearer YOUR_TOKEN'
const response = await fetch('https://cockpit.voxbi.com/api/v1/api/v1/plans/{plan}', {
method: 'DELETE',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(data);
import requests
response = requests.delete('https://cockpit.voxbi.com/api/v1/api/v1/plans/{plan}',
headers={'Authorization': f'Bearer {YOUR_TOKEN}'}
)
response.raise_for_status()
data = response.json()
print(data)
<?php
$context = stream_context_create([
'http' => [
'method' => 'DELETE',
'header' => "Content-Type: application/json\r\nAuthorization: Bearer YOUR_TOKEN",
],
]);
$response = file_get_contents('https://cockpit.voxbi.com/api/v1/api/v1/plans/{plan}', false, $context);
$data = json_decode($response, true);
print_r($data);
{ … }
application/json{ … }
"required_scopes": [ … ]
application/json{ … }
application/json{ … }
application/json{ … }
30application/json