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

# Update Tenant Preference Single Category

> API to update tenant preference for a specific category.



## OpenAPI

````yaml PATCH /v1/tenant/{tenant_id}/preference/category/{category}/
openapi: 3.1.1
info:
  title: SuprSend API
  description: APIs supported on suprsend platform
  version: 1.2.2
servers:
  - url: https://hub.suprsend.com
security:
  - sec0: []
  - BearerAuth: []
paths:
  /v1/tenant/{tenant_id}/preference/category/{category}/:
    patch:
      summary: Update Tenant Preference Single Category
      description: API to update tenant preference for a specific category.
      operationId: update-tenant-preference-single-category
      parameters:
        - name: tenant_id
          in: path
          description: unique identifier of the tenant you want to update preferences for
          schema:
            type: string
          required: true
        - name: category
          in: path
          description: >-
            notification category slug. You can get this from Notification
            Categories page on SuprSend dashboard -> Settings page
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                preference:
                  type: string
                  enum:
                    - opt_in
                    - opt_out
                    - cant_unsubscribe
                  description: >-
                    set `opt_in` to turn on notifications on all or selected
                    channels by default, `opt_out` to turn-off notifications by
                    default, `cant_unsubscribe` if you do not want users to
                    completely opt-out from this category
                visible_to_subscriber:
                  type: boolean
                  description: >-
                    set it `false` to hide a category from user's preference
                    page
                mandatory_channels:
                  type: array
                  description: >-
                    Add mandatory channels that the user can't unsubscribe from
                    if preference is `cant_unsubscribe`.
                  items:
                    type: string
                opt_in_channels:
                  type: array
                  description: >-
                    List of channels to opt-in for this category. Only
                    applicable when preference is `opt_in`.
                  items:
                    type: string
            examples:
              Update Preference:
                value:
                  preference: opt_in
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    name: tests
                    category: tests
                    description: asdf
                    tags:
                      - >-
                        asdasdasdasderrfjfsdihdaisjaisljdaskjdlkasdlkasdkasdlkasldajsldkajsdaksdasd
                      - checktag
                    effective_tags:
                      - >-
                        asdasdasdasderrfjfsdihdaisjaisljdaskjdlkasdlkasdkasdlkasldajsldkajsdaksdasd
                      - checktag
                    root_category: system
                    default_preference: cant_unsubscribe
                    default_mandatory_channels: null
                    default_opt_in_channels: null
                    enabled_for_tenant: true
                    visible_to_subscriber: true
                    preference: opt_in
                    mandatory_channels: null
                    opt_in_channels: null
                    blocked_channels: null
                    updated_at: '2025-12-06T10:54:46.630096Z'
              schema:
                type: object
                properties:
                  name:
                    type: string
                  category:
                    type: string
                  description:
                    type: string
                    nullable: true
                  tags:
                    type: array
                    nullable: true
                    items:
                      type: string
                  effective_tags:
                    type: array
                    nullable: true
                    items:
                      type: string
                  root_category:
                    type: string
                    enum:
                      - system
                      - transactional
                      - promotional
                  default_preference:
                    type: string
                    enum:
                      - opt_in
                      - opt_out
                      - cant_unsubscribe
                  default_mandatory_channels:
                    type: array
                    nullable: true
                    items:
                      type: string
                  default_opt_in_channels:
                    type: array
                    nullable: true
                    items:
                      type: string
                  enabled_for_tenant:
                    type: boolean
                  visible_to_subscriber:
                    type: boolean
                  preference:
                    type: string
                    nullable: true
                    enum:
                      - opt_in
                      - opt_out
                      - cant_unsubscribe
                  mandatory_channels:
                    type: array
                    nullable: true
                    items:
                      type: string
                  opt_in_channels:
                    type: array
                    nullable: true
                    items:
                      type: string
                  blocked_channels:
                    type: array
                    nullable: true
                    items:
                      type: string
                  updated_at:
                    type: string
                    format: date-time
                    nullable: true
        '404':
          description: '404'
          content:
            application/json:
              examples:
                Result:
                  value:
                    code: 404
                    message: >-
                      tenant 'tenant_id' not found or category 'category' not
                      found
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 404
                  message:
                    type: string
                    example: >-
                      tenant 'tenant_id' not found or category 'category' not
                      found
      deprecated: false
      security:
        - BearerAuth: []
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where <token>
        is your auth token.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API_Key
      description: >-
        Pass as `Bearer <API_KEY>`. Get API Key from SuprSend dashboard
        Developers -> API Keys section.

````