## Documentation Index

Fetch the complete documentation index at: [/llms.txt](https://docs.cognigy.com/llms.txt)

Use this file to discover all available pages before exploring further.

### API Request

**GET**  
`/v2.0/locales/{localeId}/yesnointents`

### Request Example

#### cURL
```bash
curl --request GET \
  --url https://api-trial.cognigy.ai/new/v2.0/locales/{localeId}/yesnointents \
  --header 'X-API-Key: <api-key>'
```

#### Python
```python
import requests

url = "https://api-trial.cognigy.ai/new/v2.0/locales/{localeId}/yesnointents"

headers = {"X-API-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
```

#### JavaScript (Fetch)
```javascript
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};

fetch('https://api-trial.cognigy.ai/new/v2.0/locales/{localeId}/yesnointents', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

#### PHP
```php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api-trial.cognigy.ai/new/v2.0/locales/{localeId}/yesnointents",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "X-API-Key: <api-key>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
```

### Responses

| Status | Description |
|--------|-------------|
| 200    | Successful response, returns the yesIntent, noIntent, and rejectIntent objects for the given locale |
| 400    | Bad Request Error, validation failed. Missing payload. |
| 401    | Unauthorized Error, invalid API key. |
| 402    | Payment Required Error, payment required to access this resource. |
| 403    | Forbidden Error, access is denied. |
| 404    | Not Found Error, resource not found. |
| 500    | Internal Server Error. |

### Sample Response Structure

For a successful response:
```json
{
  "yesIntent": {
    "isDisabled": true,
    "name": "pizza",
    "_id": "<string>",
    "rules": [
      "<string>"
    ]
  },
  "noIntent": {
    "isDisabled": true,
    "name": "pizza",
    "_id": "<string>",
    "rules": [
      "<string>"
    ]
  },
  "rejectIntent": {
    "isDisabled": true,
    "name": "pizza",
    "_id": "<string>",
    "rules": [
      "<string>"
    ]
  }
}
```

### Path Parameters
- **localeId**: The unique identifier for the Locale. Required string length: `24`, Pattern: `^[a-z0-9]{24}$`.

### Authorizations
- **X-API-Key**: string - required in the HTTP header, supply the API key.
