API authentication

How to authenticate with the Insites API

Andrew Waite avatar
Written by Andrew Waite
Updated over a week ago

Creating & managing API keys

To start using the Insites API, you will need to create an API key for your account. Only administrators can manage API keys. Use the Insites API control panel to create a key, or follow these instructions:

  1. Go to “Account settings”

  2. Go to “API & integrations”

  3. Go to “API”

  4. Click “Create new key”

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

The Insites API is designed for server-side usage only. Never share your API keys or expose them client-side as part of a front-end application!

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 an Insites report running:

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

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

"status": "running",
"reportId": "3076c8dc5f1c433589245797d938debacb25ed91"

Did this answer your question?