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:
Go to “Account settings”
Go to “API & integrations”
Go to “API”
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"
}