---
title: "POST /api/v2/secret-imports"
method: POST
path: "/api/v2/secret-imports"
tags: ["Secret Imports"]
---

# POST /api/v2/secret-imports

`POST /api/v2/secret-imports`

Create secret imports

## Request body

- object
  - `projectId` string, required — The ID of the project you are working in.
  - `environment` string, required — The slug of the environment to import into.
  - `path` string — The path to import into.
  - `import` object, required
    - `sourceProjectId` string — The ID of the project to import from.
    - `environment` string, required — The slug of the environment to import from.
    - `path` string, required — The path to import from.
  - `isReplication` boolean — When true, secrets from the source will be automatically sent to the destination. If approval policies exist at the destination, the secrets will be sent as approval requests instead of being applied immediately.

## 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/885aef3e6c11/schema)
