# Quick Start Guide

#### Phase 1: Platform Configuration

{% hint style="info" %}
Note: For this guide, we will manually set up the structure in the web interface to get started quickly. However, for advanced or scaled integrations, all the steps below (creating groups, defining data sources, and publishing) can be performed programmatically via the API endpoints (e.g., `/api/input/survey/create`).
{% endhint %}

1. Log in to the BAI platform.
2. Create a Feedback Group

   This serves as your primary container (for example, *“Customer Support Logs”*).
3. Create an Endpoint (Data Source)

   Within the Feedback Group, create a new endpoint (for example, *“Live Chat Logs”*).

   * Click Start Collecting Feedback → Connectors → API Endpoint
   * Define the expected payload format for your data.
   * Save all the information shared, as it will be essential to sending data correctly
4. Enable Ongoing Collection (Optional)
   * Locate the newly created Endpoint/Data Source.
   * Click the three-dot menu (…).
   * Open Advanced Options.
   * Toggle Ongoing feedback collection to ON.

{% hint style="success" %}
*Why this matters:* Enabling ongoing collection tells BoundaryAI to treat incoming data as a continuous stream rather than a one-time upload. This is required for longitudinal analysis, trend detection, and evolution tracking over time.
{% endhint %}

***

#### Phase 2: Authentication

1. Navigate to the Integrations tab in the sidebar.
2. Select API.
3. Click Create API Key.
4. Select permission level Push (sufficient for sending data) or All.
5. Copy the key immediately (it starts with `inpk_`). This key will not be shown again.

***

#### Phase 3: Integration (Sending Data)

To send data, you need three identifiers: `survey_series_id` (Group), `survey_id` (Source), and `question_id` (The specific field for text & data). These fields were provided to you when you [created the endpoint](#phase-1-platform-configuration) but you can also [fetch them using GET](/boundaryai-docs/api-and-webhooks/api-documentation.md#request-format) method.

**Push Data**

Now that you have your IDs (e.g., Group `101`, Survey `505`, Question `888`), use the push endpoint to send data.

Endpoint: `POST https://app.boundary-ai.com/api/input/content/push`

**Python Example:**

```
import requests

url = "https://app.boundary-ai.com/api/input/content/push"

payload = {
    "survey_series_id": "101",   # From Step A
    "survey_id": "505",          # From Step A
    "question": {
        "question_id": "888",    # From Step A
        "content": [
            "The login button is broken on mobile.",
            "Great service today, thanks!",
            "I cannot find the export PDF feature."
        ]
    },
    # Optional: Use a unique reference for this batch to prevent duplicates
    "source_reference": "batch_2023_10_27_001" 
}

headers = {
    "Authorization": "Bearer inpk_live_your_api_key_here",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

#### <sub>Curl Example:</sub>

```
curl -X POST "https://app.boundary-ai.com/api/input/content/push" \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "survey_series_id": "2",
    "survey_id": "287",
    "question": {
      "question_id": "736",
      "content": [
        "The login button is broken on mobile.",
        "Great service today, thanks!",
        "I cannot find the export PDF feature."
      ]
    },
    "source_reference": "batch_2023_10_27_001"
  }'
```

#### Response (JSON Snippet):

```
{
  "status": "success",
  "inserted": 3,
  "aps_deducted": 3,
  "question_id": 736,
  "survey_id": 287,
  "survey_series_id": 2
}
```

***

#### Summary of Best Practices

* **Batching:** You can send up to 10,000 items per request. Buffer your user comments and send them in batches rather than one API call per comment.
* **Idempotency:** Always include a 'Idempotency-Key' header. If a network error occurs and you retry the request, the API will use this reference to recognize the batch and prevent duplicate data entry.
* **Rate Limits:** The API allows 60 requests/minute per key. Default is 60/min, max is 300/min.


---

# 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://boundaryai.gitbook.io/boundaryai-docs/api-and-webhooks/quick-start-guide.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.
