> ## 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.

# Get Tenant Default Preference

> API to get default tenant preference for all categories.



## OpenAPI

````yaml GET /v1/tenant/{tenant_id}/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}/category/:
    get:
      summary: Get Tenant Default Preference
      description: API to get default tenant preference for all categories.
      operationId: get-tenant-default-preference
      parameters:
        - name: tenant_id
          in: path
          description: >-
            unique identifier of the tenant you want to get default preferences
            for
          schema:
            type: string
          required: true
        - name: locale
          in: query
          description: >
            Locale code (e.g., `es`, `fr`, `de`, `ja`, `es-AR`) to fetch
            preference translations in user's locale. When provided, the API
            looks for category and section names and descriptions in the
            respective locale file. 

            If a translation is missing for the requested locale, the system
            automatically falls back in this order: `locale-region` (e.g.,
            `es-AR`) → `locale` (e.g., `es`) → `en` (English - always
            available).
          schema:
            type: string
          example: es
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    meta:
                      count: 12
                      limit: 10
                      offset: 0
                    results:
                      - name: Status Update Alert
                        category: status-update-alert
                        description: Send me updates when account status changes
                        root_category: transactional
                        default_preference: opt_in
                        default_mandatory_channels: null
                        default_opt_in_channels: null
                        visible_to_subscriber: true
                        preference: opt_in
                        mandatory_channels: null
                        opt_in_channels: null
                        blocked_channels: null
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      count:
                        type: integer
                        description: total number of categories
                        example: 12
                      limit:
                        type: integer
                        description: maximum number of categories returned per request
                        example: 10
                      offset:
                        type: integer
                        description: offset passed in request
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          description: preference category name
                        category:
                          type: string
                          description: >-
                            unique preference category slug. You can get it by
                            clicking on category name on SuprSend dashboard ->
                            preference page
                        description:
                          type: string
                          description: description of the notification category
                        root_category:
                          type: string
                          description: root category this sub-category belongs to
                          example: transactional
                        default_preference:
                          type: string
                          enum:
                            - cant_unsubscribe
                            - opt_in
                            - opt_out
                          description: >-
                            default preference of the category set while
                            updating the category.
                        default_mandatory_channels:
                          type: array
                          description: >-
                            default mandatory channels set while updating the
                            category in case default preference is can't
                            unsubscribe
                          items:
                            type: string
                        default_opt_in_channels:
                          type: array
                          nullable: true
                          description: >-
                            default opt-in channels set to have selective opt-in
                            channels instead of all channels while updating the
                            category.
                          items:
                            type: string
                        opt_in_channels:
                          type: array
                          nullable: true
                          description: opt-in channels overridden for this tenant.
                          items:
                            type: string
                        visible_to_subscriber:
                          type: boolean
                          description: >-
                            set it `false` to hide a category from user's
                            preference page
                        preference:
                          type: string
                          enum:
                            - opt_in
                            - opt_out
                          description: preference setting overridden for this tenant.
                        blocked_channels:
                          type: array
                          description: >-
                            channels which are opted-out across all categories
                            for this tenant.
                          items:
                            type: string
                            enum:
                              - email
                              - sms
                              - whatsapp
                              - androidpush
                              - inbox
                              - iospush
                              - slack
                              - webpush
                              - ms_teams
                        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 - Not Found
          content:
            application/json:
              examples:
                Result:
                  value:
                    code: 404
                    message: tenant 'brand/tenant_id' not found
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 404
                  message:
                    type: string
                    example: tenant 'brand/tenant_id' not found
      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.

````