curl --request DELETE \
--url https://api.craftkit.dev/v1/projects/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.craftkit.dev/v1/projects/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.craftkit.dev/v1/projects/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.craftkit.dev/v1/projects/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.craftkit.dev/v1/projects/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.craftkit.dev/v1/projects/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.craftkit.dev/v1/projects/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3f9b6c2e-1a2b-4c3d-9e8f-7a6b5c4d3e2f",
"deleted": true
}{
"error": {
"code": "unauthorized",
"message": "Missing Bearer token."
}
}{
"error": {
"code": "not_found",
"message": "Project not found."
}
}Delete a project
Soft-delete a project owned by the authenticated account. Its API
keys, templates, and renders are retained but the project stops
appearing in list/get and every project-scoped call against it is
rejected. The slug is not freed for reuse — (userId, slug) is a
non-partial unique index, so a soft-deleted project’s slug stays
reserved.
curl --request DELETE \
--url https://api.craftkit.dev/v1/projects/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.craftkit.dev/v1/projects/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.craftkit.dev/v1/projects/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.craftkit.dev/v1/projects/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.craftkit.dev/v1/projects/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.craftkit.dev/v1/projects/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.craftkit.dev/v1/projects/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3f9b6c2e-1a2b-4c3d-9e8f-7a6b5c4d3e2f",
"deleted": true
}{
"error": {
"code": "unauthorized",
"message": "Missing Bearer token."
}
}{
"error": {
"code": "not_found",
"message": "Project not found."
}
}Authorizations
Account API key (ck_acct_…) presented as a bearer token. Distinct
credential system from bearerApiKey — validated against a separate
table, never against project keys or vice versa. Scoped to every
project owned by the account; used only by the /v1/projects*
endpoints below (each of which declares this scheme explicitly and
does not inherit the document-level bearerApiKey default). Minted
from the dashboard (Account → API keys) — there is no
programmatic endpoint that issues an account key.
Path Parameters
The project id.