> For the complete documentation index, see [llms.txt](https://user.netmera.com/netmera-developer-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/category-preferences/get-category-preferences.md). Agents can also search and read this documentation through its [MCP server](https://user.netmera.com/netmera-developer-guide/~gitbook/mcp).

# Get Category Preferences

Returns a user's opt-in preference for each message category, with a per-channel breakdown.

<details>

<summary>Notes</summary>

* The `categoryIds` and `channels` parameters are optional. Without them, the call behaves exactly as it did before channel-based preferences were introduced.

</details>

```json
{"openapi":"3.1.0","info":{"title":"Netmera REST API","version":"3.0"},"tags":[{"name":"Category Preferences","description":"Read and change which message categories a user wants to receive, per channel.\n\n<table data-view=\"cards\"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type=\"content-ref\"></th></tr></thead><tbody><tr><td><strong>Get Category Preferences</strong></td><td><code>GET</code> Returns a user's opt-in preference for each message category, with a per-channel breakdown.</td><td><a href=\"https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/category-preferences/get-category-preferences\">Get Category Preferences</a></td></tr><tr><td><strong>Set Category Preferences</strong></td><td><code>POST</code> Opts a user in to or out of message categories.</td><td><a href=\"https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/category-preferences/set-category-preferences\">Set Category Preferences</a></td></tr></tbody></table>\n"}],"servers":[{"url":"https://restapi.netmera.com","description":"Netmera REST API"}],"security":[{"REST-API-key":[]}],"components":{"securitySchemes":{"REST-API-key":{"type":"apiKey","in":"header","name":"X-netmera-api-key","description":"REST API key. Available in the Netmera Panel under Developers > API.\n"}},"schemas":{"CategoryPreferencesResponse":{"type":"object","description":"Category opt-in state for a single user.\n","properties":{"categoryPreferences":{"type":"object","description":"Map of category name to opt-in state, kept for backward compatibility: `true` when the user is\npermitted on any of the category's own channels. The `channels` filter does not affect this\nvalue.\n","additionalProperties":{"type":"boolean"}},"categoryChannelPreferences":{"type":"object","description":"Per-channel permission state, keyed by category name and then by channel.\n","additionalProperties":{"type":"object","additionalProperties":{"type":"boolean"}}}}},"NetmeraError":{"type":"object","description":"Standard Netmera error body.","required":["code","error"],"properties":{"code":{"type":"integer","description":"Netmera error code. See the error table in the API description."},"error":{"type":"string","description":"Human readable error message."}}},"ProblemDetail":{"type":"object","description":"RFC 7807 error body returned by the framework instead of the Netmera error body when a\nrequired query parameter is missing or a parameter cannot be converted to its type.\n","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}}}},"responses":{"InvalidApiKey":{"description":"The `X-netmera-api-key` header is missing or the key is not valid.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetmeraError"}}}},"IpNotAllowed":{"description":"The application restricts REST calls to a list of allowed IP addresses and the caller's\nIP is not on it. The check runs after the API key is validated and before the request\nbody and parameters are validated, so a restricted application returns this error even\nfor a malformed request.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetmeraError"}}}}}},"paths":{"/rest/3.0/getCategoryPreferences":{"get":{"operationId":"getCategoryPreferences","tags":["Category Preferences"],"summary":"Get Category Preferences","description":"Returns a user's opt-in preference for each message category, with a per-channel breakdown.\n\n<details>\n\n<summary>Notes</summary>\n\n- The `categoryIds` and `channels` parameters are optional. Without them, the call behaves exactly\n  as it did before channel-based preferences were introduced.\n\n</details>\n","parameters":[{"name":"externalId","in":"query","required":true,"description":"External user ID in your system.","schema":{"type":"string"}},{"name":"categoryIds","in":"query","required":false,"description":"Category IDs to return; all categories when omitted. Send repeated parameters\n(`?categoryIds=56&categoryIds=57`) or a comma-separated value (`?categoryIds=56,57`); repeated\nvalues are collapsed.\n","style":"form","explode":true,"schema":{"type":"array","items":{"type":"integer"}}},{"name":"channels","in":"query","required":false,"description":"Channels to return: `MOBILE`, `SMS`, `EMAIL`, `WHATS_APP`, `IN_APP` and `WEB`, case-insensitive\n(`whatsapp` and `inapp` are not accepted); every channel when omitted, and categories that\nsupport none of them are left out. Send repeated parameters (`?channels=MOBILE&channels=EMAIL`)\nor a comma-separated value (`?channels=MOBILE,EMAIL`), repeats are collapsed; an unknown channel\nreturns HTTP 400, code `2004` (\"Unknown category channel: <value>\").\n","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","enum":["MOBILE","SMS","EMAIL","WHATS_APP","IN_APP","WEB"]}}}],"responses":{"200":{"description":"The user's category preferences.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryPreferencesResponse"}}}},"400":{"description":"Error responses the API can return.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetmeraError"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"}}}},"401":{"$ref":"#/components/responses/InvalidApiKey"},"403":{"$ref":"#/components/responses/IpNotAllowed"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/category-preferences/get-category-preferences.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
