# Data Format

When submitting data to the Direct Data Injection endpoint, the JSON payload must be structured with the following fields:

* **`source`**: A required text field to indicate the source or significance of the data submitted, which will be displayed in the user interface and can be filtered accordingly.
* **`records`**: An array of record objects, each including:

  * **`ds`**: A datetime field with timezone information, formatted as **`YYYY-MM-DDTHH:MM:SS+TZ00`**, where **`+TZ`** should be replaced with the appropriate timezone offset. For example, **`2024-02-15T13:45:30+0200`** for Eastern European Time. This field is required for each record.
  * **`message`**: A generic term for all text data that will be used for analysis. Practically, it can be a review, survey response, customer support call transcript, and more
  * **`filters`**: A dictionary that may contain any applicable filters. If there are no filters, this should be an empty dictionary. Filters/attributes - key-value pair that will be used to slice and dice the reports. The number of unique filters values must be >> smaller then the number of messages. All the filters will over 1000 unique values will be dropped by the system.
  * **`score`** : A integer field that contains information about rating of ticket/review. Optional field
  * **`user_name` :** An optional text field, that will be used to display author of the ticket
  * **`url` :** An optional text field, that will be used to add hyperlink to ticket components in Anecdote UI.

**Filters**

<div align="center" data-full-width="true"><figure><img src="https://1572431749-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fj2TzWUXlF2d5tKz5fArV%2Fuploads%2Fw67v9QQ9jPV9Jq9OVO5t%2Fimage.png?alt=media&#x26;token=e1ab3af6-8ee5-4c96-adb7-35bbff6e397f" alt=""><figcaption></figcaption></figure></div>

#### Other fields representation

<figure><img src="https://1572431749-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fj2TzWUXlF2d5tKz5fArV%2Fuploads%2Fd12SGSEdbcYQghQoe7At%2Fimage.png?alt=media&#x26;token=39431d1a-2d22-4bf0-9058-15faeb6239fd" alt=""><figcaption></figcaption></figure>

```
{
  "source": "test_source_identifier",
  "records": [
    {
      "ds": "2024-02-15T13:45:30+0200",
      "message": "Test Message",
      "filters": {
				"country": "en",
				"age": 27,
        "tags": ["IOS", "Android"]
				},
			"score": 4,
      "user_name": "adil_badil",
      "url": "some_url"
    }
  ]
}
```
