# Retrieve Contact Topics

> GET /contacts/:id/topics — retrieve a list of topic subscriptions for a contact.

`GET /contacts/:id/topics`

Retrieve a list of topic subscriptions for a contact. The contact is identified in the path by either its ID or its email address.

Either `id` or `email` must be provided.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | No | The Contact ID. |
| `email` | string | No | The Contact Email. |

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | number | No | Number of topics to retrieve. Maximum value: `100`. Minimum value: `1`. |
| `after` | string | No | The ID *after* which we'll retrieve more topics (for pagination). This ID will *not* be included in the returned list. Cannot be used with the `before` parameter. |
| `before` | string | No | The ID *before* which we'll retrieve more topics (for pagination). This ID will *not* be included in the returned list. Cannot be used with the `after` parameter. |

**Node.js**

```js
import { SendDart } from 'senddart';

const mb = new SendDart('mb_xxxxxxxxx');

const { data, error } = await mb.contacts.getTopics('e169aa45-1ecf-4183-9955-b1499d5701d3');
console.log({ data, error });
```

**Ruby**

```ruby
require "senddart"

SendDart.api_key = "mb_xxxxxxxxx"

SendDart::Contacts.get_topics("e169aa45-1ecf-4183-9955-b1499d5701d3")
```

**PHP**

```php
<?php
require 'vendor/autoload.php';

use SendDart\SendDart;

$senddart = SendDart::client('mb_xxxxxxxxx');

$senddart->contacts->getTopics('e169aa45-1ecf-4183-9955-b1499d5701d3');
```

**Python**

```python
import senddart

senddart.api_key = "mb_xxxxxxxxx"

senddart.Contacts.get_topics("e169aa45-1ecf-4183-9955-b1499d5701d3")
```

**Go**

```go
import "github.com/shekhu10/senddart-sdks/senddart-go"

client := senddart.NewClient("mb_xxxxxxxxx")

topics, err := client.Contacts.GetTopics("e169aa45-1ecf-4183-9955-b1499d5701d3", nil)
```

**Rust**

```rust
use senddart::SendDart;

let mb = SendDart::new("mb_xxxxxxxxx");

let _topics = mb.contacts.get_topics("e169aa45-1ecf-4183-9955-b1499d5701d3", None).await?;
```

**Java**

```java
import com.senddart.SendDart;
import com.senddart.SendDartResponse;

SendDart senddart = new SendDart("mb_xxxxxxxxx");

SendDartResponse response = senddart.contacts().getTopics("e169aa45-1ecf-4183-9955-b1499d5701d3");
```

**.NET**

```csharp
using SendDart;

ISendDart senddart = SendDartClient.Create("mb_xxxxxxxxx");

var resp = await senddart.ContactRetrieveTopicsAsync("e169aa45-1ecf-4183-9955-b1499d5701d3");
```

**cURL**

```bash
curl -X GET 'https://www.senddart.com/api/contacts/e169aa45-1ecf-4183-9955-b1499d5701d3/topics' \
  -H 'Authorization: Bearer mb_xxxxxxxxx'
```

**CLI**

```bash
senddart contacts topics e169aa45-1ecf-4183-9955-b1499d5701d3
```

### Response

```json
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "id": "b6d24b8e-af0b-4c3c-be0c-359bbd97381e",
      "name": "Product Updates",
      "description": "New features, and latest announcements.",
      "subscription": "opt_in"
    }
  ]
}
```
