# Incapsula

{% hint style="info" %}
Tip: Use one of the [SDKs](https://docs.hypersolutions.co/readme-1) instead of directly calling the API.
{% endhint %}

This API generates human-like data based on the most recent chrome browser version on Windows. It is recommended to match the latest UserAgent of the newest chrome version when using this API on a site.\
\
The latest chrome useragents can be found [here](https://versionhistory.googleapis.com/v1/chrome/platforms/win/channels/stable/versions/). It is perfectly fine to use only one useragent for all your requests.\
\
Note that all request payloads to this API should be sent as `application/json`.

## Generate reese84 sensor

## Generate reese84 sensor

> Generates sensor data that should be posted in order to acquire valid "reese84" cookies

```json
{"openapi":"3.0.0","info":{"title":"Incapsula Reese84 Sensor and UTMVC Cookie API","version":"1.0.0"},"servers":[{"url":"https://incapsula.hypersolutions.co","description":"Server for reese84 and utmvc endpoints"}],"paths":{"/reese84":{"post":{"summary":"Generate reese84 sensor","description":"Generates sensor data that should be posted in order to acquire valid \"reese84\" cookies","operationId":"generateReese84Sensor","parameters":[{"in":"header","name":"Content-Type","required":true,"schema":{"type":"string","enum":["application/json"]},"description":"The Content-Type of the request body"},{"in":"header","name":"x-api-key","required":true,"schema":{"type":"string"},"description":"Your API key for authentication"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["userAgent","pageUrl","script","scriptUrl","acceptLanguage","ip"],"properties":{"userAgent":{"type":"string","description":"The userAgent that you're using for the entire session"},"pageUrl":{"type":"string","description":"Your page URL."},"script":{"type":"string","description":"The script content as a string."},"scriptUrl":{"type":"string","description":"The script url where you got the script contents from."},"ip":{"type":"string","description":"The IP that is used to post the sensor data to the target site. You can use /ip to get the IP from a connection. If you are not using proxies, this will be the IPv4 or IPv6 address of your pc."},"acceptLanguage":{"type":"string","description":"Your accept-language header."},"pow":{"type":"string","description":"The pow string fetched from incapsula resource."}}}}}},"responses":{"200":{"description":"OK Sensor data successfully generated","content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"type":"string","description":"The generated sensor data"}}}}}},"400":{"description":"Bad Request Error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}}}}},"403":{"description":"Forbidden Authentication error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}}}}}}}}}}
```

## Generate utmvc cookie

{% hint style="success" %}
Since the request body of the requests will be large, it is highly recommended to apply compression to your request body first. We support the following compression methods: "gzip", "br" and "deflate".<br>

Don't forget to set the `content-encoding` header.
{% endhint %}

## Generate utmvc cookie

> Generates a utmvc cookie

```json
{"openapi":"3.0.0","info":{"title":"Incapsula Reese84 Sensor and UTMVC Cookie API","version":"1.0.0"},"servers":[{"url":"https://incapsula.hypersolutions.co","description":"Server for reese84 and utmvc endpoints"}],"paths":{"/utmvc":{"post":{"summary":"Generate utmvc cookie","description":"Generates a utmvc cookie","operationId":"generateUtmvcCookie","parameters":[{"in":"header","name":"Content-Type","required":true,"schema":{"type":"string","enum":["application/json"]},"description":"The Content-Type of the request body"},{"in":"header","name":"x-api-key","required":true,"schema":{"type":"string"},"description":"Your API key for authentication"},{"in":"header","name":"content-encoding","schema":{"type":"string"},"description":"In case you want to improve latency to our APIs, you can apply encoding to your request payload and set the content-encoding header accordingly."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["script","sessionIds","userAgent"],"properties":{"script":{"type":"string","description":"The JavaScript obtained from doing a GET request to the script path."},"sessionIds":{"type":"array","items":{"type":"string"},"description":"The value of each cookie that has a name that starts with incap_ses_."},"userAgent":{"type":"string","description":"The userAgent that you're using for your whole session."}}}}}},"responses":{"200":{"description":"OK Cookie was generated","content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"type":"string","description":"The generated cookie value"},"swhanedl":{"type":"string","description":"Parameters for /_Incapsula_Resource?SWHANEDL= request"}}}}}},"400":{"description":"Bad Request Error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}}}}},"403":{"description":"Forbidden Authentication error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}}}}}}}}}}
```
