Headers

Authorization Header

The Authorization header is required to authenticate all requests. Its value is your API token exactly as shown when you generated it, including the leading word Token:

Authorization: Token AbC123dEf456:xYz789gHi012jKl345

This is not your Bugcrowd username and password. See Authentication for how to create a token. The examples below read the token from a HACKER_API_TOKEN environment variable.

Accept Header

All Hacker API responses are JSON. We recommend sending the following Accept header with every request:

Accept: application/json

Content-Type Header

For requests that include a JSON request body (such as POST /v1/submissions), include the Content-Type header:

Content-Type: application/json

Example Request

curl --include \
     --header "Accept: application/json" \
     --header "Authorization: $HACKER_API_TOKEN" \
     --header "Content-Type: application/json" \
     --request POST \
     --data '{
       "engagement_id": "00000000-0000-0000-0000-000000000000",
       "title": "Stored XSS in profile name",
       "description": "Steps to reproduce...",
       "bug_url": "https://example.com/profile",
       "vulnerability_type": "cross_site_scripting_xss.stored.non_admin_to_anyone",
       "target": "00000000-0000-0000-0000-000000000000"
     }' \
  'https://hacker-api.bugcrowd.com/v1/submissions?draft=true'