Policy Compiler
Manage your videos, ask questions, and build applications with the Platform API. Explore the operations below for request details, responses, and examples.
No matching documentation. Try a different search.
Policy Compiler
Compile moderation policy documents into structured rules for automated enforcement. Upload policy PDFs via Documents, then compile them into a machine-readable policy snapshot.
POST/api/v1/projects/:projectId/policy/compileCompile policy from uploaded documents
Compile policy from uploaded documents
Triggers background compilation. Returns immediately — poll /policy/snapshot for progress.
GET/api/v1/projects/:projectId/policy/snapshotGet compiled policy snapshot
Get compiled policy snapshot
Returns the compiled policy (categories, rules, action taxonomy) and compile status. Poll every 3s while compile_status is non-null.
PUT/api/v1/projects/:projectId/policy/snapshotUpdate policy snapshot (promote/edit)
Update policy snapshot (promote/edit)
Send the request to https://platform.endlessai.com/api/v1/projects/:projectId/policy/snapshot using your project key or user token.
DELETE/api/v1/projects/:projectId/policy/allBetaDelete all policies and policy documents
Delete all policies and policy documents
Beta: this operation may change before it is final.
Send the request to https://platform.endlessai.com/api/v1/projects/:projectId/policy/all using your project key or user token.
GET/api/v1/projects/:projectId/policy/open-questionsGet open questions from compilation
Get open questions from compilation
Questions the compiler couldn't resolve from the policy documents. Answering them improves accuracy on recompile.
PUT/api/v1/projects/:projectId/policy/open-questions/:questionId/resolveResolve an open question
Resolve an open question
{ "answer": "Profanity should be flagged, not banned" }POST/api/v1/projects/:projectId/policy/apply-answersApply your answers to the compiled policy
Apply your answers to the compiled policy
Updates the compiled policy with the open questions you have resolved, without a full recompile. Runs in the background — poll /policy/snapshot for the result. Needs write access.
// Response
{ "data": null, "compile_status": "applying", "message": "Applying answers to the policy" }