---
type: api
title: Resynchronize Deployment
description: Immediately resynchronizes the search index for the selected deployment.
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/cloud-enterprise/operation/operation-resync-deployment
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/cloud-enterprise/operation/operation-resync-deployment
products:
  - Elastic Cloud Enterprise
---

# Resynchronize Deployment

## Paths

- `POST` `/deployments/{deployment_id}/_resync`

#### Path parameters

- `deployment_id` (string) — required
  Identifier for the Deployment

## Description

Immediately resynchronizes the search index for the selected deployment.

## Authentication

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

## Responses

#### `200`

The deployment 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 deployment resync operation failed for deployment {deployment_id}. (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/${DEPLOYMENT_ID}/_resync" \
  -u "${USERNAME}:${PASSWORD}"
```

