> ## 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:
                enabled_for_tenant:
                  type: boolean
                  description: >-
                    Whether the category is enabled for this tenant. Set to
                    `false` to hide the category from the tenant's users and
                    stop sending notifications in it. If
                    [sub-tenants](/docs/sub-tenants) are used, a category
                    disabled on an ancestor stays disabled on every sub-tenant
                    below and can't be re-enabled lower down.
                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
                blocked_channels:
                  type: array
                  description: >-
                    Channels turned off for this category for this tenant.
                    Notifications on these channels won't be sent to any user of
                    the tenant in this category, and users can't override it. If
                    [sub-tenants](/docs/sub-tenants) are used, a block set on an
                    ancestor also applies to every sub-tenant below and can't be
                    removed lower down.
                  items:
                    type: string
                    enum:
                      - email
                      - sms
                      - whatsapp
                      - androidpush
                      - inbox
                      - iospush
                      - slack
                      - webpush
                      - ms_teams
                digest_schedule:
                  type: object
                  description: >
                    Tenants can modify some parameters (time, weekdays,
                    monthdays, dtstart, is_default) of existing digest
                    schedules. Users will see merged digest-schedule options
                    (original options + tenant-modified options merged by id).
                  properties:
                    options:
                      type: array
                      description: >-
                        Array of digest schedule option overrides. Reference
                        existing options by their `id`.
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            description: ID of an existing digest schedule option to modify
                          time:
                            type: object
                            description: Override the default time value, if applicable
                            properties:
                              default_value:
                                type: string
                                description: Time in HH:MM format
                                example: '09:00'
                          weekdays:
                            type: object
                            description: Override the default weekdays, if applicable
                            properties:
                              default_value:
                                description: Default value applied when not overridden.
                                type: array
                                items:
                                  type: string
                                  enum:
                                    - mo
                                    - tu
                                    - we
                                    - th
                                    - fr
                                    - sa
                                    - su
                          monthdays:
                            type: object
                            description: Override the default monthdays, if applicable
                            properties:
                              default_value:
                                description: Default value applied when not overridden.
                                type: array
                                items:
                                  type: object
                                  properties:
                                    pos:
                                      type: integer
                                      description: Day of month (1-31)
                                    day:
                                      type: string
                                      description: Optional day of week (e.g. su, mo)
                          dtstart:
                            type: object
                            description: Override the digest start date, if applicable
                            properties:
                              default_value:
                                type: string
                                format: date-time
                                description: ISO 8601 datetime for the schedule start
                          is_default:
                            type: boolean
                            description: >-
                              Set to true to make this the default digest option
                              for tenant users
                properties:
                  type: array
                  description: >-
                    Override default values for category condition properties.
                    Tenants can change the default value shown to their users.
                  items:
                    type: object
                    properties:
                      key:
                        type: string
                        description: Property key identifier
                      value:
                        description: >-
                          New default value for the property. The datatype must
                          match the property's `value_type`.
            examples:
              Update Preference:
                value:
                  preference: opt_in
                  digest_schedule:
                    options:
                      - id: daily-summary
                        time:
                          default_value: '09:00'
                        is_default: true
                  properties:
                    - key: threshold
                      value: '100'
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    name: Weekly Activity Digest
                    category: weekly-activity-digest
                    description: Summary of recent activity in your workspace
                    tags:
                      - digest
                      - activity
                    effective_tags:
                      - digest
                      - activity
                    root_category: transactional
                    default_preference: opt_in
                    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: '2026-06-29T19:09:04.796887Z'
                    digest_schedule:
                      options:
                        - id: daily-summary
                          label: Daily summary at 9:00 AM
                          frequency: daily
                          interval: 1
                          time:
                            edit_policy: editable
                            default_value: '09:00'
                          is_default: true
                      original_options:
                        - id: instant
                          label: Instant
                          frequency: instantly
                          is_default: true
                        - id: daily-summary
                          label: Daily summary at 9:00 AM
                          frequency: daily
                          interval: 1
                          time:
                            edit_policy: editable
                            default_value: '00:00'
                          is_default: false
                        - id: weekly-on-weekdays
                          label: >-
                            Every week on Mon–Fri · time set by recipient
                            (default: 9:00 AM)
                          frequency: weekly_mo2fr
                          interval: 1
                          time:
                            edit_policy: editable
                            default_value: '09:00'
                          weekdays:
                            edit_policy: locked
                            default_value:
                              - mo
                              - tu
                              - we
                              - th
                              - fr
                          is_default: false
                        - id: monthly-1st
                          label: Every month on the 1st at 9:00 AM
                          frequency: monthly
                          interval: 1
                          time:
                            edit_policy: locked
                            default_value: '09:00'
                          monthdays:
                            edit_policy: locked
                            default_value:
                              - pos: 1
                          is_default: false
                    properties:
                      - key: threshold
                        label: Minimum activity count
                        value_type: string
                        default_value: '10'
                        is_optional: false
                        edit_policy: editable
                        is_overridden: true
                        value: '100'
              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:
                    description: >-
                      Root category (system, transactional, or promotional) this
                      sub-category belongs to.
                    type: string
                    enum:
                      - system
                      - transactional
                      - promotional
                  default_preference:
                    description: >-
                      Category-level default preference, inherited when the
                      tenant has not overridden it.
                    type: string
                    enum:
                      - opt_in
                      - opt_out
                      - cant_unsubscribe
                  default_mandatory_channels:
                    description: >-
                      Category-level mandatory channels (applies when the
                      default preference is `cant_unsubscribe`).
                    type: array
                    nullable: true
                    items:
                      type: string
                  default_opt_in_channels:
                    description: >-
                      Category-level opt-in channels, used when only selective
                      channels are opted in by default.
                    type: array
                    nullable: true
                    items:
                      type: string
                  enabled_for_tenant:
                    description: >-
                      Whether the category is enabled for this tenant. When
                      false, the category is hidden from the tenant's users and
                      notifications are not sent in it.
                    type: boolean
                  visible_to_subscriber:
                    description: >-
                      Whether the category appears on the tenant users'
                      preference page.
                    type: boolean
                  preference:
                    description: >-
                      Tenant's overridden preference for this category. `null`
                      if the tenant has not overridden the category default.
                    type: string
                    nullable: true
                    enum:
                      - opt_in
                      - opt_out
                      - cant_unsubscribe
                  mandatory_channels:
                    description: >-
                      Channels the user cannot unsubscribe from (when preference
                      is `cant_unsubscribe`), as overridden for this tenant.
                    type: array
                    nullable: true
                    items:
                      type: string
                  opt_in_channels:
                    description: >-
                      Channels opted in by default for this category, as
                      overridden for this tenant.
                    type: array
                    nullable: true
                    items:
                      type: string
                  blocked_channels:
                    description: Channels opted out across all categories for this tenant.
                    type: array
                    nullable: true
                    items:
                      type: string
                  updated_at:
                    description: >-
                      Timestamp when the tenant preference for this category was
                      last updated.
                    type: string
                    format: date-time
                    nullable: true
                  digest_schedule:
                    type: object
                    nullable: true
                    description: >-
                      Digest schedule configuration with tenant overrides and
                      original options
                    properties:
                      options:
                        type: array
                        description: >-
                          Tenant-modified digest schedule options (merged with
                          original options by id)
                        items:
                          type: object
                          properties:
                            id:
                              description: Unique identifier of the digest schedule option.
                              type: string
                            label:
                              description: Display label shown to the recipient.
                              type: string
                            frequency:
                              description: >-
                                Frequency of the digest schedule (instantly,
                                hourly, daily, weekly, weekly_mo2fr, monthly).
                              type: string
                            interval:
                              description: >-
                                Recurrence multiplier for the frequency (for
                                example, every 2 weeks).
                              type: integer
                            time:
                              description: >-
                                Time of day to send the digest, with its edit
                                policy and value.
                              type: object
                              properties:
                                edit_policy:
                                  description: >-
                                    `editable` means the value can be
                                    overridden; `locked` means it is fixed.
                                  type: string
                                  enum:
                                    - locked
                                    - editable
                                default_value:
                                  description: Default value applied when not overridden.
                                  type: string
                            weekdays:
                              description: >-
                                Days of the week to send on (for weekly
                                frequency), with edit policy and value.
                              type: object
                              properties:
                                edit_policy:
                                  description: >-
                                    `editable` means the value can be
                                    overridden; `locked` means it is fixed.
                                  type: string
                                  enum:
                                    - locked
                                    - editable
                                default_value:
                                  description: Default value applied when not overridden.
                                  type: array
                                  items:
                                    type: string
                            monthdays:
                              description: >-
                                Days of the month to send on (for monthly
                                frequency), with edit policy and value.
                              type: object
                              properties:
                                edit_policy:
                                  description: >-
                                    `editable` means the value can be
                                    overridden; `locked` means it is fixed.
                                  type: string
                                  enum:
                                    - locked
                                    - editable
                                default_value:
                                  description: Default value applied when not overridden.
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      pos:
                                        description: >-
                                          Position in the month (1-31; use a
                                          negative value to count from the end).
                                        type: integer
                                      day:
                                        description: >-
                                          Optional day of the week (su, mo, tu,
                                          we, th, fr, sa).
                                        type: string
                            dtstart:
                              description: >-
                                Start datetime from which the recurring schedule
                                is calculated, with edit policy and value.
                              type: object
                              properties:
                                edit_policy:
                                  description: >-
                                    `editable` means the value can be
                                    overridden; `locked` means it is fixed.
                                  type: string
                                  enum:
                                    - locked
                                    - editable
                                default_value:
                                  description: Default value applied when not overridden.
                                  type: string
                                  format: date-time
                            is_default:
                              description: Whether this option is the default selection.
                              type: boolean
                      original_options:
                        type: array
                        description: >-
                          Original digest schedule options as configured at the
                          category level
                        items:
                          type: object
                          properties:
                            id:
                              description: Unique identifier of the digest schedule option.
                              type: string
                            label:
                              description: Display label shown to the recipient.
                              type: string
                            frequency:
                              description: >-
                                Frequency of the digest schedule (instantly,
                                hourly, daily, weekly, weekly_mo2fr, monthly).
                              type: string
                            interval:
                              description: >-
                                Recurrence multiplier for the frequency (for
                                example, every 2 weeks).
                              type: integer
                            time:
                              description: >-
                                Time of day to send the digest, with its edit
                                policy and value.
                              type: object
                              properties:
                                edit_policy:
                                  description: >-
                                    `editable` means the value can be
                                    overridden; `locked` means it is fixed.
                                  type: string
                                default_value:
                                  description: Default value applied when not overridden.
                                  type: string
                            weekdays:
                              description: >-
                                Days of the week to send on (for weekly
                                frequency), with edit policy and value.
                              type: object
                              properties:
                                edit_policy:
                                  description: >-
                                    `editable` means the value can be
                                    overridden; `locked` means it is fixed.
                                  type: string
                                default_value:
                                  description: Default value applied when not overridden.
                                  type: array
                                  items:
                                    type: string
                            monthdays:
                              description: >-
                                Days of the month to send on (for monthly
                                frequency), with edit policy and value.
                              type: object
                              properties:
                                edit_policy:
                                  description: >-
                                    `editable` means the value can be
                                    overridden; `locked` means it is fixed.
                                  type: string
                                default_value:
                                  description: Default value applied when not overridden.
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      pos:
                                        description: >-
                                          Position in the month (1-31; use a
                                          negative value to count from the end).
                                        type: integer
                                      day:
                                        description: >-
                                          Optional day of the week (su, mo, tu,
                                          we, th, fr, sa).
                                        type: string
                            dtstart:
                              description: >-
                                Start datetime from which the recurring schedule
                                is calculated, with edit policy and value.
                              type: object
                              properties:
                                edit_policy:
                                  description: >-
                                    `editable` means the value can be
                                    overridden; `locked` means it is fixed.
                                  type: string
                                default_value:
                                  description: Default value applied when not overridden.
                                  type: string
                                  format: date-time
                            is_default:
                              description: Whether this option is the default selection.
                              type: boolean
                  properties:
                    type: array
                    nullable: true
                    description: Category condition properties with tenant overrides
                    items:
                      type: object
                      properties:
                        key:
                          description: >-
                            Property key identifier, referenced in workflows as
                            `$category.properties.<key>`.
                          type: string
                        label:
                          description: Display label shown to the recipient.
                          type: string
                        value_type:
                          description: Data type of the property value.
                          type: string
                        default_value:
                          description: Default value applied when not overridden.
                          type: string
                        is_optional:
                          description: Whether this property is optional.
                          type: boolean
                        edit_policy:
                          description: >-
                            `editable` means the value can be overridden;
                            `locked` means it is fixed.
                          type: string
                          enum:
                            - locked
                            - editable
                        is_overridden:
                          type: boolean
                          description: Whether the tenant has overridden the default value
                        value:
                          description: Tenant-overridden value, if any
        '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.

````