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

# Set TLS certificate

## Paths

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

#### Path parameters

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

## Description

Creates or updates the TLS certificate chain.

## Authentication

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

## Request body

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

`application/json`

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

#### curl

```curl
curl -X POST "${API_URL}/platform/configuration/security/tls/adminconsole" \
  -u "${USERNAME}:${PASSWORD}" \
  -H "Content-Type: application/json" \
  -d '"string"'
```

