curl --request POST \
--url https://api.zebratruth.ai/v1/corpus/refresh \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"scope": "all"
}'import requests
url = "https://api.zebratruth.ai/v1/corpus/refresh"
payload = { "scope": "all" }
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({scope: 'all'})
};
fetch('https://api.zebratruth.ai/v1/corpus/refresh', 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.zebratruth.ai/v1/corpus/refresh",
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([
'scope' => 'all'
]),
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.zebratruth.ai/v1/corpus/refresh"
payload := strings.NewReader("{\n \"scope\": \"all\"\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.zebratruth.ai/v1/corpus/refresh")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"scope\": \"all\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zebratruth.ai/v1/corpus/refresh")
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 \"scope\": \"all\"\n}"
response = http.request(request)
puts response.read_body{
"requestedCount": 12,
"enqueuedCount": 9,
"skippedCount": 3,
"pending": 0,
"rateLimit": 50
}{
"statusCode": 401,
"message": "Invalid API key",
"error": true,
"url": "https://api.zebratruth.ai/v1/whoami",
"statusMessage": "Invalid API key"
}{
"statusCode": 403,
"message": "Requested jurisdictions [india, china] are not in your subscription. Allowed: [us, eu].",
"error": true,
"url": "https://api.zebratruth.ai/v1/compliance/check",
"statusMessage": "Requested jurisdictions [india, china] are not in your subscription. Allowed: [us, eu]."
}{
"statusCode": 429,
"message": "Rate limit exceeded",
"error": true,
"url": "<string>",
"statusMessage": "Rate limit exceeded",
"data": {
"retryAfter": 5,
"limit": 60,
"remaining": 0
}
}Force refresh of legal corpus rows
Triggers an out-of-band refresh of one or more rows in your tenant’s legal corpus. Each corpus row is the pre-researched legal context that Stage A consumes — refreshing replaces its enrichment with the latest available regulator guidance.
When you’d use this: regulatory guidance changed mid-window, or you want fresh enrichment before running an important compliance check.
Idempotent: concurrent calls or repeated calls on the same row don’t fan out
duplicate work — calls that arrive while a refresh is already in flight return
skippedCount += 1 instead of enqueueing.
Rate-limited: max 50 rows enqueued per call. Excess returns as pending.
Re-call after ~1 minute to drain remaining rows.
Async: returns immediately after enqueueing; the actual refresh runs on a background worker. Subsequent reads automatically pick up the new enrichment.
curl --request POST \
--url https://api.zebratruth.ai/v1/corpus/refresh \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"scope": "all"
}'import requests
url = "https://api.zebratruth.ai/v1/corpus/refresh"
payload = { "scope": "all" }
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({scope: 'all'})
};
fetch('https://api.zebratruth.ai/v1/corpus/refresh', 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.zebratruth.ai/v1/corpus/refresh",
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([
'scope' => 'all'
]),
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.zebratruth.ai/v1/corpus/refresh"
payload := strings.NewReader("{\n \"scope\": \"all\"\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.zebratruth.ai/v1/corpus/refresh")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"scope\": \"all\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zebratruth.ai/v1/corpus/refresh")
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 \"scope\": \"all\"\n}"
response = http.request(request)
puts response.read_body{
"requestedCount": 12,
"enqueuedCount": 9,
"skippedCount": 3,
"pending": 0,
"rateLimit": 50
}{
"statusCode": 401,
"message": "Invalid API key",
"error": true,
"url": "https://api.zebratruth.ai/v1/whoami",
"statusMessage": "Invalid API key"
}{
"statusCode": 403,
"message": "Requested jurisdictions [india, china] are not in your subscription. Allowed: [us, eu].",
"error": true,
"url": "https://api.zebratruth.ai/v1/compliance/check",
"statusMessage": "Requested jurisdictions [india, china] are not in your subscription. Allowed: [us, eu]."
}{
"statusCode": 429,
"message": "Rate limit exceeded",
"error": true,
"url": "<string>",
"statusMessage": "Rate limit exceeded",
"data": {
"retryAfter": 5,
"limit": 60,
"remaining": 0
}
}Authorizations
API key starting with zt_live_ (production) or zt_test_ (sandbox).
Get your key at https://developers.zebratruth.ai
Body
- All stale rows
- Area-scoped
- Single law
Discriminated union on scope. Pick the narrowest scope you need —
all for everything stale, area to limit by jurisdiction × area,
or law for a single row.
Refresh every stale row in the tenant's corpus.
all Response
Refresh enqueued
How many corpus rows the requested scope resolved to.
12
How many rows successfully acquired the lease + got a refresh message enqueued.
9
Rows where the lease is currently held by another recent caller (5-min window) or whose row didn't exist. These will refresh on the existing lease holder's enqueue.
3
Rows over the 50/request rate limit. Re-call after ~1 minute to enqueue the rest.
0
Maximum rows enqueued per request.
50