curl --request POST \
--url https://api.craftkit.dev/v1/projects \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Acme Corp"
}
'import requests
url = "https://api.craftkit.dev/v1/projects"
payload = { "name": "Acme Corp" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Acme Corp'})
};
fetch('https://api.craftkit.dev/v1/projects', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Acme Corp'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.craftkit.dev/v1/projects"
payload := strings.NewReader("{\n \"name\": \"Acme Corp\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.craftkit.dev/v1/projects")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Acme Corp\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.craftkit.dev/v1/projects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Acme Corp\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3f9b6c2e-1a2b-4c3d-9e8f-7a6b5c4d3e2f",
"slug": "acme-corp",
"name": "Acme Corp"
}{
"error": {
"code": "invalid_json",
"message": "Request body must be valid JSON."
}
}{
"error": {
"code": "unauthorized",
"message": "Missing Bearer token."
}
}{
"error": {
"code": "conflict",
"message": "A project with a similar name already exists — pick a different name."
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid request body.",
"issues": []
}
}Create a project
Create a new project owned by the authenticated account. The slug is
derived from name (kebab-case) with an incrementing numeric suffix
on collision, checked against every slug the account has ever used —
including soft-deleted projects. A freed slug from a deleted project
is not reused automatically.
curl --request POST \
--url https://api.craftkit.dev/v1/projects \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Acme Corp"
}
'import requests
url = "https://api.craftkit.dev/v1/projects"
payload = { "name": "Acme Corp" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Acme Corp'})
};
fetch('https://api.craftkit.dev/v1/projects', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Acme Corp'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.craftkit.dev/v1/projects"
payload := strings.NewReader("{\n \"name\": \"Acme Corp\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.craftkit.dev/v1/projects")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Acme Corp\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.craftkit.dev/v1/projects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Acme Corp\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3f9b6c2e-1a2b-4c3d-9e8f-7a6b5c4d3e2f",
"slug": "acme-corp",
"name": "Acme Corp"
}{
"error": {
"code": "invalid_json",
"message": "Request body must be valid JSON."
}
}{
"error": {
"code": "unauthorized",
"message": "Missing Bearer token."
}
}{
"error": {
"code": "conflict",
"message": "A project with a similar name already exists — pick a different name."
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid request body.",
"issues": []
}
}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.
Body
1 - 120