Update a page (merge semantics on meta)
curl --request PATCH \
--url https://api.neuraldraft.io/v1/pages/{id_or_slug} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"slug": "<string>",
"title": "<string>",
"is_homepage": true,
"is_active": true,
"exclude_from_search": true,
"meta_title": "<string>",
"meta_description": "<string>",
"og_title": "<string>",
"og_description": "<string>",
"og_image": "<string>",
"canonical_url": "<string>"
}
'const url = 'https://api.neuraldraft.io/v1/pages/{id_or_slug}';
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
slug: '<string>',
title: '<string>',
is_homepage: true,
is_active: true,
exclude_from_search: true,
meta_title: '<string>',
meta_description: '<string>',
og_title: '<string>',
og_description: '<string>',
og_image: '<string>',
canonical_url: '<string>'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://api.neuraldraft.io/v1/pages/{id_or_slug}"
payload = {
"slug": "<string>",
"title": "<string>",
"is_homepage": True,
"is_active": True,
"exclude_from_search": True,
"meta_title": "<string>",
"meta_description": "<string>",
"og_title": "<string>",
"og_description": "<string>",
"og_image": "<string>",
"canonical_url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.neuraldraft.io/v1/pages/{id_or_slug}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'slug' => '<string>',
'title' => '<string>',
'is_homepage' => true,
'is_active' => true,
'exclude_from_search' => true,
'meta_title' => '<string>',
'meta_description' => '<string>',
'og_title' => '<string>',
'og_description' => '<string>',
'og_image' => '<string>',
'canonical_url' => '<string>'
]),
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;
}{
"data": {
"id": 42,
"slug": "about",
"title": "About us",
"type": "landing",
"is_homepage": false,
"is_active": true,
"exclude_from_search": false,
"meta_title": "About — Acme",
"meta_description": "<string>",
"og_title": "<string>",
"og_description": "<string>",
"og_image": "<string>",
"canonical_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"type": "https://neuraldraft.com/errors/payment-required",
"title": "Payment Required",
"status": 402,
"detail": "This project has no credits remaining for the current period.",
"code": "insufficient_credits",
"cost": 1,
"balance": 0,
"instance": "req_2Nh4PqRsTuVw"
}Pages
Update a page (merge semantics on meta)
Only fields you pass are overwritten — meta keys you omit are
preserved. Pass an explicit null to clear a meta field. Path
parameter must be the numeric id (not slug) for this endpoint.
Costs 1 credit per successful update (page_update).
PATCH
/
pages
/
{id_or_slug}
Update a page (merge semantics on meta)
curl --request PATCH \
--url https://api.neuraldraft.io/v1/pages/{id_or_slug} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"slug": "<string>",
"title": "<string>",
"is_homepage": true,
"is_active": true,
"exclude_from_search": true,
"meta_title": "<string>",
"meta_description": "<string>",
"og_title": "<string>",
"og_description": "<string>",
"og_image": "<string>",
"canonical_url": "<string>"
}
'const url = 'https://api.neuraldraft.io/v1/pages/{id_or_slug}';
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
slug: '<string>',
title: '<string>',
is_homepage: true,
is_active: true,
exclude_from_search: true,
meta_title: '<string>',
meta_description: '<string>',
og_title: '<string>',
og_description: '<string>',
og_image: '<string>',
canonical_url: '<string>'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://api.neuraldraft.io/v1/pages/{id_or_slug}"
payload = {
"slug": "<string>",
"title": "<string>",
"is_homepage": True,
"is_active": True,
"exclude_from_search": True,
"meta_title": "<string>",
"meta_description": "<string>",
"og_title": "<string>",
"og_description": "<string>",
"og_image": "<string>",
"canonical_url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.neuraldraft.io/v1/pages/{id_or_slug}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'slug' => '<string>',
'title' => '<string>',
'is_homepage' => true,
'is_active' => true,
'exclude_from_search' => true,
'meta_title' => '<string>',
'meta_description' => '<string>',
'og_title' => '<string>',
'og_description' => '<string>',
'og_image' => '<string>',
'canonical_url' => '<string>'
]),
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;
}{
"data": {
"id": 42,
"slug": "about",
"title": "About us",
"type": "landing",
"is_homepage": false,
"is_active": true,
"exclude_from_search": false,
"meta_title": "About — Acme",
"meta_description": "<string>",
"og_title": "<string>",
"og_description": "<string>",
"og_image": "<string>",
"canonical_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"type": "https://neuraldraft.com/errors/payment-required",
"title": "Payment Required",
"status": 402,
"detail": "This project has no credits remaining for the current period.",
"code": "insufficient_credits",
"cost": 1,
"balance": 0,
"instance": "req_2Nh4PqRsTuVw"
}Authorizations
Project API key. Pass as Authorization: Bearer ndsk_live_.... Manage
keys via /projects/me/api-keys. Test-mode keys use
the ndsk_test_ prefix.
Path Parameters
Body
application/json
Patch shape — every field is optional. Pass null on a meta field
to clear it. Untouched fields are preserved (merge semantics).
Pattern:
^[a-z0-9\-/]+$Available options:
landing, blog_list, blog_post, legal Response
OK
Show child attributes
Show child attributes
⌘I