> For the complete documentation index, see [llms.txt](https://docs.taptalk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.taptalk.io/onetalk-omnichannel-documentation/onetalk-channel-integration/live-chat/onetalk-ios/case-and-topic.md).

# Case & Topic

### Get Available Topics

You can get the list of available topics by calling **`getTopicList`**.

{% tabs %}
{% tab title="Objective-C" %}
{% code title="YourViewController.m" %}

```csharp
#import <TapTalkLive/TapTalkLive.h>

[[TapTalkLive sharedInstance] getTopicListWithSuccess:^(NSArray<TTLTopicModel *> *topicListArray) {
    // Successfully fetched topics
}
failure:^(NSError *error) {
    
}];
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Get Active User's Case List

To use this method, you need to first finish [authentication](/onetalk-omnichannel-documentation/onetalk-channel-integration/live-chat/onetalk-ios/authentication.md#authenticate-user-optional) process.

Once authenticated, you can obtain the active user's case list by calling **`getUserCaseList`**.

{% tabs %}
{% tab title="Objective-C" %}
{% code title="YourViewController" %}

```csharp
#import <TapTalkLive/TapTalkLive.h>

[[TapTalkLive sharedInstance] getUserCaseListListWithSuccess:^(NSArray<TTLCaseModel *> *caseListArray) {
    // Successfully fetched user cases
}
failure:^(NSError *error) {
    
}];
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Create a New Case

To use this method, you need to first finish [authentication](/onetalk-omnichannel-documentation/onetalk-channel-integration/live-chat/onetalk-ios/authentication.md#authenticate-user-optional) process.

Once authenticated, you can create a new case for the user by calling **`createNewCase`**, providing the **topic ID** and **first message**.

{% tabs %}
{% tab title="Objective-C" %}
{% code title="YourViewController" %}

```csharp
#import <TapTalkLive/TapTalkLive.h>

[[TapTalkLive sharedInstance] createNewCaseWithTopicID:TOPIC_ID
                                          firstMessage:FIRST_MESSAGE
success:^(TTLCaseModel *caseModel) {
    // Successfully created a new case
}
failure:^(NSError *error) {
    
}];
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Parameters**\
\&#xNAN;**`TOPIC_ID`**: (String) ID of the selected topic, can be obtained from [**`getTopicList`**](#get-available-topics)\
\&#xNAN;**`FIRST_MESSAGE`**: (String) message to be sent by the user to start a case
{% endhint %}
