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

# Resynchronize Deployment

Authentication: required

## 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.

## 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}"
```

## Response examples

#### 200

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "created": [
    "string"
  ],
  "updated": [
    "string"
  ],
  "deleted": [
    "string"
  ],
  "errors": [
    "string"
  ]
}
```

#### 500

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
```

