Fetch a page by id or slug
curl --request GET \
--url https://api.neuraldraft.io/v1/pages/{id_or_slug} \
--header 'Authorization: Bearer <token>'const url = 'https://api.neuraldraft.io/v1/pages/{id_or_slug}';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, 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 => "GET",
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;
}{
"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"
}
}Pages
Fetch a page by id or slug
GET
/
pages
/
{id_or_slug}
Fetch a page by id or slug
curl --request GET \
--url https://api.neuraldraft.io/v1/pages/{id_or_slug} \
--header 'Authorization: Bearer <token>'const url = 'https://api.neuraldraft.io/v1/pages/{id_or_slug}';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, 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 => "GET",
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;
}{
"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"
}
}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
Response
OK
Show child attributes
Show child attributes
⌘I