Skip to main content

Overview

Webhooks notify your application when events occur in Rubric.

Supported Events

EventDescription
evaluation.completedEvaluation finished
evaluation.failedEvaluation failed
review.submittedHuman review completed
review.escalatedReview escalated

Creating a Webhook

webhook = client.webhooks.create(
    url="https://your-app.com/webhooks/rubric",
    events=["evaluation.completed", "review.submitted"],
    secret="your_secret"
)

Verifying Signatures

from rubric.webhooks import verify_signature

is_valid = verify_signature(
    payload=request.body,
    signature=request.headers["X-Rubric-Signature"],
    secret=webhook_secret
)