Authentication is handled via a API bearer token in the Authorization header in your requests.
Creating an API token
Nearly all endpoints provided by this API require you to be authenticated when making your API requests. To get started, head over to Contractors Cloud and create a new API token from the API Keys page. When creating your token, you will be required to provide a name for it. This name is entirely up to you but we recommend using a name that describes how your token will be used (zapier, leads form, contact integration, etc.)
⚠️ Warning
API tokens you generate are long lived and do not expire. Additionally, if you lose an API token value, you will need to generate a new one.
Using your API token
Once you have an API token, you will need to attach it as a Bearer token in the Authorization header for all of your requests:
Authorization: Bearer YOUR_API_TOKEN
If you attempt to make an API request with a missing, misconfigured or revoked API token, you will receive a 401 Unauthorized
status code from the response.
Headers
Along with including your API Bearer token as an Authorization header, you should also include the following headers:
Accept: application/json
Content-Type: application/json
Unless otherwise noted, the above headers are required for proper API data consumption.