---
type: api
title: Set TLS certificate
description: Creates or updates the TLS certificate chain.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/v4/operation/operation-set-tls-certificate
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/v4/operation/operation-set-tls-certificate
products:
  - Elastic Cloud Enterprise
---

# Set TLS certificate

## Paths

- `POST` `/platform/configuration/security/tls/{service_name}`

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

#### Path Parameters

- `service_name` (enum)
  The service certificate chain to read.
  Values: `adminconsole`, `proxy`, `ui`, `internalca`

## Description

Creates or updates the TLS certificate chain.

## Request Body

`application/json`

New certificate chain: the PEM encoded RSA private key, followed by the server certificate, followed by the CA certificate

Type: `string`


## Response

The TLS update has been accepted for the given service and will take effect throughout the system

`application/octet-stream`

- `service` (enum)
  The service certificate chain that has been updated
  Values: `adminconsole`, `proxy`, `ui`, `internalca`
## Code Examples

#### Console

```console
POST /platform/configuration/security/tls/{service_name}
```

#### curl

```curl
curl -X POST "/platform/configuration/security/tls/{service_name}"
```

