Quickstart

Quickstart

Start monitoring your first policy in less than 5 minutes.

1. Create a Monitor

Send a POST request to the /v1/monitor endpoint with the URL you want to track.

curl -X POST https://api.policydiff.org/v1/monitor \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/privacy"}'

Response:

{
"job_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"status": "PENDING"
}

2. Check Status

Poll the status using the job_id returned in step 1.

curl -X GET https://api.policydiff.org/v1/jobs/a1b2c3d4-e5f6-7890-1234-567890abcdef \
-H "Authorization: Bearer YOUR_API_KEY"

3. Interpret Diff Results

When the job completes, the result field will contain the structural diff and risk analysis.

{
"job_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"status": "COMPLETED",
"result": {
"risk_level": "HIGH",
"changes": [
{
"section": "Dispute Resolution",
"type": "MODIFIED",
"risk": "HIGH",
"reason": "Arbitration clause added"
}
]
}
}