# Secret.stored

URL: /business/events/Secret.stored · Id: `event:Secret.stored`

> Emitted each time a Secret is stored.

[Secret.store](/business/nouns/secret/store) emits `Secret.stored` when it completes on a [Secret](/business/nouns/secret).

| Property | Value |
| --- | --- |
| Emitted by | [Secret.store](/business/nouns/secret/store) |
| Noun | [Secret](/business/nouns/secret) |
| Wakes | None. |

### Payload
Each delivery is an [Event](/business/nouns/event) record. `data` holds what [Secret.store](/business/nouns/secret/store) returns.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | `string` | Yes | `Secret.stored`. |
| `at` | `datetime` | Yes | When it happened. |
| `seq` | `integer` | No | Its position in the namespace, one more than the Event before; any seq is a cursor into the history. |
| `data` | `json` | Yes | The Thing as the Action left it. |
| `data.secret` | [Secret](/business/nouns/secret) | Yes | The Secret, without its value. |
| `data.secret.name` | `string` | Yes | The name a Function declares, such as `MAPS_KEY`; `list` returns names only. |
| `data.secret.environment` | `string` | Yes | The environment that holds this value; a Function deploys to `live` only when every declared Secret exists there. |
| `data.secret.scope` | `string` | Yes | Whether the whole Startup or one Tenant holds it. |
| `data.secret.rotatedAt` | `datetime` | No | When the value last changed. |

### Example
```json
{
  "$id": "https://api.sb/kilnbakery.com/events/event_1",
  "$type": "Event",
  "name": "Secret.stored",
  "at": "2026-10-22T12:00:00Z",
  "data": {
    "secret": {
      "$id": "https://api.sb/kilnbakery.com/secrets/secret_1",
      "$type": "Secret",
      "name": "MAPS_KEY",
      "environment": "test",
      "scope": "startup",
      "rotatedAt": "2026-10-22T12:00:00Z"
    }
  },
  "seq": 1
}
```