# কাঠামোবদ্ধ decisions জমা দিন

**API:** Model API

**Endpoint:** `POST /api/v1/decisions`

নন-স্ট্রিমিং state/questions রিকোয়েস্ট; উত্তরগুলো Decisions-এর আকার বজায় রাখে।

## Base URL

- `https://openapi.felo.ai` — প্রোডাকশন

## Authentication

- `FeloBearerAuth` (http bearer) — `Authorization: Bearer <key>` হিসেবে পাঠানো Felo API key।
- `FeloApiKey` (apiKey in header `X-API-Key`) — `X-API-Key: <key>` হিসেবে পাঠানো Felo API key।

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `X-Felo-Channel` | header | no | string, default: "default" | কমা-বিভক্ত, ক্রমানুসারে সাজানো পাবলিক চ্যানেল কোড। ডিফল্ট ব্যবহার করতে এই হেডার বাদ দিন; default একা ব্যবহার করতে হবে। ওয়ালেট মোডে default মডেলের কার্যকর পাবলিক চ্যানেল ক্রম উল্টো দিক থেকে স্ক্যান করে, অপ্রকাশিত বা অনুপলব্ধ চ্যানেল এড়িয়ে যায় এবং প্রথম উপলব্ধ চ্যানেলের প্রোভাইডার নির্বাচন করে। সেই প্রোভাইডারের মধ্যে একই আপস্ট্রিম মডেল ID ও সার্ভিস টিয়ারযুক্ত উপলব্ধ এন্ডপয়েন্টগুলোও অন্তর্ভুক্ত করে। স্পষ্টভাবে উল্লেখ করা চ্যানেল ক্লায়েন্টের দেওয়া ক্রমে যাচাই করা হয়; কেবল প্রথম চ্যানেলের প্রোভাইডার গ্রুপই জমা দেওয়া হয়। অন্য প্রোভাইডারে স্বয়ংক্রিয় ফলব্যাক নেই। লিগ্যাসি প্রোভাইডার হেডার চ্যানেল রাউটিংকে ওভাররাইড করতে পারে না। |

## Request body

Required: **yes**

### application/json

Schema: `DecisionsRequest` (`#/components/schemas/DecisionsRequest`)

```json
{
  "type": "object",
  "required": [
    "model",
    "state",
    "questions"
  ],
  "properties": {
    "model": {
      "type": "string"
    },
    "state": {},
    "questions": {
      "type": "object",
      "additionalProperties": {
        "type": "object"
      }
    },
    "stream": {
      "type": "boolean",
      "const": false
    },
    "service_tier": {
      "type": [
        "string",
        "null"
      ],
      "default": "default",
      "description": "বর্তমানে কেবল default (standard) সমর্থিত। বাদ দেওয়া, null, alias এবং অসমর্থিত স্ট্রিং default-এ ফিরে যায়; অন্য টাইপে HTTP 400 ফেরত আসে। কনফিগার করা চ্যানেল ও মূল্য অপরিবর্তিত থাকে। টেক্সট API প্রোভাইডারের standard মান পাঠায়; Decisions ও জেনারেশন API আপস্ট্রিম ফিল্ড বাদ দেয়।"
    }
  },
  "additionalProperties": true,
  "description": "নন-স্ট্রিমিং Decisions; প্রশ্নের সংজ্ঞা অপরিবর্তিতভাবে পাস হয়।"
}
```

Example:

```json
{
  "model": "configured-decisions-model",
  "state": "A payout failed.",
  "questions": {
    "urgent": {
      "type": "noul",
      "instructions": "Is it urgent?",
      "criteria": {
        "true": "Urgent",
        "false": "No"
      }
    }
  }
}
```

## Responses

### 200 — decisions উত্তর

**application/json**

Schema: `DecisionsResponse` (`#/components/schemas/DecisionsResponse`)

### 400 — রিকোয়েস্ট প্রত্যাখ্যাত বা আপস্ট্রিম অনুপলব্ধ

**application/json**

Schema: `DecisionsErrorResponse` (`#/components/schemas/DecisionsErrorResponse`)

### 401 — রিকোয়েস্ট প্রত্যাখ্যাত বা আপস্ট্রিম অনুপলব্ধ

**application/json**

Schema: `DecisionsErrorResponse` (`#/components/schemas/DecisionsErrorResponse`)

### 402 — রিকোয়েস্ট প্রত্যাখ্যাত বা আপস্ট্রিম অনুপলব্ধ

**application/json**

Schema: `DecisionsErrorResponse` (`#/components/schemas/DecisionsErrorResponse`)

### 403 — রিকোয়েস্ট প্রত্যাখ্যাত বা আপস্ট্রিম অনুপলব্ধ

**application/json**

Schema: `DecisionsErrorResponse` (`#/components/schemas/DecisionsErrorResponse`)

### 429 — রিকোয়েস্ট প্রত্যাখ্যাত বা আপস্ট্রিম অনুপলব্ধ

**application/json**

Schema: `DecisionsErrorResponse` (`#/components/schemas/DecisionsErrorResponse`)

### 502 — রিকোয়েস্ট প্রত্যাখ্যাত বা আপস্ট্রিম অনুপলব্ধ

**application/json**

Schema: `DecisionsErrorResponse` (`#/components/schemas/DecisionsErrorResponse`)

### 503 — রিকোয়েস্ট প্রত্যাখ্যাত বা আপস্ট্রিম অনুপলব্ধ

**application/json**

Schema: `DecisionsErrorResponse` (`#/components/schemas/DecisionsErrorResponse`)

## Schema definitions

### DecisionsErrorResponse

`#/components/schemas/DecisionsErrorResponse`

```json
{
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "object",
      "required": [
        "code",
        "message"
      ],
      "properties": {
        "code": {
          "type": "integer"
        },
        "message": {
          "type": "string"
        }
      }
    }
  }
}
```

### DecisionsResponse

`#/components/schemas/DecisionsResponse`

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "answers": {
      "type": "object",
      "additionalProperties": true
    },
    "usage": {
      "type": "object",
      "additionalProperties": true
    }
  },
  "additionalProperties": true
}
```
