Webhook Documentation

Real-time notifications for report activity

Introduction

Webhooks POST a JSON event to your server when something happens in your program: reports, comments, invites and access requests being created, updated or deleted. You'll need a paid plan.

Authentication

Each webhook gets its own secret, and every delivery is signed with it so you can tell it really came from us. Keep it on your server.

Setting Up Webhooks

  1. On your program, open Settings and choose Webhooks
  2. Click Create Webhook, enter your URL and pick the events you want
  3. Copy the secret. It's shown in full for 5 minutes, then masked

Your endpoint needs to be a public HTTPS URL accept the connection within 10 seconds and return a 2xx within 30. Anything else counts as a failure and gets retried.

Verifying Webhooks

Every delivery has a Bugbop-Signature header:

Bugbop-Signature: t=1617022962,signature=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd

The signature is a hex HMAC-SHA256 of {t}.{raw body}, keyed with your secret as is. Compute it and compare in constant time. t is when the event happened, not when we sent it, and a retry keeps the same t, so don't reject a delivery for being old.

Each delivery also has an Idempotency-Key header that stays the same across its retries. Use it to ignore a delivery you've already handled.

# Ruby example (Rails)
def verify_webhook_signature
  payload = request.raw_post
  signature_header = request.headers['Bugbop-Signature']
  webhook_secret = ENV['BUGBOP_WEBHOOK_SECRET']
  
  # Parse header to extract timestamp and signature
  header_parts = {}
  signature_header.to_s.split(',').each do |part|
    key, value = part.split('=')
    header_parts[key] = value if key.present? && value.present?
  end
  
  timestamp = header_parts['t']
  signature = header_parts['signature']
  
  # Skip verification if missing timestamp or signature
  return false unless timestamp && signature

  # Compute expected signature
  signed_payload = "#{timestamp}.#{payload}"
  expected_signature = OpenSSL::HMAC.hexdigest('sha256', webhook_secret, signed_payload)
  
  # Use secure_compare to prevent timing attacks
  ActiveSupport::SecurityUtils.secure_compare(expected_signature, signature)
end

Handling Events

Every event has an id, event_type, timestamp and the thing that changed in data.object.

Report Created Event

data.object is the same report object the REST API returns, minus internal notes, AI triage and the suspected duplicate.

{
  "id": "evt_1a2b3c4d5e6f",
  "event_type": "report.created",
  "timestamp": 1617022962,
  "data": {
    "object": {
      "id": "6f5e4d3c-2b1a-4c3d-9e8f-0a1b2c3d4e5f",
      "title": "XSS vulnerability in login form",
      "status": "new",
      "severity": "high",
      "scope_warning": false,
      "description": "# XSS Vulnerability\n\nI discovered an XSS vulnerability in your login form.\n\n**Steps:**\n\n1. Go to login page\n2. Enter script tag\n3. Submit form",
      "program": {
        "id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
        "name": "Web Security Program",
        "url": "https://bugbop.com/programs/1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
        "api_url": "https://bugbop.com/api/v1/programs/1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"
      },
      "user": {
        "id": "9f8e7d6c-5b4a-4f3e-8d2c-1b0a9f8e7d6c",
        "username": "securitybughunter",
        "url": "https://bugbop.com/profile/securitybughunter",
        "created_at": "2024-11-02T08:12:00Z"
      },
      "duplicate_of_id": null,
      "comments_count": 0,
      "bounty_total_cents": 0,
      "url": "https://bugbop.com/programs/1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d/reports/6f5e4d3c-2b1a-4c3d-9e8f-0a1b2c3d4e5f",
      "api_url": "https://bugbop.com/api/v1/reports/6f5e4d3c-2b1a-4c3d-9e8f-0a1b2c3d4e5f",
      "comments_url": "https://bugbop.com/api/v1/reports/6f5e4d3c-2b1a-4c3d-9e8f-0a1b2c3d4e5f/comments",
      "created_at": "2025-04-03T09:32:53Z",
      "updated_at": "2025-04-03T09:32:53Z"
    }
  }
}

