curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/seo/fix \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fix_type": "enable_llms_txt",
"params": {}
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/seo/fix"
payload = {
"fix_type": "enable_llms_txt",
"params": {}
}
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({fix_type: 'enable_llms_txt', params: {}})
};
fetch('https://app.base44.com/api/apps/{app_id}/seo/fix', 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://app.base44.com/api/apps/{app_id}/seo/fix",
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([
'fix_type' => 'enable_llms_txt',
'params' => [
]
]),
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://app.base44.com/api/apps/{app_id}/seo/fix"
payload := strings.NewReader("{\n \"fix_type\": \"enable_llms_txt\",\n \"params\": {}\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://app.base44.com/api/apps/{app_id}/seo/fix")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fix_type\": \"enable_llms_txt\",\n \"params\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/seo/fix")
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 \"fix_type\": \"enable_llms_txt\",\n \"params\": {}\n}"
response = http.request(request)
puts response.read_body{
"result": {
"success": true,
"message": "llms.txt enabled",
"redirect": "domains"
}
}Apply SEO fix
Applies the fix for one check from an SEO scan and returns what it did.
Get the checks from Run SEO scan or Get last SEO scan. Each check Base44 can act on carries a fix_action. Send its type as fix_type and its params as params.
The fix actions fall into three groups. Some change the app’s SEO settings, some change the app itself, and the rest change nothing and point you to the app editor screen where you make the fix. An action that changes settings replaces the value it sets, including a value someone edited by hand. The exception is generate_page_meta with overwrite_existing set to false in params, as the scan sends it: it keeps page titles and descriptions someone wrote by hand.
No action edits the app’s code, creates a checkpoint, or uses the workspace’s credits.
A call can succeed and still report success as false when the action had nothing to apply, such as generate_json_ld on an app with no entity Base44 can match to a Schema.org type.
Calling an action again applies it again. Most land on the same result every time, but generate_description writes a new description on each call.
A successful call means the change is saved. The live site can take a little while to catch up.
fix_type values documented here. Other values are not supported and their behavior can change.curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/seo/fix \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fix_type": "enable_llms_txt",
"params": {}
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/seo/fix"
payload = {
"fix_type": "enable_llms_txt",
"params": {}
}
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({fix_type: 'enable_llms_txt', params: {}})
};
fetch('https://app.base44.com/api/apps/{app_id}/seo/fix', 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://app.base44.com/api/apps/{app_id}/seo/fix",
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([
'fix_type' => 'enable_llms_txt',
'params' => [
]
]),
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://app.base44.com/api/apps/{app_id}/seo/fix"
payload := strings.NewReader("{\n \"fix_type\": \"enable_llms_txt\",\n \"params\": {}\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://app.base44.com/api/apps/{app_id}/seo/fix")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fix_type\": \"enable_llms_txt\",\n \"params\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/seo/fix")
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 \"fix_type\": \"enable_llms_txt\",\n \"params\": {}\n}"
response = http.request(request)
puts response.read_body{
"result": {
"success": true,
"message": "llms.txt enabled",
"redirect": "domains"
}
}Authorizations
Personal access token, sent as Authorization: Bearer <token>. Each operation lists the permission it needs: read_only or full_access. A full-access token can call every operation. A read-only token can call only the operations that list read_only; anything else returns 403 read_only_credential_route_not_allowed.
Path Parameters
ID of the app to fix.
Body
Action to apply, the type of a check's fix_action in Run SEO scan or Get last SEO scan. See Fix actions for what each one does.
enable_llms_txt, enable_ai_crawlers, generate_json_ld, generate_page_meta, generate_website_schema, generate_organization_schema, generate_faq_schema, generate_breadcrumb_schema, generate_canonical, generate_description, suggest_shorter_title, set_app_title, edit_app_description, edit_public_access, open_seo_advanced, set_og_image, connect_domain, edit_slug, enable_https, publish_app, fix_with_ai "enable_llms_txt"
Arguments for the action, the params of the same fix_action, sent as they are. Defaults to an empty object.
{}
Response
What the action did.
Outcome of the action.
Show child attributes
Show child attributes
Was this page helpful?