Create a new page
curl --request POST \
--url https://api.lindo.ai/v1/workspace/website/{website_id}/pages/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"html": "<main><section>...</section></main>",
"path": "/about-us",
"settings": {
"theme": {
"mode": "dark"
}
},
"template_name": "About Us",
"custom_codes": {
"header": "<script>...</script>",
"footer": "<script>...</script>"
},
"seo": {
"page_title": "About Us",
"meta_description": "Learn about our company"
}
}
'import requests
url = "https://api.lindo.ai/v1/workspace/website/{website_id}/pages/create"
payload = {
"html": "<main><section>...</section></main>",
"path": "/about-us",
"settings": { "theme": { "mode": "dark" } },
"template_name": "About Us",
"custom_codes": {
"header": "<script>...</script>",
"footer": "<script>...</script>"
},
"seo": {
"page_title": "About Us",
"meta_description": "Learn about our company"
}
}
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({
html: '<main><section>...</section></main>',
path: '/about-us',
settings: {theme: {mode: 'dark'}},
template_name: 'About Us',
custom_codes: {header: '<script>...</script>', footer: '<script>...</script>'},
seo: {page_title: 'About Us', meta_description: 'Learn about our company'}
})
};
fetch('https://api.lindo.ai/v1/workspace/website/{website_id}/pages/create', 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.lindo.ai/v1/workspace/website/{website_id}/pages/create",
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([
'html' => '<main><section>...</section></main>',
'path' => '/about-us',
'settings' => [
'theme' => [
'mode' => 'dark'
]
],
'template_name' => 'About Us',
'custom_codes' => [
'header' => '<script>...</script>',
'footer' => '<script>...</script>'
],
'seo' => [
'page_title' => 'About Us',
'meta_description' => 'Learn about our company'
]
]),
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.lindo.ai/v1/workspace/website/{website_id}/pages/create"
payload := strings.NewReader("{\n \"html\": \"<main><section>...</section></main>\",\n \"path\": \"/about-us\",\n \"settings\": {\n \"theme\": {\n \"mode\": \"dark\"\n }\n },\n \"template_name\": \"About Us\",\n \"custom_codes\": {\n \"header\": \"<script>...</script>\",\n \"footer\": \"<script>...</script>\"\n },\n \"seo\": {\n \"page_title\": \"About Us\",\n \"meta_description\": \"Learn about our company\"\n }\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.lindo.ai/v1/workspace/website/{website_id}/pages/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"html\": \"<main><section>...</section></main>\",\n \"path\": \"/about-us\",\n \"settings\": {\n \"theme\": {\n \"mode\": \"dark\"\n }\n },\n \"template_name\": \"About Us\",\n \"custom_codes\": {\n \"header\": \"<script>...</script>\",\n \"footer\": \"<script>...</script>\"\n },\n \"seo\": {\n \"page_title\": \"About Us\",\n \"meta_description\": \"Learn about our company\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lindo.ai/v1/workspace/website/{website_id}/pages/create")
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 \"html\": \"<main><section>...</section></main>\",\n \"path\": \"/about-us\",\n \"settings\": {\n \"theme\": {\n \"mode\": \"dark\"\n }\n },\n \"template_name\": \"About Us\",\n \"custom_codes\": {\n \"header\": \"<script>...</script>\",\n \"footer\": \"<script>...</script>\"\n },\n \"seo\": {\n \"page_title\": \"About Us\",\n \"meta_description\": \"Learn about our company\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"result": {
"message": "Page created and published successfully",
"page_id": "page_abc123",
"publish_date": 1705312200,
"published_url": "https://example.com/about-us"
}
}{
"success": false,
"errors": [
"Client already exists"
],
"message": "Validation failed"
}{
"success": false,
"errors": [
"Client already exists"
],
"message": "Validation failed"
}{
"success": false,
"errors": [
"Client already exists"
],
"message": "Validation failed"
}{
"success": false,
"errors": [
"Client already exists"
],
"message": "Validation failed"
}Page Management
Create a new page
Creates a new page and publishes it with full HTML content. Parses HTML to extract title, SEO metadata, and custom codes.
POST
/
v1
/
workspace
/
website
/
{website_id}
/
pages
/
create
Create a new page
curl --request POST \
--url https://api.lindo.ai/v1/workspace/website/{website_id}/pages/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"html": "<main><section>...</section></main>",
"path": "/about-us",
"settings": {
"theme": {
"mode": "dark"
}
},
"template_name": "About Us",
"custom_codes": {
"header": "<script>...</script>",
"footer": "<script>...</script>"
},
"seo": {
"page_title": "About Us",
"meta_description": "Learn about our company"
}
}
'import requests
url = "https://api.lindo.ai/v1/workspace/website/{website_id}/pages/create"
payload = {
"html": "<main><section>...</section></main>",
"path": "/about-us",
"settings": { "theme": { "mode": "dark" } },
"template_name": "About Us",
"custom_codes": {
"header": "<script>...</script>",
"footer": "<script>...</script>"
},
"seo": {
"page_title": "About Us",
"meta_description": "Learn about our company"
}
}
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({
html: '<main><section>...</section></main>',
path: '/about-us',
settings: {theme: {mode: 'dark'}},
template_name: 'About Us',
custom_codes: {header: '<script>...</script>', footer: '<script>...</script>'},
seo: {page_title: 'About Us', meta_description: 'Learn about our company'}
})
};
fetch('https://api.lindo.ai/v1/workspace/website/{website_id}/pages/create', 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.lindo.ai/v1/workspace/website/{website_id}/pages/create",
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([
'html' => '<main><section>...</section></main>',
'path' => '/about-us',
'settings' => [
'theme' => [
'mode' => 'dark'
]
],
'template_name' => 'About Us',
'custom_codes' => [
'header' => '<script>...</script>',
'footer' => '<script>...</script>'
],
'seo' => [
'page_title' => 'About Us',
'meta_description' => 'Learn about our company'
]
]),
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.lindo.ai/v1/workspace/website/{website_id}/pages/create"
payload := strings.NewReader("{\n \"html\": \"<main><section>...</section></main>\",\n \"path\": \"/about-us\",\n \"settings\": {\n \"theme\": {\n \"mode\": \"dark\"\n }\n },\n \"template_name\": \"About Us\",\n \"custom_codes\": {\n \"header\": \"<script>...</script>\",\n \"footer\": \"<script>...</script>\"\n },\n \"seo\": {\n \"page_title\": \"About Us\",\n \"meta_description\": \"Learn about our company\"\n }\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.lindo.ai/v1/workspace/website/{website_id}/pages/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"html\": \"<main><section>...</section></main>\",\n \"path\": \"/about-us\",\n \"settings\": {\n \"theme\": {\n \"mode\": \"dark\"\n }\n },\n \"template_name\": \"About Us\",\n \"custom_codes\": {\n \"header\": \"<script>...</script>\",\n \"footer\": \"<script>...</script>\"\n },\n \"seo\": {\n \"page_title\": \"About Us\",\n \"meta_description\": \"Learn about our company\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lindo.ai/v1/workspace/website/{website_id}/pages/create")
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 \"html\": \"<main><section>...</section></main>\",\n \"path\": \"/about-us\",\n \"settings\": {\n \"theme\": {\n \"mode\": \"dark\"\n }\n },\n \"template_name\": \"About Us\",\n \"custom_codes\": {\n \"header\": \"<script>...</script>\",\n \"footer\": \"<script>...</script>\"\n },\n \"seo\": {\n \"page_title\": \"About Us\",\n \"meta_description\": \"Learn about our company\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"result": {
"message": "Page created and published successfully",
"page_id": "page_abc123",
"publish_date": 1705312200,
"published_url": "https://example.com/about-us"
}
}{
"success": false,
"errors": [
"Client already exists"
],
"message": "Validation failed"
}{
"success": false,
"errors": [
"Client already exists"
],
"message": "Validation failed"
}{
"success": false,
"errors": [
"Client already exists"
],
"message": "Validation failed"
}{
"success": false,
"errors": [
"Client already exists"
],
"message": "Validation failed"
}Authorizations
Enter your API key (starts with lindo_sk_)
Path Parameters
Unique identifier of the website
Example:
"ws_abc123"
Body
application/json
Full HTML content of the page
Example:
"<main><section>...</section></main>"
URL path for the page
Example:
"/about-us"
Page settings
Show child attributes
Show child attributes
Example:
{ "theme": { "mode": "dark" } }
Page title/name
Example:
"About Us"
Custom code to inject in header and footer
Show child attributes
Show child attributes
Example:
{
"header": "<script>...</script>",
"footer": "<script>...</script>"
}
SEO metadata for the page
Show child attributes
Show child attributes
Example:
{
"page_title": "About Us",
"meta_description": "Learn about our company"
}
Was this page helpful?
⌘I

