Skip to content
/docs

Policy Generation

Use Charter for natural-language policy drafting.

The current SDK does not publish veto-sdk/policy.

Use Charter for policy generation:

import { Veto } from "veto-sdk";

const veto = await Veto.init();

const res = await fetch("https://api.veto.so/v1/charter/turn", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-Veto-API-Key": process.env.VETO_API_KEY!,
  },
  body: JSON.stringify({
    message: "Refunds over $200 require support lead approval.",
    mode: "compile",
    surface: "api",
  }),
});
const turn = await res.json();

console.log(turn.verification.linkUrl);

Production policy changes require verification before they go live.

On this page

No Headings