Cancel project
This endpoint cancels the project with the provided UUID.
Requirements
Authentication
Scope
Path parameters
id
string
Bunny Studio UUID of the project you want to cancel
Bunny Studio UUID of the project you want to cancel
Request body
status
string
You should use the string "canceled".
You should use the string "canceled".
reason
string
The reason for the cancellation of the project.
The reason for the cancellation of the project.
reasonCode
Request example
- Console
- JavaScript
- Python
- PHP - CURL
curl --request PUT \
--url https://api.bunnystudio.com/projects \
--header "Content-Type: application/json" \
--header "x-access-token: YOUR_TOKEN" \
--data '{
"status": "canceled",
"reason": "Reasons to cancel the project",
"reasonCode": "MAIN_REASON_CODE.SUB_REASON_CODE",
}'
const url = 'https://api.bunnystudio.com/projects';
const options = {
method: 'PUT',
headers: {
'content-type': 'application/json',
'x-access-token': 'YOUR_TOKEN',
}
body: JSON.stringify(
{
"status": "canceled",
"reason": "Reasons to cancel the project",
"reasonCode": "MAIN_REASON_CODE.SUB_REASON_CODE",
}
)
};
fetch(url, options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import requests
import json
api_url = "https://api.bunnystudio.com/projects"
headers = {
"Content-Type": "application/json; charset=utf-8",
'x-access-token': 'YOUR_TOKEN',
}
body = {
"status": "canceled",
"reason": "Reasons to cancel the project",
"reasonCode": "MAIN_REASON_CODE.SUB_REASON_CODE",
}
response = requests.put(api_url, headers=headers, json=body)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.bunnystudio.com/projects',
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => array(
'content-type': 'application/json',
'x-access-token': 'YOUR_TOKEN',
),
CURLOPT_POSTFIELDS => '{
"status": "canceled",
"reason": "Reasons to cancel the project",
"reasonCode": "MAIN_REASON_CODE.SUB_REASON_CODE",
}'
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Response format
id
string
A UUID (Universal Unique Identifier) that identifies the project on Bunny Studio's database. You should use this ID for all API actions related to a specific project.
A UUID (Universal Unique Identifier) that identifies the project on Bunny Studio's database. You should use this ID for all API actions related to a specific project.
title
string
The title of the project you created
The title of the project you created
mainService
string
The voice over category ID (voice_over)
The voice over category ID (voice_over)
fulfillmentType
string
The fulfillment type selected for the project, the options are: speedy, booking, and contest
The fulfillment type selected for the project, the options are: speedy, booking, and contest
created
string
The creation date of the project
The creation date of the project
status
string
You should use the string "canceled", on the response it will show the current status of the project
You should use the string "canceled", on the response it will show the current status of the project
price
number
The price charged for the project
The price charged for the project
fake
boolean
If the project is fake
If the project is fake
test
boolean
If the project is a test
If the project is a test
reason
string
The reason for the cancellation of the project.
The reason for the cancellation of the project.
reasonCode
Response example
{
"id": "74rgd7ba-02e9-4d65-83de-3db4164b298b",
"title": "28/02 00:00 My First API Project",
"mainService": "voice_over",
"fulfillmentType": "speedy",
"created": "2023-03-03T18:17:38",
"status": "canceled",
"price": 31.00,
"fake": false,
"test": true,
"reason": "Reasons to cancel the project",
"reasonCode": "MAIN_REASON_CODE.SUB_REASON_CODE",
}
Error responses
500 Error canceling project
{
status: 500,
type: 'ERROR_CANCELING_PROJECT',
message: 'There was an error canceling project with id "PROJECT_ID", please talk with our support team',
}
400 Project not exist
{
status: 404,
type: 'PROJECT_NO_EXIST',
message: 'Project with id "PROJECT_ID" not found',
}
400 Project already canceled
{
status: 404,
type: 'PROJECT_ALREADY_CANCELED',
message: 'Project with id "PROJECT_ID" is already canceled',
}
403 Forbidden
{
status: 403,
type: 'FORBIDDEN',
message: 'You do not have permission to do this action',
}