Skip to main content
POST
/
v1
/
ai
/
workspace
/
blog
/
status
/
batch
Check status of up to 25 blog workflows at once
curl --request POST \
  --url https://api.lindo.ai/v1/ai/workspace/blog/status/batch \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "workflow_ids": [
    "wf_abc",
    "wf_def",
    "wf_ghi"
  ]
}
'
import requests

url = "https://api.lindo.ai/v1/ai/workspace/blog/status/batch"

payload = { "workflow_ids": ["wf_abc", "wf_def", "wf_ghi"] }
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({workflow_ids: ['wf_abc', 'wf_def', 'wf_ghi']})
};

fetch('https://api.lindo.ai/v1/ai/workspace/blog/status/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/blog/status/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([
'workflow_ids' => [
'wf_abc',
'wf_def',
'wf_ghi'
]
]),
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/blog/status/batch"

payload := strings.NewReader("{\n \"workflow_ids\": [\n \"wf_abc\",\n \"wf_def\",\n \"wf_ghi\"\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/blog/status/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workflow_ids\": [\n \"wf_abc\",\n \"wf_def\",\n \"wf_ghi\"\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.lindo.ai/v1/ai/workspace/blog/status/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 \"workflow_ids\": [\n \"wf_abc\",\n \"wf_def\",\n \"wf_ghi\"\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "done": true,
  "message": "5 items complete.",
  "summary": {
    "total": 5,
    "complete": 5,
    "running": 0,
    "partial": 0,
    "errored": 0,
    "not_found": 0
  },
  "items": [
    {
      "success": true,
      "workflow_id": "<string>",
      "done": true,
      "status": "complete",
      "message": "<string>",
      "result": {
        "website_id": "website_def456",
        "blog_id": "blog_jkl012",
        "slug": "hello-world",
        "path": "/blog/hello-world"
      },
      "error": "<string>"
    }
  ],
  "poll_after_ms": 123
}
{
"success": false,
"error": "<string>"
}
{
"success": false,
"error": "<string>"
}
{
"success": false,
"error": "<string>"
}

Authorizations

Authorization
string
header
required

Enter your API key (starts with lindo_sk_)

Body

application/json
workflow_ids
string[]
required

Array of workflow_ids to poll. Between 1 and 25 items.

Required array length: 1 - 25 elements
Example:
["wf_abc", "wf_def", "wf_ghi"]

Response

Batch status retrieved

success
enum<boolean>
required
Available options:
true
done
boolean
required

True once every item has reached a terminal state.

status
enum<string>
required
  • scheduled: every item is scheduled
  • running: at least one item is still running or scheduled
  • complete: every item finished cleanly
  • partial: every item is terminal but some errored
  • errored: every item errored
Available options:
scheduled,
running,
complete,
partial,
errored
message
string
required

Human-readable summary of the batch, safe to quote.

Example:

"5 items complete."

summary
object
required
items
object[]
required

Per-workflow status, in the same order as the requested workflow_ids.

poll_after_ms
number

Suggested delay before polling again while done is false.