---
type: api
title: Resynchronize Deployments
description: Resynchronizes the search index for all the deployments.
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/cloud-enterprise/v4/operation/operation-resync-deployments
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/cloud-enterprise/v4/operation/operation-resync-deployments
products:
  - Elastic Cloud Enterprise
---

# Resynchronize Deployments

## Paths

- `POST` `/deployments/_resync`

## Description

Resynchronizes the search index for all the deployments.

## Authentication

- Basic: `Authorization: Basic <credentials>`
- Api key: `Authorization: <value>`

## Query string parameters

- `skip_matching_version` (boolean · default: true) — optional
  When true, skips the document indexing when the version matches the in-memory copy.

## Responses

#### `200`

The deployments resync operation executed successfully.

`application/json`

- `created` (string[])
  The ids of documents created in the index by index version
- `updated` (string[])
  The ids of documents updated in the index by index version
- `deleted` (string[])
  The ids of documents deleted from the index by index version
- `errors` (string[])
  The regions where document synchronization may have failed
#### `500`

The deployments resync operation failed. (code: `deployments.resync_failed`)

`application/json`

- `errors` (object[])
  A list of errors that occurred in the failing request
  - `code` (string)
    A structured code representing the error type that occurred
  - `message` (string)
    A human readable message describing the error that occurred
  - `fields` (string[])
    If the error can be tied to a specific field or fields in the user request, this lists those fields
##### Response headers

- `x-cloud-error-codes` (enum)
  The error codes associated with the response

## Code examples

#### curl

```curl
curl -X POST "${API_URL}/deployments/_resync" \
  -u "${USERNAME}:${PASSWORD}"
```

