# Obtain a new Key

A key is necessary to send logs over the logging pipeline. For more information about the purpose of a pipeline key, see [<mark style="color:blue;">Log Security</mark>](https://docs.ionos.com/sections-test/guides/observability/logging-service/overview/log-security).

{% hint style="warning" %}
**Warning:**

* IONOS Cloud adheres to a **Share Once** policy to generate a key; there is no alternative method to retrieve it if lost. Hence, we recommend that you secure the generated key.
* The previous key is instantly revoked when you generate a new key for a specific pipeline.
  {% endhint %}

## Request

To get a new key for a pipeline, you can use the following request. Remember to replace the `{pipelineID}` with a valid ID of a pipeline to access its `key`.

```bash
curl --location
--request POST 'https://logging.de-txl.ionos.com/pipelines/{pipelineID}/key' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $TOKEN'
```

## Response

The response contains the key necessary to configure the `Shared_Key` in Fluent Bit.

```json
{
  "key": "key123"
}
```
