Validate Text Snippet
curl --request POST \
--url https://api.example.com/api/validate_snippet_stream/ \
--header 'Content-Type: application/json' \
--data '
{
"text_snippet": "<string>",
"document_category": "<string>",
"document_metadata": {}
}
'import requests
url = "https://api.example.com/api/validate_snippet_stream/"
payload = {
"text_snippet": "<string>",
"document_category": "<string>",
"document_metadata": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({text_snippet: '<string>', document_category: '<string>', document_metadata: {}})
};
fetch('https://api.example.com/api/validate_snippet_stream/', 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.example.com/api/validate_snippet_stream/",
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([
'text_snippet' => '<string>',
'document_category' => '<string>',
'document_metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"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.example.com/api/validate_snippet_stream/"
payload := strings.NewReader("{\n \"text_snippet\": \"<string>\",\n \"document_category\": \"<string>\",\n \"document_metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/api/validate_snippet_stream/")
.header("Content-Type", "application/json")
.body("{\n \"text_snippet\": \"<string>\",\n \"document_category\": \"<string>\",\n \"document_metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/validate_snippet_stream/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"text_snippet\": \"<string>\",\n \"document_category\": \"<string>\",\n \"document_metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"job_id": "snippet_789xyz",
"status": "accepted"
}
Validation
Validate Text Snippet
Submit a text snippet for validation
POST
/
api
/
validate_snippet_stream
/
Validate Text Snippet
curl --request POST \
--url https://api.example.com/api/validate_snippet_stream/ \
--header 'Content-Type: application/json' \
--data '
{
"text_snippet": "<string>",
"document_category": "<string>",
"document_metadata": {}
}
'import requests
url = "https://api.example.com/api/validate_snippet_stream/"
payload = {
"text_snippet": "<string>",
"document_category": "<string>",
"document_metadata": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({text_snippet: '<string>', document_category: '<string>', document_metadata: {}})
};
fetch('https://api.example.com/api/validate_snippet_stream/', 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.example.com/api/validate_snippet_stream/",
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([
'text_snippet' => '<string>',
'document_category' => '<string>',
'document_metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"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.example.com/api/validate_snippet_stream/"
payload := strings.NewReader("{\n \"text_snippet\": \"<string>\",\n \"document_category\": \"<string>\",\n \"document_metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/api/validate_snippet_stream/")
.header("Content-Type", "application/json")
.body("{\n \"text_snippet\": \"<string>\",\n \"document_category\": \"<string>\",\n \"document_metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/validate_snippet_stream/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"text_snippet\": \"<string>\",\n \"document_category\": \"<string>\",\n \"document_metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"job_id": "snippet_789xyz",
"status": "accepted"
}
Submit a plain text snippet for asynchronous compliance validation.
Request Body
Plain text content to validate
Optional document category. If omitted, all rule packs will run.Options:
retail_investor_letter, retail_fact_sheet_registered_fund, retail_fact_sheet_non_registered, pitch_book_registered_fund, pitch_book_non_registered, scenario_retail_investor_letter, scenario_retail_fact_sheet_registered_fund, scenario_retail_fact_sheet_non_registered, scenario_pitch_book_registered_fund, scenario_pitch_book_non_registeredOptional detailed metadata for precise rule matching.
Response
Unique identifier for the validation job
Job status:
accepted{
"job_id": "snippet_789xyz",
"status": "accepted"
}
Example
curl -X POST "https://{api-url}/api/validate_snippet_stream/" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text_snippet": "Our fund guarantees 20% returns with zero risk!",
"document_category": "retail_investor_letter"
}'
import requests
API_KEY = "YOUR_API_KEY"
API_BASE = "https://{api-url}"
response = requests.post(
f"{API_BASE}/api/validate_snippet_stream/",
headers={
"x-api-key": API_KEY,
"Content-Type": "application/json"
},
json={
"text_snippet": "Our fund guarantees 20% returns with zero risk!",
"document_category": "retail_investor_letter"
}
)
print(response.json())
const axios = require('axios');
const API_KEY = 'YOUR_API_KEY';
const API_BASE = 'https://{api-url}';
const response = await axios.post(
`${API_BASE}/api/validate_snippet_stream/`,
{
text_snippet: 'Our fund guarantees 20% returns with zero risk!',
document_category: 'retail_investor_letter'
},
{
headers: {
'x-api-key': API_KEY,
'Content-Type': 'application/json'
}
}
);
console.log(response.data);
⌘I

