# Getting Started

The following is examples of how to submit data using cURL or Python:

#### cURL Example

```url
curl -X POST 'https://api.anec.app/ingestion' \
     -H 'Content-Type: application/json' \
     -H 'Authorization: Bearer YOUR_PRESHARED_KEY' \
     -d '{
				  "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"
				    }
				  ]
				}'
```

#### Python

```python
import requests
import json

url = 'https://api.anec.app/ingestion'

headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_PRESHARED_KEY'
}

data = {
    "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"
        }
    ]
}

response = requests.post(url, headers=headers, data=json.dumps(data))

print(response.text)


```

Upon successful data submission, the system will respond with a status code of 200, accompanied by a message indicating that the data has been successfully added:&#x20;

`{"statusCode": 200, "body": "Data is Added Successfully"}`


---

# 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/getting-started.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.
