> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Contact Topics

> Update topic subscription preferences for a contact.

Subscribe or unsubscribe a contact to/from specific topics via the Mailofly API.

### Path Parameters

**id** `string` *required*

The unique identifier of the contact.

### Body Parameters

**topics** `array` *required*

List of topic preferences to set.

**properties**

**topicId** `string` *required*

ID of the topic.

**status** `string` *required*

Desired status: `subscribed` or `unsubscribed`.

### Response

**data** `object`

**contactId** `string`

The contact ID.

**topics** `array`

Updated topic associations.

```bash cURL theme={null}
curl -X PATCH https://api.mailofly.com/contacts/cnt_123/topics \
  -H "Authorization: Bearer mf_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "topics": [
      {
        "topicId": "top_news",
        "status": "unsubscribed"
      }
    ]
  }'
```

```json 200 OK theme={null}
{
  "data": {
    "contactId": "cnt_123",
    "topics": [
      {
        "topicId": "top_news",
        "status": "unsubscribed"
      }
    ]
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.