Skip to main content

Webhooks

Trigger Afterlane automatically after your deploy succeeds.

Deploy trigger flow

The webhook only queues a verification run. The worker performs the browser checks separately.

The recommended setup is:

  1. Open your Afterlane project → Deploy automation tab.
  2. Click Copy agent setup prompt and paste it into your coding agent (Cursor, Claude Code, etc.).
  3. Let the agent add GitHub secrets and the CI workflow step, or use Connect GitHub for a one-click setup PR.
  4. Confirm with Send test webhook or after your next deploy — the tab should show Connected.

Manual setup

  1. Copy the project webhook URL from the Advanced section on the Deploy automation tab.
  2. Store AFTERLANE_PROJECT_ID and AFTERLANE_WEBHOOK_SECRET in your CI secrets.
  3. Fire the webhook after a successful deploy step.

Authentication accepts X-Afterlane-Webhook-Secret, Authorization: Bearer <secret>, or a secret query parameter.

What the webhook does

  • validates the project secret
  • queues a run with the webhook trigger
  • hands off execution to the worker

GitHub Actions example (curl)

- name: Trigger Afterlane verification
  if: success()
  run: |
    curl -X POST "https://afterlane.co/api/webhooks/deploy/${{ secrets.AFTERLANE_PROJECT_ID }}"       -H "Content-Type: application/json"       -H "Authorization: Bearer ${{ secrets.AFTERLANE_WEBHOOK_SECRET }}"       -d '{
        "provider": "github_actions",
        "branch": "${{ github.ref_name }}",
        "commitSha": "${{ github.sha }}",
        "repository": "${{ github.repository }}",
        "workflow": "${{ github.workflow }}"
      }'

GitHub Actions example (composite action)

- name: Trigger Afterlane verification
  if: success()
  uses: afterlane/verify-deploy@v1
  with:
    project-id: ${{ secrets.AFTERLANE_PROJECT_ID }}
    webhook-secret: ${{ secrets.AFTERLANE_WEBHOOK_SECRET }}