# 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="/files/CoO7ezEMaE2FGuxiELAp" alt=""><figcaption></figcaption></figure></div>

#### Other fields representation

<figure><img src="/files/sacZWzoOTtabjFleGkdO" 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"
    }
  ]
}
```


---

# 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://docs.anecdoteai.com/docs/direct-data-injection-endpoint/data-format.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.
