> For the complete documentation index, see [llms.txt](https://docs.licensespring.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.licensespring.com/events-api/event-list/license-custom-field-and-device-variable-events.md).

# License Custom Field and Device Variable Events

Events emitted when license custom fields and device variables are created, updated, or deleted.

License custom field and device variable events report changes to license-specific custom-field values and device key-value pairs.

Use the [event data objects](https://docs.licensespring.com/events-api/event-list/event-data-objects.md) reference for field definitions.

### License custom fields

A license custom field is a product custom-field value assigned to one license.

#### `license_custom_field.created`

**Sent when:**

* a custom field value is set on a license in the vendor platform or with the Management API,
* a license is created with custom field values in a new order or a trial: one event per value.

**Event data:** `license_custom_field` when the Vendor Platform or Management API makes the change.

{% hint style="info" %}
For licenses created through an order or trial, the fields appear directly in `data`. They have no `license_custom_field` wrapper.
{% endhint %}

#### `license_custom_field.updated`

**Sent when:** a license's custom field value is changed in the vendor platform or with the Management API.

**Event data:** `license_custom_field`

#### `license_custom_field.deleted`

**Sent when:** a custom field value is removed from a license in the vendor platform or with the Management API.

**Event data:** `license_custom_field`, as it was before deletion

{% hint style="warning" %}
None of these events are emitted when values change through a license edit, license policy, license reset with **reset custom fields**, or scheduled update. They are also not emitted when the product custom field is deleted.
{% endhint %}

### Device variables

Device variables are key-value pairs sent by your application for a device. You can also add them through the Vendor Platform.

#### `device_variable.created`

**Sent when:** Your application sends a variable the device does not have yet. This can happen through **Track Device Variables** or variables in an activation or deactivation. The event is also sent when someone adds a variable through the Vendor Platform or Management API. One event is sent for each variable.

#### `device_variable.updated`

**Sent when:** Your application sends a new value for an existing variable. The event is also sent when someone edits it through the Vendor Platform or Management API.

{% hint style="info" %}
Sending the same value again does not emit an event.
{% endhint %}

#### `device_variable.deleted`

**Sent when:** Someone deletes a variable through the Vendor Platform or Management API.

{% hint style="info" %}
Your application cannot delete variables. The License API does not emit this event.
{% endhint %}

### Device variable data location

All three device-variable events use a data shape that depends on the change source.

| Change source                            | Event data                                                              |
| ---------------------------------------- | ----------------------------------------------------------------------- |
| Vendor Platform or Management API        | `device_variable`: `id`, `device_id`, `variable`, `value`               |
| Your application through the License API | Directly in `data`: `id`, `variable`, `value`, `device` (the device ID) |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.licensespring.com/events-api/event-list/license-custom-field-and-device-variable-events.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
