curl --request POST \
--url https://api.craftkit.dev/v1/projects/{id}/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Render service (prod)"
}
'import requests
url = "https://api.craftkit.dev/v1/projects/{id}/keys"
payload = { "name": "Render service (prod)" }
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: 'Render service (prod)'})
};
fetch('https://api.craftkit.dev/v1/projects/{id}/keys', 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}/keys",
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' => 'Render service (prod)'
]),
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/{id}/keys"
payload := strings.NewReader("{\n \"name\": \"Render service (prod)\"\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/{id}/keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Render service (prod)\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.craftkit.dev/v1/projects/{id}/keys")
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\": \"Render service (prod)\"\n}"
response = http.request(request)
puts response.read_body{
"id": "9c8b7a6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d",
"projectId": "3f9b6c2e-1a2b-4c3d-9e8f-7a6b5c4d3e2f",
"name": "Render service (prod)",
"prefix": "ck_live_aBcDe",
"key": "ck_live_aBcDeFgHiJkLmNoPqRsTuVwXyZ012345",
"createdAt": "2026-07-02T00:00:00.000Z"
}{
"error": {
"code": "invalid_json",
"message": "Request body must be valid JSON."
}
}{
"error": {
"code": "unauthorized",
"message": "Missing Bearer token."
}
}{
"error": {
"code": "not_found",
"message": "Project not found."
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid request body."
}
}Mint a project API key
Mint a new ck_live_… project API key for a project owned by the
authenticated account, for use against the project-scoped API
(/v1/templates, /v1/renders, /v1/signatures, embed). This never
mints an account key (ck_acct_…) — the account key itself is issued
only from the dashboard (Account → API keys). The plaintext key
is returned exactly once; only its SHA-256 hash is stored.
curl --request POST \
--url https://api.craftkit.dev/v1/projects/{id}/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Render service (prod)"
}
'import requests
url = "https://api.craftkit.dev/v1/projects/{id}/keys"
payload = { "name": "Render service (prod)" }
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: 'Render service (prod)'})
};
fetch('https://api.craftkit.dev/v1/projects/{id}/keys', 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}/keys",
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' => 'Render service (prod)'
]),
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/{id}/keys"
payload := strings.NewReader("{\n \"name\": \"Render service (prod)\"\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/{id}/keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Render service (prod)\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.craftkit.dev/v1/projects/{id}/keys")
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\": \"Render service (prod)\"\n}"
response = http.request(request)
puts response.read_body{
"id": "9c8b7a6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d",
"projectId": "3f9b6c2e-1a2b-4c3d-9e8f-7a6b5c4d3e2f",
"name": "Render service (prod)",
"prefix": "ck_live_aBcDe",
"key": "ck_live_aBcDeFgHiJkLmNoPqRsTuVwXyZ012345",
"createdAt": "2026-07-02T00:00:00.000Z"
}{
"error": {
"code": "invalid_json",
"message": "Request body must be valid JSON."
}
}{
"error": {
"code": "unauthorized",
"message": "Missing Bearer token."
}
}{
"error": {
"code": "not_found",
"message": "Project not found."
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid request body."
}
}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.
Body
Defaults to "API key" when omitted.
1 - 200Response
Project key minted.
Response for POST /v1/projects/{id}/keys. key is the plaintext ck_live_… value — shown exactly once, never recoverable afterwards.
Defaults to "API key" when no name was supplied at mint time.
Public-facing prefix (e.g. ck_live_aBcDe), safe to display after creation.
Plaintext project API key. Store it now — it cannot be shown again.