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

> Push notification : Update the settings for Push notifications extension.

# Push notification Update settings

For the complete error reference, see [Error Guide](/rest-api/management-apis/error-codes).


## OpenAPI

````yaml put /apps/{appId}/extensions/push-notification/v1/settings
openapi: 3.0.0
info:
  title: Management APIs (Multi-Tenancy)
  description: Create and manage apps on-the-fly using our app management APIs
  version: '1.0'
servers:
  - url: https://apimgmt.cometchat.io
security: []
tags:
  - name: App
    description: The Rest collection for app.
  - name: Extensions
    description: The REST collections for extensions.
  - name: Extensions
    description: The REST collections for Chat widgets.
  - name: Extensions
    description: The REST collections for Giphy extension.
  - name: Extensions
    description: The REST collections for XSS Filter extension.
  - name: Extensions
    description: The REST collections for Image Moderation extension.
  - name: Extensions
    description: The REST collections for Report user extension.
  - name: Extensions
    description: The REST collections for Report message extension.
  - name: Extensions
    description: The REST collections for Sentiment analysis extension.
  - name: Extensions
    description: The REST collections for Voice transcription extension.
  - name: Extensions
    description: The REST collections for Stipop extension.
  - name: Extensions
    description: The REST collections for TinyURL extension.
  - name: Extensions
    description: The REST collections for Intercom extension.
  - name: Extensions
    description: The REST collections for Bitly extension.
  - name: Extensions
    description: The REST collections for Rich media preview extension.
  - name: Extensions
    description: The REST collections for Virus Malware Scanner extension.
  - name: Extensions
    description: The REST collections for Video Broadcasting extension.
  - name: Extensions
    description: The REST collections for Tenor gifs extension.
  - name: Extensions
    description: The REST collections for End-to-end encryption extension.
  - name: Extensions
    description: The REST collections for In-flight message moderation extension.
  - name: Extensions
    description: The REST collections for Stickers extension.
  - name: Extensions
    description: The REST collections for Data masking extension.
  - name: Extensions
    description: The REST collections for Email replies extension.
  - name: Extensions
    description: The REST collections for SMS Notification extension.
  - name: Extensions
    description: The REST collections for Push notification extension.
  - name: Extensions
    description: The REST collections for Chatwoot extension.
  - name: Extensions
    description: The REST collections for Message shortcuts extension.
  - name: Extensions
    description: The REST collections for Email Notification extension.
  - name: Team Management
    description: The REST collections for team management.
  - name: Settings
    description: The REST collections for Settings.
  - name: Extensions
    description: The REST collections for Profanity-filter extension.
  - name: Webhooks
    description: The REST collections for Webhooks.
  - name: Moderation
    description: The REST collections for Moderations.
paths:
  /apps/{appId}/extensions/push-notification/v1/settings:
    put:
      tags:
        - Extensions
      summary: Push notification Update settings
      description: >-
        Push notification : Update the settings for Push notifications
        extension.
      operationId: update-settings-push-notification
      parameters:
        - $ref: '#/components/parameters/key'
        - $ref: '#/components/parameters/secret'
        - $ref: '#/components/parameters/appId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/pushNotificationRequestSchema'
            examples:
              abc:
                $ref: '#/components/examples/pushNotificationRequestExample'
      responses:
        '200':
          description: Update Push Notification Settings
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      '':
                        $ref: '#/components/schemas/pushNotificationSchema'
                    type: object
                type: object
              examples:
                abc:
                  $ref: '#/components/examples/pushNotificationResponseExample'
