Create a share link
curl --request POST \
--url https://api.craftkit.dev/v1/renders/{id}/shares \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"channel": "link",
"expiresAt": "2026-07-01T00:00:00.000Z"
}
'import requests
url = "https://api.craftkit.dev/v1/renders/{id}/shares"
payload = {
"channel": "link",
"expiresAt": "2026-07-01T00:00:00.000Z"
}
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({channel: 'link', expiresAt: '2026-07-01T00:00:00.000Z'})
};
fetch('https://api.craftkit.dev/v1/renders/{id}/shares', 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/renders/{id}/shares",
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([
'channel' => 'link',
'expiresAt' => '2026-07-01T00:00:00.000Z'
]),
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/renders/{id}/shares"
payload := strings.NewReader("{\n \"channel\": \"link\",\n \"expiresAt\": \"2026-07-01T00:00:00.000Z\"\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/renders/{id}/shares")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"channel\": \"link\",\n \"expiresAt\": \"2026-07-01T00:00:00.000Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.craftkit.dev/v1/renders/{id}/shares")
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 \"channel\": \"link\",\n \"expiresAt\": \"2026-07-01T00:00:00.000Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": "9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d",
"shareToken": "shr_abc123",
"shareUrl": "https://api.craftkit.dev/share/shr_abc123",
"channel": "link",
"recipientEmail": null,
"message": null,
"expiresAt": "2026-07-01T00:00:00.000Z",
"revokedAt": null,
"createdAt": "2026-06-21T10:00:00.000Z"
}{
"error": {
"code": "invalid_request",
"message": "Request body did not match expected shape."
}
}{
"error": {
"code": "unauthorized",
"message": "Missing Bearer token."
}
}{
"error": {
"code": "not_found",
"message": "Render not found."
}
}{
"error": {
"code": "not_ready",
"message": "Render has not succeeded yet — cannot create a share."
}
}Renders
Create a share link
Create a new share link for a succeeded render. channel="email"
requires recipientEmail; to actually send, use POST /v1/renders/{id}/email.
POST
/
v1
/
renders
/
{id}
/
shares
Create a share link
curl --request POST \
--url https://api.craftkit.dev/v1/renders/{id}/shares \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"channel": "link",
"expiresAt": "2026-07-01T00:00:00.000Z"
}
'import requests
url = "https://api.craftkit.dev/v1/renders/{id}/shares"
payload = {
"channel": "link",
"expiresAt": "2026-07-01T00:00:00.000Z"
}
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({channel: 'link', expiresAt: '2026-07-01T00:00:00.000Z'})
};
fetch('https://api.craftkit.dev/v1/renders/{id}/shares', 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/renders/{id}/shares",
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([
'channel' => 'link',
'expiresAt' => '2026-07-01T00:00:00.000Z'
]),
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/renders/{id}/shares"
payload := strings.NewReader("{\n \"channel\": \"link\",\n \"expiresAt\": \"2026-07-01T00:00:00.000Z\"\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/renders/{id}/shares")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"channel\": \"link\",\n \"expiresAt\": \"2026-07-01T00:00:00.000Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.craftkit.dev/v1/renders/{id}/shares")
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 \"channel\": \"link\",\n \"expiresAt\": \"2026-07-01T00:00:00.000Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": "9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d",
"shareToken": "shr_abc123",
"shareUrl": "https://api.craftkit.dev/share/shr_abc123",
"channel": "link",
"recipientEmail": null,
"message": null,
"expiresAt": "2026-07-01T00:00:00.000Z",
"revokedAt": null,
"createdAt": "2026-06-21T10:00:00.000Z"
}{
"error": {
"code": "invalid_request",
"message": "Request body did not match expected shape."
}
}{
"error": {
"code": "unauthorized",
"message": "Missing Bearer token."
}
}{
"error": {
"code": "not_found",
"message": "Render not found."
}
}{
"error": {
"code": "not_ready",
"message": "Render has not succeeded yet — cannot create a share."
}
}Authorizations
Project API key (ck_live_… or ck_test_…) presented as a bearer token.
For embed partner endpoints this is the partner secret key, which is the
same credential type.
Path Parameters
The render id.
Body
application/json
Response
Share created.
⌘I