If you know competitors for a given business, you can inject them so that Insites shows these as suggestions on the competitors section of an audit.
Add competitor suggestions
Generate a single-use login token
Method: POST
Endpoint: https://api.insites.com/api/v1/report/{id}/competitor-suggestions
Request body should be JSON encoded, and can include the following fields:
Property | Definition | Required |
username | String โ This userโs username (usually their email address) | Yes |
path | String โ The app path to send the user to after the token has been generated (e.g. | No |
force_user_account | Boolean - If the user has access to more than one Insites account, setting this option to true will move the user into the account associated with the API key. | No |
Example
curl "https://api.insites.com/api/v1/auth-token" --header "api-key:[YOUR API KEY]" --data "{"username":"[EMAIL]","path":"[PATH]"}"
Expected response
If successful, you would expect a 201 response, with a body containing the authentication token and a pre-assembled redirect link like this:
โ
{
"token":"12345",
"redirect_to":"https://app.insites.com/all-reports?auth_jwt=12345",
}
All possible responses
Code | Reason |
201 | Token created. |
403 | Account does not have sufficient permissions to generate tokens. |
404 | The user could not be found, does not exist in your account or has a permission level that prohibits generation of authentication tokens. |