---
title: "Sync secrets with vault"
method: POST
path: "/api/v1/vault/sync"
tags: ["Customer Vault"]
---

# Sync secrets with vault

`POST /api/v1/vault/sync`

## Request

- Base URL: `http://localhost:8080`
- URL: `http://localhost:8080/api/v1/vault/sync`
- Auth: API key in header `Authorization`

Synchronize secrets between Nife and external vault provider

## Headers

- `X-Organization-ID` string, required
- `X-User-ID` string, required

## Request body

- CustomervaultSyncSecretsRequest
  - `force_sync` boolean
  - `secret_ids` string[]: if empty, sync all
  - `sync_type` string: full, incremental
  - `vault_provider_id` string, required

## Response `200`

Sync job started successfully

- CustomervaultVaultSyncJob
  - `created_at` string
  - `created_by` string
  - `end_time` string
  - `error_details` string
  - `id` string
  - `job_metadata` object
  - `organization_id` string
  - `secrets_failed` integer
  - `secrets_processed` integer
  - `secrets_updated` integer
  - `start_time` string
  - `status` string: pending, running, completed, failed
  - `sync_type` string: full, incremental, single_secret
  - `vault_provider_id` string

## Other responses

- `400`: Invalid request
- `500`: Internal server error

---

[API](https://skmtc.dev/nife/apis/nife-io-swagger-api.md) - [All operations](https://skmtc.dev/nife/apis/nife-io-swagger-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nife/apis/nife-io-swagger-api/revisions/6e868dc62795?raw)