Comment Created Event

{
  "id": "evt_2b3c4d5e6f7g",
  "event_type": "comment.created",
  "timestamp": 1617023962,
  "data": {
    "object": {
      "id": "3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f",
      "report_id": "6f5e4d3c-2b1a-4c3d-9e8f-0a1b2c3d4e5f",
      "user": {
        "id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
        "username": "programadmin",
        "url": "https://bugbop.com/profile/programadmin",
        "created_at": "2024-01-15T03:00:00Z"
      },
      "content": "Thank you for your report!\n\n**Next steps:**\n\n- Patch in development\n- Deploy by Friday",
      "metadata": {},
      "program": {
        "id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
        "name": "Web Security Program",
        "url": "https://bugbop.com/programs/1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
        "api_url": "https://bugbop.com/api/v1/programs/1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"
      },
      "url": "https://bugbop.com/programs/1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d/reports/6f5e4d3c-2b1a-4c3d-9e8f-0a1b2c3d4e5f#comment-3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f",
      "api_url": "https://bugbop.com/api/v1/comments/3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f",
      "report_url": "https://bugbop.com/api/v1/reports/6f5e4d3c-2b1a-4c3d-9e8f-0a1b2c3d4e5f",
      "created_at": "2025-04-03T09:45:53Z",
      "updated_at": "2025-04-03T09:45:53Z"
    }
  }
}

Program Access Request Event

{
  "id": "evt_3d4e5f6g7h8i",
  "event_type": "program_access_request.created",
  "timestamp": 1617024962,
  "data": {
    "object": {
      "id": "4e5f6a7b-8c9d-4e0f-9a1b-2c3d4e5f6a7b",
      "program": {
        "id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
        "name": "Web Security Program",
        "url": "https://bugbop.com/programs/1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
        "api_url": "https://bugbop.com/api/v1/programs/1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"
      },
      "url": "https://bugbop.com/programs/1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d/program_access_requests/4e5f6a7b-8c9d-4e0f-9a1b-2c3d4e5f6a7b",
      "api_url": "https://bugbop.com/api/v1/access_requests/4e5f6a7b-8c9d-4e0f-9a1b-2c3d4e5f6a7b",
      "user": {
        "id": "3d4e5f6a-7b8c-4d9e-8f0a-1b2c3d4e5f6a",
        "username": "securitybughunter",
        "url": "https://bugbop.com/profile/securitybughunter",
        "created_at": "2024-11-02T08:12:00Z",
        "strikes_count": 0,
        "bounties_paid_count": 3
      },
      "status": "pending",
      "message": "I've tested a lot of OAuth flows and would like to take a look at yours.",
      "rejection_reason": null,
      "acceptance_message": null,
      "created_at": "2025-04-03T10:02:53Z",
      "updated_at": "2025-04-03T10:02:53Z"
    }
  }
}

Retries resend the exact same body, so dedupe on id. Reply fast and do anything slow in a background job. A basic handler:

# Ruby example (Rails)
class WebhooksController < ApplicationController
  skip_before_action :verify_authenticity_token
  
  def handle
    return head :unauthorized unless verify_webhook_signature

    event = JSON.parse(request.raw_post)
    return head :ok if event['event_type'] == 'webhook.ping'
    return head :ok if ProcessedEvent.exists?(event_id: event['id'])

    case event['event_type']
    when 'report.created'
      ReportProcessor.process_new_report(event['data']['object'])
    when 'comment.created'
      CommentProcessor.process_new_comment(event['data']['object'])
    end

    ProcessedEvent.create!(event_id: event['id'])
    head :ok
  end
end

Retrying Webhooks

Failed deliveries are retried with exponential backoff: 15 seconds, then doubling each time (with ±15% jitter), capped at 12 hours between tries. That's up to 25 retries over about a week. You can see each delivery's status and response code on the webhook's page.

