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

# All Categories

> API to fetch user preferences across all categories.



## OpenAPI

````yaml GET /v1/object/{object_type}/{id}/preference/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/object/{object_type}/{id}/preference/category/:
    get:
      summary: All Categories
      description: API to fetch user preferences across all categories.
      operationId: fetch-object-preference-all-categories
      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: tags
          in: query
          description: >
            Filter preference categories with tags assigned to them. Used to
            filter preference categories relevant to the user on UI based on
            their roles, department or teams.

            You can apply single tag filter like `tags=tag1` or build nested
            conditions using logical operators - `and`, `or`, `not`, `exists`.


            Example:

            ```

            tags=admin

            tags={"or":[{"and":["admin","sales"]},{"and":["admin","manager"]}]}

            tags={"not":"admin"}

            tags={"exists":true}
          schema:
            type: string
        - 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: 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:
                  meta:
                    type: object
                    properties:
                      count:
                        type: integer
                        example: 12
                      limit:
                        type: integer
                        example: 10
                      offset:
                        type: integer
                        example: 0
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          example: Newsletter
                        category:
                          type: string
                          example: newsletter
                        description:
                          type: string
                          example: Send me updates on new product updates
                        original_preference:
                          type: string
                          description: default preference of the category
                          nullable: true
                          example: null
                        preference:
                          type: string
                          example: opt_in
                        is_editable:
                          type: boolean
                          description: >-
                            false when category default preference is set to
                            `can't unsubscribe`
                          example: false
                        channels:
                          type: array
                          description: channel level preference in the category
                          items:
                            type: object
                            properties:
                              channel:
                                type: string
                                description: channel name
                                example: email
                              preference:
                                type: string
                                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
        '404':
          description: 404 - Not Found
          content:
            application/json:
              examples:
                Result:
                  value:
                    code: 404
                    message: object 'object_type/id' not found
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 404
                  message:
                    type: string
                    example: object 'object_type/id' 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.

````