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

# Remove Secrets

> Remove previously synced secrets from the specified GCP Secret Manager Sync destination.



## OpenAPI

````yaml POST /api/v1/secret-syncs/gcp-secret-manager/{syncId}/remove-secrets
openapi: 3.0.3
info:
  title: Infisical API
  description: List of all available APIs that can be consumed
  version: 0.0.1
servers:
  - url: https://us.infisical.com
    description: Production server (US)
  - url: https://eu.infisical.com
    description: Production server (EU)
  - url: http://localhost:8080
    description: Local server
security: []
paths:
  /api/v1/secret-syncs/gcp-secret-manager/{syncId}/remove-secrets:
    post:
      tags:
        - Secret Syncs
      description: >-
        Remove previously synced secrets from the specified GCP Secret Manager
        Sync destination.
      operationId: removeGcpSecretManagerSecretSyncSecrets
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: syncId
          required: true
          description: >-
            The ID of the GCP Secret Manager Sync to trigger removing secrets
            for.
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  secretSync:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      name:
                        type: string
                      description:
                        type: string
                        nullable: true
                      isAutoSyncEnabled:
                        type: boolean
                        default: true
                      version:
                        type: number
                        default: 1
                      projectId:
                        type: string
                      folderId:
                        type: string
                        format: uuid
                        nullable: true
                      connectionId:
                        type: string
                        format: uuid
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                      syncStatus:
                        type: string
                        nullable: true
                      lastSyncJobId:
                        type: string
                        nullable: true
                      lastSyncMessage:
                        type: string
                        nullable: true
                      lastSyncedAt:
                        type: string
                        format: date-time
                        nullable: true
                      importStatus:
                        type: string
                        nullable: true
                      lastImportJobId:
                        type: string
                        nullable: true
                      lastImportMessage:
                        type: string
                        nullable: true
                      lastImportedAt:
                        type: string
                        format: date-time
                        nullable: true
                      removeStatus:
                        type: string
                        nullable: true
                      lastRemoveJobId:
                        type: string
                        nullable: true
                      lastRemoveMessage:
                        type: string
                        nullable: true
                      lastRemovedAt:
                        type: string
                        format: date-time
                        nullable: true
                      syncOptions:
                        type: object
                        properties:
                          initialSyncBehavior:
                            type: string
                            enum:
                              - overwrite-destination
                              - import-prioritize-source
                              - import-prioritize-destination
                            description: >-
                              Specify how Infisical should resolve the initial
                              sync to the GCP Secret Manager destination.
                          keySchema:
                            type: string
                            description: >-
                              Specify the format to use for structuring secret
                              keys in the GCP Secret Manager destination.
                          disableSecretDeletion:
                            type: boolean
                            description: >-
                              Enable this flag to prevent removal of secrets
                              from the GCP Secret Manager destination when
                              syncing.
                        required:
                          - initialSyncBehavior
                        additionalProperties: false
                        description: Optional parameters to modify how secrets are synced.
                      connection:
                        type: object
                        properties:
                          app:
                            type: string
                            enum:
                              - gcp
                          name:
                            type: string
                          id:
                            type: string
                            format: uuid
                        required:
                          - app
                          - name
                          - id
                        additionalProperties: false
                      environment:
                        type: object
                        properties:
                          slug:
                            type: string
                          name:
                            type: string
                          id:
                            type: string
                            format: uuid
                        required:
                          - slug
                          - name
                          - id
                        additionalProperties: false
                        nullable: true
                      folder:
                        type: object
                        properties:
                          id:
                            type: string
                          path:
                            type: string
                        required:
                          - id
                          - path
                        additionalProperties: false
                        nullable: true
                      destination:
                        type: string
                        enum:
                          - gcp-secret-manager
                      destinationConfig:
                        anyOf:
                          - type: object
                            properties:
                              scope:
                                type: string
                                enum:
                                  - global
                                description: >-
                                  The Google project scope that secrets should
                                  be synced to.
                              projectId:
                                type: string
                                minLength: 1
                                description: >-
                                  The ID of the Google project secrets should be
                                  synced to.
                            required:
                              - scope
                              - projectId
                            additionalProperties: false
                            title: Global
                          - type: object
                            properties:
                              scope:
                                type: string
                                enum:
                                  - region
                                description: >-
                                  The Google project scope that secrets should
                                  be synced to.
                              projectId:
                                type: string
                                minLength: 1
                                description: >-
                                  The ID of the Google project secrets should be
                                  synced to.
                              locationId:
                                type: string
                                enum:
                                  - asia-southeast3
                                  - asia-south2
                                  - asia-east2
                                  - asia-southeast2
                                  - australia-southeast2
                                  - asia-south1
                                  - asia-northeast2
                                  - asia-northeast3
                                  - asia-southeast1
                                  - australia-southeast1
                                  - asia-east1
                                  - asia-northeast1
                                  - europe-west1
                                  - europe-west10
                                  - europe-north1
                                  - europe-north2
                                  - europe-west3
                                  - europe-west2
                                  - europe-southwest1
                                  - europe-west8
                                  - europe-west4
                                  - europe-west12
                                  - europe-west9
                                  - europe-central2
                                  - europe-west6
                                  - us-central1
                                  - us-west4
                                  - us-west2
                                  - northamerica-south1
                                  - northamerica-northeast1
                                  - us-east4
                                  - us-central2
                                  - us-west1
                                  - us-west3
                                  - us-east1
                                  - northamerica-northeast2
                                  - us-east5
                                  - us-south1
                                  - us-west8
                                  - southamerica-east1
                                  - southamerica-west1
                                  - me-central2
                                  - me-central1
                                  - me-west1
                                  - africa-south1
                                description: >-
                                  The ID of the Google project location secrets
                                  should be synced to (ie "us-west4").
                            required:
                              - scope
                              - projectId
                              - locationId
                            additionalProperties: false
                            title: Region
                    required:
                      - id
                      - name
                      - projectId
                      - connectionId
                      - createdAt
                      - updatedAt
                      - syncOptions
                      - connection
                      - environment
                      - folder
                      - destination
                      - destinationConfig
                    additionalProperties: false
                    title: GCP Secret Manager
                required:
                  - secretSync
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 400
                  message:
                    type: string
                  error:
                    type: string
                  details: {}
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 401
                  message:
                    type: string
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 403
                  message:
                    type: string
                  details: {}
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 404
                  message:
                    type: string
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 422
                  message: {}
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 500
                  message:
                    type: string
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false

````