# Dictionary

## ListDictTimeZone

<mark style="color:blue;">`GET`</mark> `https://api.opentact.org/dict/tz`

List all timezones

#### Headers

| Name          | Type   | Description   |
| ------------- | ------ | ------------- |
| Authorization | string | JWT or Bearer |

{% tabs %}
{% tab title="200 This is a sample 200:OK response" %}

```javascript
{
  "success": true,
  "payload": {
    "created_on": "2019-08-24T14:15:22Z",
    "modified_on": "2019-08-24T14:15:22Z",
    "uuid": "string",
    "tn": {},
    "to": "string",
    "thread": "string",
    "message": "string",
    "reference_id": "string",
    "state": "created",
    "delivered": true,
    "automated": true,
    "custom_callback_url": "string",
    "account": {},
    "created_by": {}
  }
}
```

{% endtab %}

{% tab title="202 This is the 202:Accepted response generated from the example code below." %}

```javascript
{
  "success": true,
  "payload": {
    "to": "J Smith",
    "message": "test message",
    "custom_callback_url": "www.example.com",
    "state": "created",
    "uuid": "6f837aa1-f6aa-45af-9764-3c4bfa84098f",
    "thread": "fdbbf3c163f386c272ed1b75a1d898bf",
    "delivered": false,
    "reference_id": null,
    "created_on": "2020-10-27T16:33:05.928Z",
    "modified_on": "2020-10-27T16:33:05.928Z",
    "automated": false
  }
}
```

{% endtab %}

{% tab title="401 " %}

```javascript
{
"success": true,
"message": "string",
"status": 0
}
```

{% endtab %}

{% tab title="402 " %}

```javascript
{
"success": true,
"message": "string",
"status": 0
}
```

{% endtab %}

{% tab title="404 " %}

```javascript
{
"success": true,
"message": "string",
"status": 0
}
```

{% endtab %}
{% endtabs %}

### Code Example

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST "https://api.opentact.org/rest/sms" \
-H  "accept: application/json" \
-H  "X-Auth-Token: JWT_TOKEN" \
-H  "Content-Type: application/json" \
-d "{\"to\":\"J Smith\",\"tn\":12013046585,\"message\":\"test message\",\"custom_callback_url\":\"www.example.com\"}"
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
    'accept' => 'application/json',
    'X-Auth-Token' => 'JWT_TOKEN',
    'Content-Type' => 'application/json'
);
$data = '{"to":"J Smith","tn":12013046585,"message":"test message","custom_callback_url":"www.example.com"}';
$response = Requests::post('https://api.opentact.org/rest/sms', $headers, $data);

```

{% endtab %}

{% tab title="Python" %}

```python
import requests

headers = {
    'accept': 'application/json',
    'X-Auth-Token': 'JWT_TOKEN',
    'Content-Type': 'application/json',
}

data = '{"to":"J Smith","tn":12013046585,"message":"test message","custom_callback_url":"www.example.com"}'

response = requests.post('https://api.opentact.org/rest/sms', headers=headers, data=data)

```

{% endtab %}

{% tab title="Javascript" %}

```javascript
var fetch = require('node-fetch');

fetch('https://api.opentact.org/rest/sms', {
    method: 'POST',
    headers: {
        'accept': 'application/json',
        'X-Auth-Token': 'JWT_TOKEN',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({"to":"J Smith","tn":12013046585,"message":"test message","custom_callback_url":"www.example.com"})
});

```

{% endtab %}

{% tab title="Go" %}

```go
package main

import (
	"fmt"
	"io/ioutil"
	"log"
	"net/http"
	"strings"
)

func main() {
	client := &http.Client{}
	var data = strings.NewReader(`{"to":"J Smith","tn":12013046585,"message":"test message","custom_callback_url":"www.example.com"}`)
	req, err := http.NewRequest("POST", "https://api.opentact.org/rest/sms", data)
	if err != nil {
		log.Fatal(err)
	}
	req.Header.Set("accept", "application/json")
	req.Header.Set("X-Auth-Token", "JWT_TOKEN")
	req.Header.Set("Content-Type", "application/json")
	resp, err := client.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	bodyText, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%s\n", bodyText)
}

```

{% endtab %}
{% endtabs %}

## ListDictCountry

<mark style="color:blue;">`GET`</mark> `https://api.opentact.org/dict/country`

List all countries

#### Headers

| Name          | Type   | Description   |
| ------------- | ------ | ------------- |
| Authorization | string | JWT or Bearer |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## UploadDictLERG

<mark style="color:green;">`POST`</mark> `https://api.opentact.org/dict/lerg`

Upload LERG csv file

#### Headers

| Name          | Type   | Description   |
| ------------- | ------ | ------------- |
| Authorization | string | JWT or Bearer |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## UploadDictLERG

<mark style="color:green;">`POST`</mark> `https://api.opentact.org/dict/lerg`

Upload LERG csv file

#### Headers

| Name          | Type   | Description   |
| ------------- | ------ | ------------- |
| Authorization | string | JWT or Bearer |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## GetSIPConnectionProductsList

<mark style="color:blue;">`GET`</mark> `https://api.opentact.org/sip/connection/product`

Get SIP connection products list

#### Headers

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| Authorization | string | JWT         |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}


---

# 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://dantonia.gitbook.io/test/dictionary.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.
