---
type: api
title: Set snapshot repository
description: Creates or updates the snapshot repository configuration.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-set-snapshot-repository
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-set-snapshot-repository
products:
  - Elastic Cloud Enterprise
---

# Set snapshot repository

## Paths

- `PUT` `/platform/configuration/snapshots/repositories/{repository_name}`

- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/authentication#basicauth)
- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/authentication#apikey)

#### Path Parameters

- `repository_name` (string)
  The name of the snapshot repository configuration.

## Description

Creates or updates the snapshot repository configuration.

## Query String Parameters

- `version` (integer)
  Checks for conflicts against the metadata version, then returns the value in the `x-cloud-resource-version` header.

## Request Body

`application/json`

The Elasticsearch snapshot repository configuration

- `type` (string) — required
  Repository type, (Currently supported: 's3')
- `settings` (object) — required
  Elasticsearch repository configuration settings JSON. See [Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html) for more information

## Response

New snapshot repository config

`application/octet-stream`

- `repository_name` (string)
  Elasticsearch snapshot repository name
- `config` (object)
  Elasticsearch configuration JSON for a snapshot repository
## Code Examples

#### Console

```console
PUT /platform/configuration/snapshots/repositories/{repository_name}
```

#### curl

```curl
curl -X PUT "/platform/configuration/snapshots/repositories/{repository_name}"
```

