# Quickstart (/en/docs/developers/vault/quickstart)



Put your API Key in the `PRAXIS_API_KEY` environment variable and run the three requests below in order. Each run creates a new vault. Install `jq` to extract its ID; optionally set `VAULT_NAME` to choose its display name.

## 1. Create a vault [#1-create-a-vault]

```bash
VAULT_JSON=$(curl --fail-with-body -sS -X POST "https://api.deepraxis.com/vault/v1/vaults" \
  -H "Authorization: Bearer $PRAXIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d "$(jq -n --arg name "${VAULT_NAME:-Agent credentials}" '{display_name: $name}')")
export VAULT_ID=$(printf '%s' "$VAULT_JSON" | jq -er '.id')
printf '%s\n' "$VAULT_JSON"
```

Expect HTTP 200 with an object whose `type` is `vault`, `status` is `active` and `secret_count` is `0`. The command saves its `vlt_` ID in `VAULT_ID`.

## 2. Add a secret [#2-add-a-secret]

```bash
curl -X POST "https://api.deepraxis.com/vault/v1/vaults/$VAULT_ID/secrets" \
  -H "Authorization: Bearer $PRAXIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "GITHUB_TOKEN", "value": "ghp_example", "allowed_hosts": ["api.github.com"]}'
```

Expect HTTP 200 with an object whose `type` is `vault_secret`, `kind` is `static` and `version` is `1`. The response has no `value`: once written, a value is never returned. This secret can be used only on requests to `api.github.com`.

## 3. List secrets [#3-list-secrets]

```bash
curl "https://api.deepraxis.com/vault/v1/vaults/$VAULT_ID/secrets" \
  -H "Authorization: Bearer $PRAXIS_API_KEY"
```

Expect HTTP 200 with one item in `data` named `GITHUB_TOKEN`, and `next_cursor` set to `null`.

## Clean up [#clean-up]

```bash
curl -X POST "https://api.deepraxis.com/vault/v1/vaults/$VAULT_ID/archive" \
  -H "Authorization: Bearer $PRAXIS_API_KEY"

curl -X DELETE "https://api.deepraxis.com/vault/v1/vaults/$VAULT_ID" \
  -H "Authorization: Bearer $PRAXIS_API_KEY"
```

Expect HTTP 200 with `status: "archived"` from archive, then HTTP 200 with `{"id": "<VAULT_ID>", "type": "vault_deleted"}`. Deleting a vault also deletes every secret in it and cannot be undone.

[Templates, .env import and one-click authorization →](/en/docs/developers/vault/concepts) · [All requests and objects →](/en/docs/api/native/vault)
