Authentication

Obtaining your API key

Authentication is done via an api key. This key can be found via the following navigation:

  • Log in to your account at https://accounts-app.bullethq.com/home.page
  • Click on Settings Icon in the navigation bar on the top right
  • Click on the "Account API Details"

Passing your API key in an authorization header

API authentication is done using HTTP Basic authentication. The username to use the is email address you use to login to bullet with, and the password is the api key.

For example, using the credentials in the above screenshot, the username is yourusername@youremail.com and your password is 237d11f56a84d61e9f11198f662Oba1. Using curl, you would specify your credentials as follows:

curl -u yourusername@youremail.com:237d11f56a84d61e9f11198f662Oba1 ...

Multiple Companies

If you have multiple companies, you need include the company id as part of the credentials. The id of each of your companies is viewable from the "Account API Details" page. Note, adding company id to the credentials is not required if you only have one company on Bullet.

For example, if the id of one of your companies is 35334, then using curl, you would specify your credentials as follows:

      curl -u yourusername@youremail.com:35334:237d11f56a84d61e9f11198f662Oba1 ...
      
If you dont specify a company id, and you have multiple companies, you will get an error like
    { "type" :"UNAUTHORIZED",
        "message":"Must specify a company"
    }