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

# Single Category

> API to fetch object preferences for a given category.



## OpenAPI

````yaml GET /v1/object/{object_type}/{id}/preference/category/{category_slug}/
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/object/{object_type}/{id}/preference/category/{category_slug}/:
    get:
      summary: Single Category
      description: API to fetch object preferences for a given category.
      operationId: fetch-object-preference-single-category
      parameters:
        - name: object_type
          in: path
          description: >-
            Used to group similar objects together. Give plural namespace like
            teams, organizations, and roles.
          schema:
            type: string
          required: true
        - name: tenant_id
          in: query
          description: to fetch object preferences for a particular tenant
          schema:
            type: string
        - name: show_opt_out_channels
          in: query
          description: >-
            set this flag to `true` if you want to fetch channel list for
            opt-out categories.
          schema:
            type: boolean
            default: false
        - name: id
          in: path
          description: Unique identifier of the object in your system
          schema:
            type: string
          required: true
        - name: category_slug
          in: path
          description: >-
            notification category slug. You can get this from Notification
            Categories page on SuprSend dashboard -> Settings page
          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:
                    name: Newsletter
                    category: newsletter
                    description: Send me updates on new product updates
                    original_preference: null
                    preference: opt_in
                    is_editable: false
                    channels:
                      - channel: email
                        preference: opt_in
                        is_editable: false
                      - channel: ms_teams
                        preference: opt_in
                        is_editable: false
              schema:
                type: object
                properties:
                  name:
                    description: Display name of the notification category.
                    type: string
                    example: Newsletter
                  category:
                    description: Slug of the notification category.
                    type: string
                    example: newsletter
                  description:
                    description: Description of the notification category.
                    type: string
                    example: Send me updates on new product updates
                  original_preference:
                    description: >-
                      Category default preference, before the recipient's
                      override is applied.
                    type: string
                    enum:
                      - opt_in
                      - opt_out
                    nullable: true
                    example: null
                  preference:
                    type: string
                    enum:
                      - opt_in
                      - opt_out
                    example: opt_in
                  is_editable:
                    type: boolean
                    example: false
                  channels:
                    type: array
                    items:
                      type: object
                      properties:
                        channel:
                          type: string
                          description: channel name
                          example: email
                        preference:
                          type: string
                          enum:
                            - opt_in
                            - opt_out
                          description: user preference for this channel (opt_in, opt_out)
                          example: opt_in
                        is_editable:
                          type: boolean
                          description: whether the user can edit this channel preference
                          example: false
                  digest_schedule_options:
                    type: object
                    nullable: true
                    description: >-
                      All digest schedule options configured on the category,
                      with the recipient's current selection. `null` if digest
                      schedule is not enabled on the category.
                    properties:
                      options:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              description: Unique identifier of the digest schedule option.
                              type: string
                            label:
                              type: string
                              description: >-
                                Display label shown to the recipient for this
                                option.
                            frequency:
                              type: string
                              description: Frequency of the digest schedule.
                              enum:
                                - instantly
                                - minutely
                                - hourly
                                - daily
                                - weekly
                                - weekly_mo2fr
                                - monthly
                            interval:
                              description: >-
                                Recurrence multiplier for the frequency (for
                                example, every 2 weeks).
                              type: integer
                            time:
                              type: object
                              description: >-
                                Time of day to send the digest, with its edit
                                policy and the recipient's override.
                              properties:
                                edit_policy:
                                  type: string
                                  enum:
                                    - locked
                                    - editable
                                  description: >-
                                    `editable` means the recipient can change
                                    this value; `locked` means it is fixed.
                                default_value:
                                  type: string
                                  description: Default time in HH:MM (24-hour) format.
                                value:
                                  type: string
                                  nullable: true
                                  description: Recipient's overridden value, if any.
                            weekdays:
                              type: object
                              description: >-
                                Days of the week to send on (for `weekly`
                                frequency), with edit policy and recipient
                                override.
                              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
                                value:
                                  type: array
                                  nullable: true
                                  items:
                                    type: string
                            monthdays:
                              type: object
                              description: >-
                                Days of the month to send on (for `monthly`
                                frequency), with edit policy and recipient
                                override.
                              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
                                value:
                                  type: array
                                  nullable: true
                                  items:
                                    type: object
                            dtstart:
                              type: object
                              description: >-
                                Start datetime from which the recurring schedule
                                is calculated, with edit policy and recipient
                                override.
                              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
                                value:
                                  type: string
                                  nullable: true
                            is_default:
                              type: boolean
                              description: Whether this option is the category default.
                            is_user_selected:
                              type: boolean
                              description: Whether the recipient has selected this option.
                  digest_schedule:
                    type: object
                    nullable: true
                    description: >-
                      The recipient's currently active digest schedule, resolved
                      in order recipient selection -> tenant default -> category
                      default. `null` if digest schedule is not enabled on the
                      category.
                    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
                        enum:
                          - instantly
                          - minutely
                          - hourly
                          - daily
                          - weekly
                          - weekly_mo2fr
                          - monthly
                      interval:
                        description: >-
                          Recurrence multiplier for the frequency (for example,
                          every 2 weeks).
                        type: integer
                      time:
                        type: string
                        description: Resolved time in HH:MM (24-hour) format.
                      weekdays:
                        description: >-
                          Days of the week to send on (for weekly frequency),
                          with edit policy and value.
                        type: array
                        items:
                          type: string
                      monthdays:
                        description: >-
                          Days of the month to send on (for monthly frequency),
                          with edit policy and value.
                        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
                      is_default:
                        description: Whether this option is the default selection.
                        type: boolean
                      is_user_selected:
                        type: boolean
                  properties:
                    type: array
                    nullable: true
                    description: >-
                      Category condition properties with the recipient's
                      overrides. Referenced in workflows as
                      `$category.properties.<key>`.
                    items:
                      type: object
                      properties:
                        key:
                          description: >-
                            Property key identifier, referenced in workflows as
                            `$category.properties.<key>`.
                          type: string
                        label:
                          type: string
                          description: Display label for the property.
                        value_type:
                          description: Data type of the property value.
                          type: string
                          enum:
                            - integer
                            - string
                            - string_choice
                            - list_choice
                            - string_dynamic
                            - list_dynamic
                        default_value:
                          nullable: true
                          description: >-
                            Default value applied when the recipient has not set
                            a value.
                        is_optional:
                          description: Whether this property is optional.
                          type: boolean
                        edit_policy:
                          type: string
                          enum:
                            - locked
                            - editable
                          description: >-
                            `editable` means the recipient can override the
                            value; `locked` means it is fixed.
                        is_overridden:
                          type: boolean
                          description: >-
                            Whether the recipient has overridden the default
                            value.
                        value:
                          nullable: true
                          description: Recipient-overridden value, if any.
        '404':
          description: 404 - Not Found
          content:
            application/json:
              examples:
                Result:
                  value:
                    code: 404
                    message: category 'category_slug' not found
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 404
                  message:
                    type: string
                    example: category 'category_slug' 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.

````