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

# Update a catalog entry

> Update a catalog entry's label and default. The natural key (`channel`/`topic`/`event`/`medium`) is immutable.

Update a catalog entry's `name`, `description` and `default_enabled`. The natural key (`channel`/`topic`/`event`/`medium`) is immutable — to change it, delete the entry and create a new one.


## OpenAPI

````yaml PATCH /preferences/{preference_id}
openapi: 3.0.3
info:
  title: Bodhveda Notifications API
  version: '1.0'
  description: API for sending notifications to recipients or broadcasting to all.
servers: []
security: []
paths:
  /preferences/{preference_id}:
    patch:
      tags:
        - Project Preferences
      summary: Update a catalog entry
      description: >-
        Update a catalog entry's label and default. The natural key
        (`channel`/`topic`/`event`/`medium`) is immutable.
      operationId: updateProjectPreference
      parameters:
        - name: preference_id
          in: path
          required: true
          schema:
            type: integer
          description: The catalog entry's ID.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateProjectPreferencePayload'
      responses:
        '200':
          description: The updated catalog entry.
          content:
            application/json:
              examples:
                Updated:
                  summary: Updated Response
                  value:
                    message: Project preference updated
                    data:
                      id: 12
                      project_id: 1
                      target:
                        channel: digest
                        topic: none
                        event: sent
                      medium: email
                      default_enabled: false
                      label: Weekly digest
                      created_at: '2025-11-07T05:31:56Z'
                      updated_at: '2025-11-07T06:00:00Z'
        '404':
          description: No catalog entry with this ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuthWithAPIKeyWithFullAcessScope: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl -X PATCH https://api.bodhveda.com/preferences/42 \
              -H "Authorization: Bearer bv_xxxxxxxxx" \
              -H "Content-Type: application/json" \
              -d '{
                "name": "Daily digest",
                "description": "Receive a daily summary of activity.",
                "default_enabled": false
              }' 
        - lang: javascript
          label: JavaScript
          source: |-
            import { Bodhveda } from "@bodhveda/js";

            const bodhveda = new Bodhveda("bv_xxxxxxxxx");

            const pref = await bodhveda.preferences.update(42, {
                name: "Daily digest",
                description: "Receive a daily summary of activity.",
                default_enabled: false,
            });
        - lang: go
          label: Go
          source: >-
            import (
                "context"

                bodhveda "github.com/MudgalLabs/bodhveda/sdk/go"
            )


            ctx := context.Background()

            client := bodhveda.NewClient("bv_xxxxxxxxx", nil)


            pref, _ := client.Preferences.Update(ctx, 42,
            &bodhveda.UpdateProjectPreferenceRequest{
                Name:           "Daily digest",
                Description:    "Receive a daily summary of activity.",
                DefaultEnabled: false,
            })
components:
  schemas:
    UpdateProjectPreferencePayload:
      type: object
      description: >-
        Updates a catalog entry's name, description, default and mandatory flag.
        The natural key (`channel`/`topic`/`event`/`medium`) is immutable.
      properties:
        name:
          type: string
          description: Human-readable name for the catalog entry (e.g. "Weekly digest").
        default_enabled:
          type: boolean
        description:
          type: string
          description: >-
            Optional longer blurb shown alongside the name on a settings screen.
            Omitted or blank stores none.
        mandatory:
          type: boolean
          description: >-
            Whether recipients may opt out. A mandatory entry is cataloged (so
            sends pass the target gate) but its recipient toggle is refused with
            a `400`, and any rule a recipient already had is ignored. For
            transactional notifications — password resets, security alerts, a
            one-shot welcome. `default_enabled` still applies, so setting it
            `false` stops the notification: mandatory removes the recipient's
            choice, not yours. Defaults to `false`.
          default: false
      required:
        - name
        - default_enabled
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        details:
          type: string
  securitySchemes:
    BearerAuthWithAPIKeyWithFullAcessScope:
      type: http
      scheme: bearer
      bearerFormat: APIKey
      description: >-
        Bearer authentication header of the form `Bearer bv_xxxxxxxxx`, where
        `bv_xxxxxxxxx` is your **API Key** with `Full access` scope.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.