# Events

{% hint style="info" %}
All webhook events sent to your endpoint will contain an **eventType** and **data** properties.‍
{% endhint %}

{% hint style="info" %}
The data property is specific to the event that triggered it and includes an array of affected copy components. This ensures that events happening in bulk will trigger your endpoints once for each action.
{% endhint %}

## Components creation

Triggered each time components are created.

```json
{
    eventType: "components.created",
    data: {
        components: [{
            _fttdInternalComponentId, // Frontitude's internal id, can be helpful for debugging.
            uniqueKey, // if a unique key isn't set, it will be auto-set with a temporary persistent unique id that starts with the 'frontitude-' prefix.
            name,
            value, // a string if the component is not pluralized, else, an object that represents plurals: { zero?, one?, two?, few?, many?, other? }.
            tags, // string array
            status, // "New"/"Draft"/"Review"/"Final"
            note,
            frontitudeLink
        }]
    }
}
```

## Components deletion

Triggered each time components are deleted.

```json
{
    eventType: "components.deleted",
    data: {
        components: [{
            _fttdInternalComponentId, // Frontitude's internal id, can be helpful for debugging.
            uniqueKey // if a unique key isn't set, it will be auto-set with a temporary persistent unique id that starts with the 'frontitude-' prefix.
        }]
    }
}‍
```

## Components value change

Triggered each time components’ values are changed (including plurals) in any language (source language or translations).

```json
{
    eventType: "components.value.changed",
    data: {
        components: [{
            _fttdInternalComponentId, // Frontitude's internal id, can be helpful for debugging.
            uniqueKey, // if a unique key isn't set, it will be auto-set with a temporary persistent unique id that starts with the 'frontitude-' prefix.
            localeId, // locale id is set for target translation languages, else, for source language it will be set as undefined.
            value, // a string if the component is not pluralized, else, an object that represents plurals: { zero?, one?, two?, few?, many?, other? }.
                   // if a translation was removed for the locale id, the value may be unset.
            previousValue // may be undefined if it's the first time this locale id was translated into
        }]
    }
}
```

‍

## Components status change

Triggered each time components' statuses are changed in any language (source language or translations).

```json
{
    eventType: "components.status.changed",
    data: {
        components: [{
            _fttdInternalComponentId, // Frontitude's internal id, can be helpful for debugging.
            uniqueKey, // if a unique key isn't set, it will be auto-set with a temporary persistent unique id that starts with the 'frontitude-' prefix.
            localeId, // locale id is set for target translation languages, else, for source language it will be set as undefined.
            status, // "New"/"Draft"/"Review"/"Final"
            previousStatus
        }]
    }
}
```

## Components unique key change

Triggered each time components' unique keys are changed.

```json
{
    eventType: "components.uniqueKey.changed",
    data: {
        components: [{
            _fttdInternalComponentId, // Frontitude's internal id, can be helpful for debugging.
            uniqueKey, // if a unique key isn't set, it will be auto-set with a temporary persistent unique id that starts with the 'frontitude-' prefix.
            previousUniqueKey
        }]
    }
}
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.frontitude.com/webhooks/events.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
