# Webhook

In the Kinetix Developer Portal 'Settings' page, you are required to set up a webhook. The webhook is used by our infrastructure to callback your Cfx Server when the status of the emote creation process changes. This setup allows the resource to download the emote content and stream it back to the client seamlessly, ensuring that emotes are playable as soon as they are ready.

> :warning: <mark style="color:yellow;">A misconfigured webhook will create friction as you would need to manually restart the content resources in order to let players use their content.</mark>

The webhook listener is provided by the kinetix\_mod resource, on POST `/kinetix_mod/webhook/updates`

&#x20;The payload will look like this :&#x20;

```json
{ 
    "uuid": "00000000-0000-4000-8000-000000000123", 
    "user": "myUser123", 
    "status": "done", 
    "emote": "12300000-0000-4000-8000-000000000000", 
    "name": "My emote", 
}
```

{% hint style="warning" %}
You need to allow internet traffic on your Cfx server's port.
{% endhint %}

In our FiveM implementation, we will:

1. Check for the 'done' status before:
   * Downloading the file to the content resource's stream folder.
   * Restarting the content resource to allow the Cfx server to stream the new content to the clients.
2. For any other status, we will simply notify the user of the process's status.

**Security Measures:** To prevent unauthorized access, we will provide an HMAC SHA256 signature of the payload using your API Key. This ensures that the content is coming from us.

You can also create a Web Application Firewall (WAF) rule to ensure queries are coming from Kinetix by whitelisting the following IP addresses:

* 52.210.34.76
* 52.49.177.150
* 54.228.143.186

In case your server goes offline and misses a webhook call, a retry mechanism is in place. When a player requests available emotes, the server will check whether the animation file is available and download it if necessary.

{% hint style="info" %}
Examples of webhooks:\
\- [https://my-server.com/kinetix\_mod/webhook/updates](https://my-server.com/kinetix_mod/webhook/updates)\
\- [http://0.1.2.3:1234/kinetix\_mod/webhook/updates](http://0.1.2.3:1234/kinetix_mod/webhook/updates)
{% endhint %}
