# Secrets

{% hint style="info" %}
Only Administrator, Developer, or custom roles with [specified permissions](https://docs.nlx.ai/platform/nlx-platform-guide/governance/roles-and-permissions) may set up *Secrets* in a workspace.
{% endhint %}

### What are Secrets?

Secrets allow for the secure management and configuration of environment variables when referencing them during setup of a [*Data request*](https://docs.nlx.ai/platform/nlx-platform-guide/integrations/types/data-requests), [*Action*](https://docs.nlx.ai/platform/nlx-platform-guide/flows-and-building-blocks/advanced/actions), or [*Lifecycle hook*](https://docs.nlx.ai/platform/nlx-platform-guide/flows-and-building-blocks/advanced/lifecycle-hooks) or in a flow through a [*Data request* node](https://docs.nlx.ai/platform/nlx-platform-guide/overview/nodes#data-request)*.*

They may be used to provide workspace efficiency when needing dynamic placeholders for commonly typed values, such as URL strings as well as static or dynamic values, including API keys, tokens, or passwords.&#x20;

To access, click *Resources* in your workspace menu and choose *Secrets*:

{% @arcade/embed flowId="iymmQlZAp05AY1wpYSUG" url="<https://app.arcade.software/share/iymmQlZAp05AY1wpYSUG>" %}

***

## Add a secret

Begin by selecting *+ Add secret* from the *Secrets* resource:

{% @arcade/embed flowId="mKP214qnC3fvyUisOiGH" url="<https://app.arcade.software/share/mKP214qnC3fvyUisOiGH>" %}

* Enter a name and the secret's value
* Add an optional description
* Keep *Sensitive* setting enabled (default) or disable. The sensitive setting turns the Secret's value to asterisks and redacts it from conversation logs
* Click *Create secret*

{% hint style="danger" %}
Need to edit or delete a *Secret*? After creating your *Secret*, you may expand its details and select *Edit* or *Delete secret* at any time.
{% endhint %}

***

## Use a Secret

Once a *Secret* has been created, you may reference it easily when managing [*Data requests*](https://docs.nlx.ai/platform/nlx-platform-guide/integrations/types/data-requests), [*Actions*](https://docs.nlx.ai/platform/nlx-platform-guide/flows-and-building-blocks/advanced/actions), [*Lifecycle hooks*](https://docs.nlx.ai/platform/nlx-platform-guide/flows-and-building-blocks/advanced/lifecycle-hooks)*,* or directly in payload fields of a [*Data request* node](https://docs.nlx.ai/platform/nlx-platform-guide/overview/nodes#data-request):

{% @arcade/embed flowId="MX7kkRVilxzWIYJRjiSk" url="<https://app.arcade.software/share/MX7kkRVilxzWIYJRjiSk>" %}

When setting up a custom webhook:

* Create new or select an existing *Data request*, *Action*, or *Lifecycle hook*
* Under the resource's external tab of *Implementation,* reference your secret in the URL field or in the value field under *Headers*

When referencing in a flow:

* After creating a *Data request* with a *Request* *model* defined, create or selecting an existing flow in the workspace
* Add a *Data request* node to the Canvas > Select *+ Add data request* on the node
* Enable the *Custom* toggle and choose the *Data request* you created
* Enter an open curly brace `{` on the payload field that should receive the secret and select the secret created

{% hint style="info" %}
Select from available *Secrets* by entering an open curly brace { in the text field.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nlx.ai/platform/nlx-platform-guide/flows-and-building-blocks/advanced/secrets.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
