Optio can send webhook events to any URL when a task transitions to a new state. Use webhooks to trigger downstream automation — post to Slack, update a dashboard, kick off a deployment pipeline, or anything else your workflow requires.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/jonwiggins/optio/llms.txt
Use this file to discover all available pages before exploring further.
Setting up a webhook
Enter the endpoint URL
Provide the HTTPS URL that should receive the events. Optio will
POST JSON to this address.Add a signing secret (recommended)
Enter a random string as the Secret. Optio will include an
X-Optio-Signature header on every delivery so you can verify the payload was not tampered with. Keep this value private.Event types
task.completed
task.completed
Fired when a task reaches the
completed state. This typically happens when the pull request opened by the agent is merged.When to use: trigger post-merge actions such as deploying to staging, posting a release note, or closing a related ticket in an external system.task.failed
task.failed
Fired when a task reaches the
failed state. This can happen if the agent exits with an error or if the PR is closed without merging.When to use: alert your team via Slack or PagerDuty, or open an incident ticket automatically.task.needs_attention
task.needs_attention
Fired when a task reaches the
needs_attention state. This occurs when a reviewer has requested changes and auto-resume is not enabled, or when the agent encounters an issue it cannot resolve autonomously.When to use: notify a human that input is needed before the agent can continue.task.pr_opened
task.pr_opened
Fired when the agent opens a pull request and the task transitions to
pr_opened.When to use: post a link to the PR in a team chat channel, or trigger a custom CI step.review.completed
review.completed
Fired when a code review subtask completes. The review agent may approve the PR or request changes.When to use: track review completion separately from task completion, or trigger custom logic based on review outcomes.
Webhook payload
Every event is delivered as aPOST request with a JSON body. The payload structure is:
Delivery and retries
Optio delivers each event asynchronously via a background worker. If your endpoint returns a non-2xx status code or does not respond within the timeout window, Optio will retry the delivery with exponential backoff. You can inspect recent deliveries — including the HTTP status code returned by your endpoint and the full payload — in the Delivery log for each webhook: go to Settings → Webhooks → [webhook] → Deliveries.Verifying webhook signatures
When you set a secret on a webhook, Optio signs every payload with HMAC-SHA256 and includes the signature in theX-Optio-Signature header as sha256=<hex-digest>.
Verify the signature in your endpoint before processing the payload:
