Node example: create embed session
const response = await fetch('https://animaid.to/api/embed/session', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Api-Key': process.env.ANIMA_SITE_KEY,
'X-Api-Secret': process.env.ANIMA_SECRET_KEY
},
body: JSON.stringify({
required_level: 'accredited',
steps: ['wallet', 'accreditation'],
chain: 'ethereum'
})
});
Python example: compliance check
import requests
r = requests.post(
"https://animaid.to/api/v1/compliance/check",
headers={"Authorization": f"Bearer {token}"},
json={
"anima_did": "did:anima:ethereum:0x123...",
"asset_class": "equity",
"offering_jurisdiction": "US",
"buyer_jurisdiction": "DE"
},
timeout=10
)
PHP example: create embed session
$payload = json_encode([
"required_level" => "accredited",
"steps" => ["wallet", "accreditation"],
"chain" => "ethereum"
]);
$ch = curl_init("https://animaid.to/api/embed/session");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"X-Api-Key: " . getenv("ANIMA_SITE_KEY"),
"X-Api-Secret: " . getenv("ANIMA_SECRET_KEY")
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = json_decode(curl_exec($ch), true);