Testing Webhooks

Hit Test on the webhook's page to send a webhook.ping. It's signed like everything else, so it's a quick way to check your verification. It has no id or data.object, just {"event_type": "webhook.ping", "data": {"webhook_id": "..."}, "timestamp": ...}.

After that, create a report or comment on your program to get real events. webhook.site and ngrok are handy while you're building.

Events Reference

Event Type Description
report.created Triggered when a new report is created
report.updated Triggered when a report is updated
report.deleted Triggered when a report is deleted
comment.created Triggered when a comment is created
comment.updated Triggered when a comment is updated
comment.deleted Triggered when a comment is deleted
program_invite.created Triggered when a program invite is created
program_invite.updated Triggered when a program invite is updated
program_invite.deleted Triggered when a program invite is deleted
program_access_request.created Triggered when an access request is created
program_access_request.updated Triggered when an access request is updated
program_access_request.deleted Triggered when an access request is deleted
webhook.ping Triggered manually for testing webhooks

Payload Objects

What you'll find in data.object for each event type.

Report Object

Same as the REST API, minus internal notes, AI triage and the suspected duplicate.

{
  "id": "string (UUID)",
  "title": "string",
  "status": "new|open|needs_info|fixed|wont_fix|duplicate|not_applicable",
  "severity": "low|medium|high|critical|null",
  "scope_warning": "boolean",
  "description": "string (Markdown)",
  "program": { "id": "string", "name": "string", "url": "string", "api_url": "string" },
  "user": { "id": "string", "username": "string", "url": "string", "created_at": "string" },
  "duplicate_of_id": "string|null",
  "comments_count": "integer",
  "bounty_total_cents": "integer",
  "url": "string (URL to view the report)",
  "api_url": "string (REST API URL for the report)",
  "comments_url": "string (REST API URL for the report's comments)",
  "created_at": "string (ISO 8601 datetime)",
  "updated_at": "string (ISO 8601 datetime)"
}

Comment Object

{
  "id": "string (UUID)",
  "report_id": "string",
  "user": { "id": "string", "username": "string", "url": "string", "created_at": "string" },
  "content": "string (Markdown)",
  "metadata": "object",
  "program": { "id": "string", "name": "string", "url": "string", "api_url": "string" },
  "url": "string (URL to view the comment)",
  "api_url": "string (REST API URL for the comment)",
  "report_url": "string (REST API URL for the report)",
  "created_at": "string (ISO 8601 datetime)",
  "updated_at": "string (ISO 8601 datetime)"
}

Program Invite Object

{
  "id": "string",
  "email": "string",
  "role": "string",
  "url": "string (the program's Bug Hunters tab for hunter invites, its Users tab otherwise, where pending invites are listed)",
  "program": { "id": "string", "name": "string", "url": "string", "api_url": "string" },
  "user": { "id": "string", "username": "string", "url": "string", "created_at": "string" } | null,
  "expires_at": "string (ISO 8601 datetime)",
  "accepted_at": "string (ISO 8601 datetime)|null",
  "created_at": "string (ISO 8601 datetime)",
  "updated_at": "string (ISO 8601 datetime)"
}

Program Access Request Object

{
  "id": "string",
  "status": "pending|approved|rejected",
  "message": "string",
  "rejection_reason": "string|null",
  "acceptance_message": "string|null",
  "url": "string (URL of the access request page)",
  "api_url": "string (the access request in the REST API)",
  "program": { "id": "string", "name": "string", "url": "string", "api_url": "string" },
  "user": { "id": "string", "username": "string", "url": "string", "created_at": "string", "strikes_count": "integer", "bounties_paid_count": "integer" },
  "created_at": "string (ISO 8601 datetime)",
  "updated_at": "string (ISO 8601 datetime)"
}

Stuck on webhooks?

Reach out and we can help you wire things up.