# Account field reference

Keep a service's website, login and issued secrets on the same Decoy account. An API key is a named Hidden field, separate from its login password. A passwordless service needs no password. Useful task context belongs in [Memories](/agent-memories.md).

<a id="choose-the-field-then-check-the-write-path"></a>
<a id="save-and-update-a-named-secret-current-write-limitation"></a>
## Scope

This page describes account fields in the Decoy app, and [Personal Info records](#personal-info-records) at the end. It is not itself a write procedure. With the MCP bridge, `account_field_set` saves a named secret (an API key, token or recovery code) on an existing account, and `account_field_get`, `account_field_list` and `account_field_delete` read, list and remove it; the standard created-only HTTP flow has no documented field writer. Use the [storage guide](/agent-storage.md#3-api-keys-and-other-secret-fields) for the current action and outcome. Do not put an API key in the password slot, create another account or request whole-vault access to bypass a missing writer.

Field kinds describe values inside an encrypted record; they are not plaintext properties to POST to Decoy. A field's concealed appearance is separate from access permission. A supported writer must preserve the exact secret, including meaningful whitespace, and all unrelated record content. Do not use an editor that changes either.

## Single-value field catalog

| App field | kind | Value and use |
| --- | --- | --- |
| Hidden | secret | API key, access token, client secret, webhook signing secret, PIN or recovery code. Keep each distinct credential under a meaningful label; its secret flag is true. |
| Security Question | security-question | Label: the exact question. Value: its answer, concealed with secret true. Keep the answer out of memory. |
| Name | name | The actual name used for this service. |
| Date of Birth | dob | A known date in YYYY-MM-DD form. |
| Email | email | An additional account email, such as a recovery address. Preserve the primary login and linked Decoy address. |
| Phone | phone | A known phone number as text, including its country code. |
| Website | url | An additional URL, such as API documentation. Keep the main service URL in its account field; exclude tokens and keys from URLs. |
| Number | number | A numeric value. A secret PIN belongs in Hidden; an identifier with meaningful leading zeroes belongs in Custom. |
| Date | date | A known date in YYYY-MM-DD form, such as an issued key's expiry. Do not invent an expiry. |
| Custom | custom | A labeled value without a more specific type. Secret values belong in Hidden. |

Values are strings, including numbers and dates. API key, token and password are not custom-field kind values. Use the account's main notes field for service notes; preserve any existing note fields when editing a record.

<a id="api-key-token-and-recovery-code-examples"></a>
## Name separate secrets clearly

Use a distinct label for each purpose, such as API key, Webhook signing secret or Recovery code 1. Add an environment label only when known. Keep the secret separate from its non-secret purpose or expiry. Updating a value reuses its account and field identity; ambiguous duplicate labels need resolution before editing. Saving a replacement in Decoy does not rotate or revoke the credential at its provider.

## Multi-part fields

Address and Credit Card are typed records with separate members, not generic strings. The table describes those members; it does not supply an agent write endpoint.

| Field | kind | Members |
| --- | --- | --- |
| Address | address | streetAddress, apt, city, territory, postalCode, country |
| Credit Card | credit-card | number, fullName, expiryDate, verificationNumber |

Use a known country code and region for addresses and preserve postal codes as strings. Card expiry uses YYYY-MM; card number and verification number are concealed. The app also has a billing-ZIP field; do not infer support for that member in an agent writer. Store only details covered by the person's task. A saved card does not authorize a purchase. Authenticator/TOTP and passkeys use dedicated flows, not these structured-field kinds.

<a id="personal-info-records"></a>
## Personal Info records

An account's own secrets (password, 2FA codes, custom fields) are read over HTTP the same way, with `"kind":"account"` and the account id: [reading and sending over HTTP](https://www.decoys.me/docs/access.md#reading-and-sending-over-http).

Personal Info (the owner's emails, phones, cards, addresses, names, birthdays, identities and other details) is not an account field. Each item is a record of its own, and its fields are not the account fields above: a Personal Info card has `cardholderName`, `expiration` and `cvv`, not `fullName`, `expiryDate` and `verificationNumber`.

A connection holding `personal.read` reads every record it covers, whole (a card: `{"permissions":["personal.read"],"record_type":"cards"}`; [asking](https://www.decoys.me/docs/access.md#ask-wait-read-back)). Over HTTP, an agent reads a record this way (with the MCP bridge, `identity_get` reads it for you):

1. `GET /api/agent/sealed-secrets`. Each `kind: "personal"` item is a copy of one record that the owner's Decoy app sealed to your agent key: `target_id` is the record's id, and `datatype` its kind, or `null` for a copy stored without a kind (the kind is then the record's `type` in the list below). Open `sealed_envelope` with `openAgentEnvelope` from [agent-envelope.mjs](https://www.decoys.me/examples/agent-envelope.mjs); it holds the keys in the last column below.
2. A record that is not in that list, for example right after you connected with a new key: `POST /api/agent/unlock` with `{"target":{"kind":"personal","id":"<record id>"},"reason":"<the task>"}`. A `201` with `status: "ready"`: `GET /api/agent/unlock/{id}` and open each item's `sealed_envelope`. A `200` with `available: false`, `state: "preparing"` and `waiting_on: "owner_phone"`: the owner's phone is sharing it with your key; read again after `retry_after_seconds` ([wait before you ask](https://www.decoys.me/agent-recipes.md#wait-before-you-ask)). `state: "failed"` with `recovery: "stopped_asking"`: it is not shared with this connection; carry on without it. `available: false` with no `state`: not shared with this connection; carry on without it. A record missing from the sealed-secrets list is not a refusal and not proof it does not exist.

Record ids and kinds are the `id` and `type` of each entry of `GET /api/agent/personal-info`. An entry with `type: "fold_marker"` is the vault's own bookkeeping, not the owner's data: it has no fields and no sealed copy, and unlock does not read it. Skip it. That entry's `encrypted_data` is sealed to the owner's vault key, and only a connection that holds the vault key opens it: it is the record with every field it stores. A connection without the vault key never reads `encrypted_data` and never calls `GET /api/agent/vault-key`; neither leads to the record. Keys a record does not store are absent.

| `type` (`datatype` in sealed-secrets) | Fields of the record | Keys of the sealed copy |
| --- | --- | --- |
| `email` (`email`) | `email`, `label` | `email`, `label` |
| `phone` (`phone`) | `phone`, `label` | `phone`, `label` |
| `card` (`credit-card`) | `number` (digits only), `cardholderName`, `expiration` (MM/YYYY), `cvv`, `zip` (billing postal code), `label`, `lastFour`, `cardType` (the brand) | `number`, `cardholderName`, `expiration`, `cvv`, `zip`, `label`, `lastFour`, `cardType` |
| `address` (`address`) | `street`, `city`, `state`, `zip`, `label`, and `apt`, `country` (as the owner wrote it), `notes` when set | `street`, `city`, `state`, `zip`, `label` |
| `name` (`name`) | `name` (the full name), `label`, and `first`, `middle`, `last` when set | `name`, `label` |
| `birthday` (`birthday`) | `date` (YYYY-MM-DD), `label` | `date`, `label` |
| `identity` (`identity`) | `label`, `first`, `middle`, `last`, `birthday`, `gender`, `company`, `jobtitle`, `department`, `street`, `apt`, `city`, `region`, `postalCode`, `country`, `phone`, `emailId` (a reference to one of the owner's verified emails), `website`, `isDefault`, `custom` (a list of `{ label, value }`) | the same keys |
| `company`, `job_title`, `website`, `gender`, `department`, `custom` | `value`, or the kind's own key (`company`, `title` for a job title, `url` for a website, `gender`, `department`), and `label` (for `custom`, the field's name). Read `value` first, then that key | no sealed copy: a connection without the vault key cannot read these kinds |

`lastFour` and `cardType` are worked out from `number` when the card is saved. Use a card only for what the person's task covers; a saved card does not authorize a purchase. The exact schemas are in the [API reference](https://www.decoys.me/documentation) (`PersonalCardRecord` and the other `Personal…Record` schemas, and `IdentityRecord`).

<a id="preserve-existing-fields-and-verify-the-result"></a>
## Preserve and confirm

An editor that replaces a field collection must retain every unrelated entry. Stop if the current collection is unreadable or incomplete; an empty replacement can clear it. Do not infer stable field identities or conflict protection from a field schema.

A successful response or has_password flag does not establish the correct field kind, secret value or app visibility. Confirm stored content with an independent authorized fetch and decryption; confirm an app or extension result only by observing that surface. The original input and local cache are not read-back evidence. If no supported writer is available, report the save as incomplete and follow the storage guide's secure handling instructions.
