# Api Commands

{% hint style="info" %}
To use the Web SDK please [install ](https://docs.getcomplied.com/how-to-install)the snippet first.
{% endhint %}

&#x20;**Api commands will only work after popup is initialized (there is a callback for when it is initialized)**

| Command                                                                                          | Description                               | Values                                    | Callback data                             |
| ------------------------------------------------------------------------------------------------ | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- |
| `getComplied.api('policy-consent', {Id: 0, Grant: false}, function(data){ /* callback */ })`     | Sets the consent of a specific policy     | <p>Id (policy id)<br>Grant (bool)</p>     | <p>Success (bool)<br>Message (string)</p> |
| `getComplied.api('thirdparty-consent', {Id: 0, Grant: false}, function(data){ /* callback */ })` | Sets the consent of a specific thirdparty | <p>Id (thirdparty id)<br>Grant (bool)</p> | <p>Success (bool)<br>Message (string)</p> |
| `getComplied.api('cookies-consent', {Grant: false}, function(data){ /* callback */ })`           | Sets the consent of the cookies           | Grant (bool)                              | <p>Success (bool)<br>Message (string)</p> |
