Integrations / API

API authentication

  • Applies to:
  • Premium
  • Enterprise

Managing your API keys

To start using the API, you will need to create an API key for your account.  Only administrators can create API keys.  To create a key:

  1. Go to “Account admin”
  2. Go to “API keys”
  3. Click “Create new key”
Creating an API key via the account administrator settings

Creating an API key via the account administrator settings

You can create multiple keys if necessary, and you can revoke a key if necessary.

Authenticating a request

Send your API key as a header named “api-key” with each request.  Here’s a cURL example you can run in your command line which will start a Haystack report running:

curl "https://api.haystack.report/api/v1/report" --header "api-key: [YOUR API KEY]" --data "{\"url\":\"haystack.report\"}"

If successful, you would expect a 202 response, with a body like this:

{  
   "status":"running",
   "reportId":"3076c8dc5f1c433589245797d938debacb25ed91"
}
  • Was this helpful?
  • Yes   No