---
title: "PATCH /api/v2/secret-imports/{secretImportId}"
method: PATCH
path: "/api/v2/secret-imports/{secretImportId}"
tags: ["Secret Imports"]
---

# PATCH /api/v2/secret-imports/{secretImportId}

`PATCH /api/v2/secret-imports/{secretImportId}`

Update secret imports

## Path parameters

- `secretImportId` string, required

## Request body

- object
  - `projectId` string, required — The ID of the project where the secret import is located.
  - `environment` string, required — The slug of the environment where the secret import is located.
  - `path` string — The path of the secret import to update.
  - `import` object, required
    - `environment` string — The new environment slug to import from.
    - `path` string — The new path to import from.
    - `position` number — The new position of the secret import. The lowest number will be displayed as the first import.

## Response `200`

Default Response

- object
  - `message` string, required
  - `secretImport` object, required
    - `id` string, uuid, required
    - `version` number, nullable
    - `importPath` string, required
    - `position` number, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `folderId` string, uuid, required
    - `isReplication` boolean, nullable
    - `isReplicationSuccess` boolean, nullable
    - `replicationStatus` string, nullable
    - `lastReplicated` string, date-time, nullable
    - `isReserved` boolean, nullable
    - `importEnv` object, required
      - `name` string, required
      - `slug` string, required
      - `id` string, required

## Other responses

- `400` — Default Response
- `401` — Default Response
- `403` — Default Response
- `404` — Default Response
- `422` — Default Response
- `500` — Default Response

---

[API](https://skmtc.net/infisical/apis/infisical-api.md) · [All operations](https://skmtc.net/infisical/apis/infisical-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/infisical/infisical-api/versions/f10a4f8c1d41/schema)
