> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mailofly.com/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.

### Path Parameters

<ParamField path="id" type="string" required>
  The unique identifier of the contact.
</ParamField>

### Body Parameters

<ParamField body="topics" type="array" required>
  List of topic preferences to set.

  <Expandable title="properties">
    <ParamField body="topicId" type="string" required>
      ID of the topic.
    </ParamField>

    <ParamField body="status" type="string" required>
      Desired status: `subscribed` or `unsubscribed`.
    </ParamField>
  </Expandable>
</ParamField>

### Response

<ResponseField name="data" type="object">
  <ResponseField name="contactId" type="string">The contact ID.</ResponseField>
  <ResponseField name="topics" type="array">Updated topic associations.</ResponseField>
</ResponseField>

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

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


## Related topics

- [Update Topic](/api/topics/update-topic.md)
- [Retrieve Contact Topics](/api/contacts/retrieve-contact-topics.md)
- [Update Contact](/api/contacts/update-contact.md)
- [Update Contact Property](/api/contact-properties/update-contact-property.md)
- [Topics](/audience/topics.md)
