Skip to main content
POST
/
v1
/
ai
/
workspace
/
website
/
{website_id}
/
blog
/
batch
Create multiple blog posts on a website with AI (batch, max 25)
curl --request POST \
  --url https://api.lindo.ai/v1/ai/workspace/website/{website_id}/blog/batch \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "items": [
    {
      "prompt": "<string>",
      "schedule_at": "<string>"
    }
  ]
}
'
import requests

url = "https://api.lindo.ai/v1/ai/workspace/website/{website_id}/blog/batch"

payload = { "items": [
{
"prompt": "<string>",
"schedule_at": "<string>"
}
] }
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({items: [{prompt: '<string>', schedule_at: '<string>'}]})
};

fetch('https://api.lindo.ai/v1/ai/workspace/website/{website_id}/blog/batch', 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/ai/workspace/website/{website_id}/blog/batch",
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([
'items' => [
[
'prompt' => '<string>',
'schedule_at' => '<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;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.lindo.ai/v1/ai/workspace/website/{website_id}/blog/batch"

payload := strings.NewReader("{\n \"items\": [\n {\n \"prompt\": \"<string>\",\n \"schedule_at\": \"<string>\"\n }\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/ai/workspace/website/{website_id}/blog/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"prompt\": \"<string>\",\n \"schedule_at\": \"<string>\"\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.lindo.ai/v1/ai/workspace/website/{website_id}/blog/batch")

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 \"items\": [\n {\n \"prompt\": \"<string>\",\n \"schedule_at\": \"<string>\"\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "total": 123,
  "succeeded": 123,
  "failed": 123,
  "items": [
    {
      "success": true,
      "workflow_id": "<string>",
      "error": "<string>"
    }
  ]
}
{
"success": false,
"error": "Invalid prompt: must be at least 10 characters"
}
{
"success": false,
"error": "<string>"
}
{
"success": false,
"error": "<string>"
}
{
"success": false,
"error": "Invalid prompt: must be at least 10 characters"
}

Authorizations

Authorization
string
header
required

Enter your API key (starts with lindo_sk_)

Path Parameters

website_id
string
required

The ID of the website to create the blog posts on

Example:

"website_abc123"

Body

application/json
items
object[]
required

Array of blog posts to create on the website. Between 1 and 25 items.

Required array length: 1 - 25 elements

Response

Batch processed. Check per-item success.

success
enum<boolean>
required

The batch request was processed. Individual items may still have failed — check per-item success.

Available options:
true
total
number
required

Total items in the batch

succeeded
number
required

Number of items successfully accepted

failed
number
required

Number of items that failed to start

items
object[]
required

Per-item result, in the same order as the request