curl --request PATCH \
--url https://api.lindo.ai/v1/workspace/website/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"website_id": "website_abc123",
"business_name": "My Business",
"business_description": "A great business providing excellent services",
"custom_code_header": "<script>console.log('header');</script>",
"custom_code_footer": "<script>console.log('footer');</script>",
"robots": "User-agent: *\nAllow: /",
"language": "en",
"activated": true
}
EOFimport requests
url = "https://api.lindo.ai/v1/workspace/website/update"
payload = {
"website_id": "website_abc123",
"business_name": "My Business",
"business_description": "A great business providing excellent services",
"custom_code_header": "<script>console.log('header');</script>",
"custom_code_footer": "<script>console.log('footer');</script>",
"robots": "User-agent: *
Allow: /",
"language": "en",
"activated": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
website_id: 'website_abc123',
business_name: 'My Business',
business_description: 'A great business providing excellent services',
custom_code_header: '<script>console.log(\'header\');</script>',
custom_code_footer: '<script>console.log(\'footer\');</script>',
robots: 'User-agent: *\nAllow: /',
language: 'en',
activated: true
})
};
fetch('https://api.lindo.ai/v1/workspace/website/update', 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/update",
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([
'website_id' => 'website_abc123',
'business_name' => 'My Business',
'business_description' => 'A great business providing excellent services',
'custom_code_header' => '<script>console.log(\'header\');</script>',
'custom_code_footer' => '<script>console.log(\'footer\');</script>',
'robots' => 'User-agent: *
Allow: /',
'language' => 'en',
'activated' => true
]),
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/update"
payload := strings.NewReader("{\n \"website_id\": \"website_abc123\",\n \"business_name\": \"My Business\",\n \"business_description\": \"A great business providing excellent services\",\n \"custom_code_header\": \"<script>console.log('header');</script>\",\n \"custom_code_footer\": \"<script>console.log('footer');</script>\",\n \"robots\": \"User-agent: *\\nAllow: /\",\n \"language\": \"en\",\n \"activated\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.lindo.ai/v1/workspace/website/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"website_id\": \"website_abc123\",\n \"business_name\": \"My Business\",\n \"business_description\": \"A great business providing excellent services\",\n \"custom_code_header\": \"<script>console.log('header');</script>\",\n \"custom_code_footer\": \"<script>console.log('footer');</script>\",\n \"robots\": \"User-agent: *\\nAllow: /\",\n \"language\": \"en\",\n \"activated\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lindo.ai/v1/workspace/website/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"website_id\": \"website_abc123\",\n \"business_name\": \"My Business\",\n \"business_description\": \"A great business providing excellent services\",\n \"custom_code_header\": \"<script>console.log('header');</script>\",\n \"custom_code_footer\": \"<script>console.log('footer');</script>\",\n \"robots\": \"User-agent: *\\nAllow: /\",\n \"language\": \"en\",\n \"activated\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"result": {
"message": "Website updated successfully",
"website_id": "website_abc123",
"business_name": "My Business",
"business_description": "A great business providing excellent services",
"custom_code_header": "<script>console.log('header');</script>",
"custom_code_footer": "<script>console.log('footer');</script>",
"robots": "User-agent: *\nAllow: /",
"language": "en",
"activated": true
}
}{
"success": false,
"errors": [
"Client already exists"
],
"message": "Validation failed"
}{
"success": false,
"errors": [
"Client already exists"
],
"message": "Validation failed"
}Update website information
Updates website details using PATCH semantics. Undefined fields are not modified, null values clear the field. Supports business_name, business_description, custom_code_header, custom_code_footer, robots, language, and activated fields.
curl --request PATCH \
--url https://api.lindo.ai/v1/workspace/website/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"website_id": "website_abc123",
"business_name": "My Business",
"business_description": "A great business providing excellent services",
"custom_code_header": "<script>console.log('header');</script>",
"custom_code_footer": "<script>console.log('footer');</script>",
"robots": "User-agent: *\nAllow: /",
"language": "en",
"activated": true
}
EOFimport requests
url = "https://api.lindo.ai/v1/workspace/website/update"
payload = {
"website_id": "website_abc123",
"business_name": "My Business",
"business_description": "A great business providing excellent services",
"custom_code_header": "<script>console.log('header');</script>",
"custom_code_footer": "<script>console.log('footer');</script>",
"robots": "User-agent: *
Allow: /",
"language": "en",
"activated": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
website_id: 'website_abc123',
business_name: 'My Business',
business_description: 'A great business providing excellent services',
custom_code_header: '<script>console.log(\'header\');</script>',
custom_code_footer: '<script>console.log(\'footer\');</script>',
robots: 'User-agent: *\nAllow: /',
language: 'en',
activated: true
})
};
fetch('https://api.lindo.ai/v1/workspace/website/update', 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/update",
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([
'website_id' => 'website_abc123',
'business_name' => 'My Business',
'business_description' => 'A great business providing excellent services',
'custom_code_header' => '<script>console.log(\'header\');</script>',
'custom_code_footer' => '<script>console.log(\'footer\');</script>',
'robots' => 'User-agent: *
Allow: /',
'language' => 'en',
'activated' => true
]),
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/update"
payload := strings.NewReader("{\n \"website_id\": \"website_abc123\",\n \"business_name\": \"My Business\",\n \"business_description\": \"A great business providing excellent services\",\n \"custom_code_header\": \"<script>console.log('header');</script>\",\n \"custom_code_footer\": \"<script>console.log('footer');</script>\",\n \"robots\": \"User-agent: *\\nAllow: /\",\n \"language\": \"en\",\n \"activated\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.lindo.ai/v1/workspace/website/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"website_id\": \"website_abc123\",\n \"business_name\": \"My Business\",\n \"business_description\": \"A great business providing excellent services\",\n \"custom_code_header\": \"<script>console.log('header');</script>\",\n \"custom_code_footer\": \"<script>console.log('footer');</script>\",\n \"robots\": \"User-agent: *\\nAllow: /\",\n \"language\": \"en\",\n \"activated\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lindo.ai/v1/workspace/website/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"website_id\": \"website_abc123\",\n \"business_name\": \"My Business\",\n \"business_description\": \"A great business providing excellent services\",\n \"custom_code_header\": \"<script>console.log('header');</script>\",\n \"custom_code_footer\": \"<script>console.log('footer');</script>\",\n \"robots\": \"User-agent: *\\nAllow: /\",\n \"language\": \"en\",\n \"activated\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"result": {
"message": "Website updated successfully",
"website_id": "website_abc123",
"business_name": "My Business",
"business_description": "A great business providing excellent services",
"custom_code_header": "<script>console.log('header');</script>",
"custom_code_footer": "<script>console.log('footer');</script>",
"robots": "User-agent: *\nAllow: /",
"language": "en",
"activated": true
}
}{
"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_)
Body
Unique identifier of the website to update
"website_abc123"
Business name for the website. Set to null to clear.
"My Business"
Business description for the website. Set to null to clear.
"A great business providing excellent services"
Custom code to inject in the header. Set to null to clear.
"<script>console.log('header');</script>"
Custom code to inject in the footer. Set to null to clear.
"<script>console.log('footer');</script>"
Robots.txt content for the website. Set to null to clear.
"User-agent: *\nAllow: /"
Language code for the website (e.g., 'en', 'es'). Set to null to clear.
"en"
Whether the website is activated
true
Was this page helpful?