components:
  parameters:
    key:
      name: key
      in: header
      description: Authorization Key
      required: true
      schema:
        type: string
    secret:
      name: secret
      in: header
      description: Authorization Secret
      required: true
      schema:
        type: string
    appId:
      name: appId
      in: path
      description: AppID in which the extension has to be enabled/disabled
      required: true
      schema:
        type: string
  schemas:
    pushNotificationRequestSchema:
      properties:
        settings:
          required:
            - version
            - pushProvider
          properties:
            version:
              description: >-
                2: Token-based (Recommended) | 0: Topic-based + Token-based | 1:
                Topic-based (Legacy)
              type: integer
              default: 2
            pushProvider:
              description: '1: FCM | 2: APNs | 0: FCM+APNs'
              type: integer
              default: 1
            fcmCredentials:
              description: >-
                These are obtained from the Service Account JSON file you
                download from Firebase console
              properties:
                project_id:
                  type: string
                client_email:
                  type: string
                private_key:
                  type: string
                private_key_id:
                  type: string
              type: object
            notificationInPayload:
              properties:
                web:
                  description: Include 'notification' key for Web
                  type: boolean
                  default: true
                android:
                  description: Include 'notification' key for Android
                  type: boolean
                  default: true
                ionic_cordova:
                  description: Include 'notification' key for Ionic
                  type: boolean
                  default: true
                react_native:
                  description: Include 'notification' key for React native
                  type: boolean
                  default: false
                ios:
                  description: Include 'notification' key for iOS
                  type: boolean
                  default: true
                flutter:
                  description: Include 'notification' key for Flutter
                  type: boolean
                  default: true
              type: object
            useP8:
              description: Required for APNs only. Use .p8 as it never expires
              type: boolean
              default: true
            keyId:
              description: Required for APNs only
              type: string
            teamId:
              description: Required for APNs only
              type: string
            bundleId:
              description: Required for APNs only
              type: string
            sendApnsProduction:
              description: >-
                Required for APNs only. 'true' for apps available on the
                Appstore
              type: boolean
              default: true
            sendNewMessageNotification:
              type: boolean
              default: true
            sendEditMessageNotification:
              type: boolean
              default: false
            sendDeleteMessageNotification:
              type: boolean
              default: false
            sendThreadedMessageNotification:
              type: boolean
              default: true
            sendIncomingCallNotification:
              type: boolean
              default: true
            sendMissedCallNotification:
              type: boolean
              default: true
            sendMemberJoinedNotification:
              type: boolean
              default: true
            sendMemberLeftNotification:
              type: boolean
              default: true
            sendMemberKickedNotification:
              type: boolean
              default: true
            sendMemberBannedNotification:
              type: boolean
              default: true
            sendMemberUnbannedNotification:
              type: boolean
              default: true
            sendMemberAddedNotification:
              type: boolean
              default: true
            sendMemberScopeChangedNotification:
              type: boolean
              default: false
            appId:
              type: string
            cometchatMessagePayloadOptions:
              description: Optional property
              properties:
                skipSenderMetadata:
                  description: >-
                    Excludes sender's metadata from the message object in the
                    push payload
                  type: boolean
                  default: false
                skipReceiverMetadata:
                  description: >-
                    Excludes receiver's metadata from the message object in the
                    push payload
                  type: boolean
                  default: false
                skipMessageMetadata:
                  description: >-
                    Excludes the message metadata from the message object in the
                    push payload
                  type: boolean
                  default: false
                trimMessageText:
                  description: >-
                    Trims the message text from the message object in the push
                    payload to ensure the payload size does not exceed 4KB;
                    exceeding this limit may prevent notifications from being
                    delivered.
                  type: boolean
                  default: true
              type: object
          type: object
      type: object
    pushNotificationSchema:
      properties:
        statusCode:
          type: integer
        success:
          type: boolean
        responseTime:
          type: number
        body:
          properties:
            data:
              properties:
                settings:
                  properties:
                    version:
                      description: >-
                        2: Token-based (Recommended) | 0: Topic-based +
                        Token-based | 1: Topic-based (Legacy)
                      type: number
                      default: 2
                    pushProvider:
                      description: '1: FCM | 2: APNs | 0: FCM+APNs'
                      type: number
                      default: 1
                    fcmServerKey:
                      type: string
                    notificationInPayload:
                      properties:
                        web:
                          description: Include 'notification' key for Web
                          type: boolean
                          default: true
                        android:
                          description: Include 'notification' key for Android
                          type: boolean
                          default: false
                        ionic_cordova:
                          description: Include 'notification' key for Ionic
                          type: boolean
                          default: true
                        react_native:
                          description: Include 'notification' key for React native
                          type: boolean
                          default: false
                        ios:
                          description: Include 'notification' key for iOS
                          type: boolean
                          default: true
                      type: object
                    useP8:
                      description: Required for APNs only. Use .p8; as it never expires
                      type: boolean
                      default: true
                    keyId:
                      description: Required for APNs only.
                      type: string
                      default: ''
                    teamId:
                      description: Required for APNs only.
                      type: string
                      default: ''
                    bundleId:
                      description: Required for APNs only.
                      type: string
                      default: ''
                    sendApnsProduction:
                      description: >-
                        Required for APNs only. 'true' for apps available on the
                        Appstore
                      type: boolean
                      default: false
                    sendNewMessageNotification:
                      type: boolean
                      default: true
                    sendEditMessageNotification:
                      type: boolean
                      default: false
                    sendDeleteMessageNotification:
                      type: boolean
                      default: false
                    sendThreadedMessageNotification:
                      type: boolean
                      default: true
                    sendIncomingCallNotification:
                      type: boolean
                      default: true
                    sendMissedCallNotification:
                      type: boolean
                      default: true
                    sendMemberJoinedNotification:
                      type: boolean
                      default: true
                    sendMemberLeftNotification:
                      type: boolean
                      default: true
                    sendMemberKickedNotification:
                      type: boolean
                      default: true
                    sendMemberBannedNotification:
                      type: boolean
                      default: true
                    sendMemberUnbannedNotification:
                      type: boolean
                      default: true
                    sendMemberAddedNotification:
                      type: boolean
                      default: true
                    sendMemberScopeChangedNotification:
                      type: boolean
                      default: false
                    appId:
                      type: string
                  type: object
              type: object
          type: object
      type: object
  examples:
    pushNotificationRequestExample:
      summary: PN Request
      value:
        settings:
          version: 2
          pushProvider: 1
          fcmCredentials:
            project_id: project_id
            client_email: client_email
            private_key: private_key
            private_key_id: private_key_id
          notificationInPayload:
            web: true
            android: true
            ionic_cordova: true
            react_native: false
            ios: true
            flutter: true
          useP8: true
          sendApnsProduction: true
          sendNewMessageNotification: true
          sendEditMessageNotification: false
          sendDeleteMessageNotification: false
          sendThreadedMessageNotification: true
          sendIncomingCallNotification: true
          sendMissedCallNotification: true
          sendMemberJoinedNotification: true
          sendMemberLeftNotification: true
          sendMemberKickedNotification: true
          sendMemberBannedNotification: true
          sendMemberUnbannedNotification: true
          sendMemberAddedNotification: true
          sendMemberScopeChangedNotification: false
          keyId: key_id
          teamId: team_id
          bundleId: bundle_id
          appId: abcd
          cometchatMessagePayloadOptions:
            skipSenderMetadata: false
            skipReceiverMetadata: false
            skipMessageMetadata: false
            trimMessageText: true
    pushNotificationResponseExample:
      summary: PN Response
      value:
        settings:
          version: 2
          pushProvider: 1
          fcmCredentials:
            project_id: project_id
            client_email: client_email
            private_key: private_key
            private_key_id: private_key_id
          notificationInPayload:
            web: true
            android: true
            ionic_cordova: true
            react_native: false
            ios: true
            flutter: true
          useP8: true
          sendApnsProduction: true
          sendNewMessageNotification: true
          sendEditMessageNotification: false
          sendDeleteMessageNotification: false
          sendThreadedMessageNotification: true
          sendIncomingCallNotification: true
          sendMissedCallNotification: true
          sendMemberJoinedNotification: true
          sendMemberLeftNotification: true
          sendMemberKickedNotification: true
          sendMemberBannedNotification: true
          sendMemberUnbannedNotification: true
          sendMemberAddedNotification: true
          sendMemberScopeChangedNotification: false
          keyId: key_id
          teamId: team_id
          bundleId: bundle_id
          appId: abcd
          cometchatMessagePayloadOptions:
            skipSenderMetadata: false
            skipReceiverMetadata: false
            skipMessageMetadata: false
            trimMessageText: true

````