> For the complete documentation index, see [llms.txt](https://developer.perculus.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.perculus.com/perculus-api/services/oturum-yonetimi/session-create.md).

# Oturum Oluşturma

Aşağıdaki listede bir oturum oluştururken ekleyebileceğiniz tüm parametrelerin listesini görebilirsiniz:

<table><thead><tr><th width="210">Parametre</th><th>Tip</th><th>Zorunlu</th><th>Açıklama</th></tr></thead><tbody><tr><td>name</td><td>string</td><td>Evet</td><td>Oturum adı</td></tr><tr><td>description</td><td>string</td><td>Hayır</td><td>Açıklama</td></tr><tr><td>tags</td><td>string</td><td>Hayır</td><td></td></tr><tr><td>start_date</td><td>datetime(ISO 8601 )</td><td>Evet</td><td>Başlangıç tarihi</td></tr><tr><td>duration</td><td>integer(min: 5)</td><td>Evet</td><td>Oturum süresi</td></tr><tr><td>lang</td><td>string(IETF language tag)</td><td>Hayır</td><td></td></tr><tr><td>status</td><td>integer</td><td>Hayır</td><td></td></tr><tr><td>allow_recording</td><td>bool</td><td>no</td><td>Oturumun kayıt edilip edilmeyeceğini belirler. Varsayılan değeri 'true'.</td></tr><tr><td>timezone</td><td>string</td><td>Hayır</td><td>Zaman dilimi (<a href="/pages/WyiMfYcDwHD4yy2l8NWN">bkz.</a>)</td></tr><tr><td>options</td><td><a href="#options-objesi"><em><mark style="color:blue;"><strong>Options</strong></mark></em></a></td><td>Hayır</td><td>Oturum ayarlarını içerir</td></tr></tbody></table>

### Options Objesi

<table><thead><tr><th width="399">Parametre</th><th width="92">Tip</th><th width="81">Zorunlu</th><th>Açıklama</th></tr></thead><tbody><tr><td>allow_rating</td><td>boolean</td><td>Hayır</td><td></td></tr><tr><td>preparation_time</td><td>integer</td><td>Hayır</td><td></td></tr><tr><td>session_duration</td><td>integer</td><td>Hayır</td><td></td></tr><tr><td>allow_users_stream_self_cam_mic</td><td>boolean</td><td>Hayır</td><td></td></tr><tr><td>hide_user_streams</td><td>boolean</td><td>Hayır</td><td></td></tr><tr><td>enable_attendance_check</td><td>boolean</td><td>Hayır</td><td></td></tr><tr><td>enable_simultaneous_interpretation</td><td>boolean</td><td>Hayır</td><td></td></tr><tr><td>enable_simultaneous_interpretation_for_users</td><td>boolean</td><td>Hayır</td><td></td></tr><tr><td>start_active</td><td>boolean</td><td>Hayır</td><td></td></tr><tr><td>return_url</td><td>string</td><td>Hayır</td><td></td></tr><tr><td>chat</td><td><a href="#chat-objesi"><mark style="color:blue;">Chat</mark></a></td><td>Hayır</td><td>Chat ayarlarını içerir</td></tr><tr><td>duration</td><td><a href="#duration-objesi"><mark style="color:blue;">Duration</mark></a></td><td>Hayır</td><td></td></tr></tbody></table>

### Chat Objesi

<table><thead><tr><th width="281">Parametre</th><th width="96">Tip</th><th width="94">Zorunlu</th><th>Açıklama</th></tr></thead><tbody><tr><td>offMessageModule</td><td>boolean</td><td>Hayır</td><td></td></tr><tr><td>offGeneralMsging</td><td>boolean</td><td>Hayır</td><td></td></tr><tr><td>offGeneralMsgLimitForUser</td><td>boolean</td><td>Hayır</td><td></td></tr><tr><td>offSpecialMsging</td><td>boolean</td><td>Hayır</td><td></td></tr><tr><td>offSpecialMsgToAdmin</td><td>boolean</td><td>Hayır</td><td></td></tr><tr><td>offSpecialMsgToUser</td><td>boolean</td><td>Hayır</td><td></td></tr><tr><td>offNewMsgSound</td><td>boolean</td><td>Hayır</td><td></td></tr><tr><td>offClearForReplay</td><td>boolean</td><td>Hayır</td><td></td></tr><tr><td>onNewMsgSoundInAll</td><td>boolean</td><td>Hayır</td><td></td></tr><tr><td>onNewMsgNotifyInAll</td><td>boolean</td><td>Hayır</td><td></td></tr></tbody></table>

### Duration Objesi

<table><thead><tr><th width="208">Parametre</th><th width="100">Tip</th><th>Zorunlu</th><th>Açıklama</th></tr></thead><tbody><tr><td>allowExtendTime</td><td>boolean</td><td>Hayır</td><td></td></tr><tr><td>useRemainingTime</td><td>boolean</td><td>Hayır</td><td></td></tr></tbody></table>

**Tüm parametrelerden sonra aşağıdaki şekilde örnek bir oturum oluşturabilirsiniz:**

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

```bash
curl --location 'https://<DOMAIN>/xapi/session' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
    "name": "test session ",
    "start_date": "2024-09-27T14:00:25.699Z",
    "duration": "6",
    "options": {
        "allow_rating": false,
        "chat": {
            "offMessageModule": true,
            "offGeneralMsging": false
        },
        "duration": {
            "allowExtendTime": false,
            "useRemainingTime": true
        },
        "allow_users_stream_self_cam_mic": false,
    }
}'
```

{% endtab %}

{% tab title="Python" %}
İlk olarak Python SDK'sı yüklenmelidir:

```bash
pip install perculus-sdk
```

SDK'nın yüklendiğinden emin olunduktan sonra aşağıdaki şekilde yeni oturum oluşturabilirsiniz:

```python
from perculus_sdk.client import APIClient

# API client
client = APIClient()

# Set your domain (if you haven't set it before)
client.set_domain("<DOMAIN>")

# Set your credentials(if you haven't set it before)
client.set_credentials(
    access_key="<EMAIL>",
    secret_key="<PASSWORD>",
    account_id="<ACCOUNT_ID>"
)

#Create session 
session = client.sessions.create_session({
    "name": "test session",
    "start_date": "2024-09-27T14:00:25.699Z",
    "duration": "6",
    "options": {
        "allow_rating": false,
        "chat": {
            "offMessageModule": true,
            "offGeneralMsging": false
        },
        "duration": {
            "allowExtendTime": false,
            "useRemainingTime": true
        },
        "allow_users_stream_self_cam_mic": false,
    }
})
print(session)
```

{% endtab %}

{% tab title="C#" %}

```
// ASAP :)
```

{% endtab %}

{% tab title="NodeJS" %}

```
// ASAP :)
```

{% endtab %}

{% tab title="Go" %}

```
// ASAP :)
```

{% endtab %}
{% endtabs %}

İstek sonrasında aşağıdaki örnek response modelini görebilirsiniz:

```json
{
    "session_id": "<SESSION_ID>",
    "name": "test session",
    "description": "",
    "tags": "",
    "start_date": "2024-09-27T14:00:25.699+03:00",
    "timezone": "Europe/Istanbul",
    "duration": 6,
    "lang": "tr-TR",
    "status": 1,
    "replay_status": 0,
    "options": {
        "allow_rating": false,
        "preparation_time": 15,
        "session_duration": 60,
        "chat": {
            "offMessageModule": true,
            "offGeneralMsging": false,
            "offGeneralMsgLimitForUser": false,
            "offSpecialMsging": false,
            "offSpecialMsgToAdmin": false,
            "offSpecialMsgToUser": false,
            "offNewMsgSound": false,
            "offClearForReplay": false,
            "onNewMsgSoundInAll": false,
            "onNewMsgNotifyInAll": false
        },
        "duration": {
            "allowExtendTime": false,
            "useRemainingTime": true
        },
        "allow_users_stream_self_cam_mic": false,
        "hide_user_streams": false,
        "enable_attendance_check": false,
        "enable_simultaneous_interpretation": false,
        "enable_simultaneous_interpretation_for_users": false,
        "start_active": false,
        "return_url": ""
    },
    "creation_date": "2024-08-01T22:53:46.5570837+00:00",
    "updating_date": null
}
```
