# Disclose masked neurons

Let a verified person, such as an auditor, see the masked neurons on one of your trace shares, with your approval, for a set time, in a watermarked and logged view.

Use neuron disclosure to let one verified person, such as an auditor or a customer's safety reviewer, see the masked neurons on one of your [trace shares](https://provenanceauth.com/docs/trace/concepts/attribution-traces.md#share-a-trace). You decide who sees what, and for how long.

A public share masks your account's private neurons and your canary-set members as opaque `n_…` IDs. A grant shows them to one person:

| Property | Rule |
| --- | --- |
| Who can ask | A person with a verified email and a passkey. API keys, embed tokens and agents can't request or view. |
| What a grant covers | One share, or chosen neurons on it, for 1–30 days (default 7). You can revoke it at any time. |
| Where it shows | In the requester's browser, behind their own session, watermarked with their email and the grant ID. Every view is logged for you. |
| What can be disclosed | Your own private neurons and canary sets. Provenance's curated canary members stay masked and look like any neuron the grant doesn't cover. |

**Before you begin:** export the sandbox account key.

```bash
export PROVENANCE_API=https://sandbox-api.provenanceauth.com
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
```

## 1. Choose how requests are handled

Read your account's mode with [`GET /v1/trace/settings/disclosure`](https://provenanceauth.com/docs/api/neuron-disclosure.md#get-v1-trace-settings-disclosure):

**curl**

```bash
curl $PROVENANCE_API/v1/trace/settings/disclosure \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
import { Provenance } from "@provenanceauth/sdk";

const prov = new Provenance({ apiKey: process.env.PROVENANCE_KEY!, baseUrl: process.env.PROVENANCE_API });
const setting = await prov.trace.disclosure.getMode();
```

**Python**

```python
import os
from provenanceauth import Provenance

prov = Provenance(os.environ["PROVENANCE_KEY"], base_url=os.environ["PROVENANCE_API"])
setting = prov.trace.disclosure.get_mode()
```

```json
{
  "object": "trace_disclosure_setting",
  "mode": "approve_each",
  "default_ttl_days": 7,
  "max_ttl_days": 30,
  "curated_sets_disclosable": false
}
```

| Mode | What happens to a request |
| --- | --- |
| `approve_each` (default) | It waits in your inbox until you approve or deny it. |
| `auto` | Any verified requester is granted at once, for your default duration. You're still notified and can revoke. |
| `never` | The requester sees that you don't accept requests, and nothing is stored. |

An owner or admin changes the mode with `PUT` on the same path, or in the console under **Settings → Trace**.

## 2. Receive a request

The requester opens your share link, selects **Request details**, verifies their email, uses a passkey, and sends a reason with the whole share or chosen neurons. You're notified in the console (**Trace → Disclosure**), by email, in Slack if you connected it, and by the `trace.disclosure_request.created` [webhook](https://provenanceauth.com/docs/integrate/webhooks.md). List pending requests with [`GET /v1/trace/disclosure_requests`](https://provenanceauth.com/docs/api/neuron-disclosure.md#get-v1-trace-disclosure-requests):

**curl**

```bash
curl "$PROVENANCE_API/v1/trace/disclosure_requests?status=pending" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const pending = await prov.trace.disclosure.list({ status: "pending" });
```

**Python**

```python
pending = prov.trace.disclosure.list(status="pending")
```

```json
{ "object": "list", "data": [], "has_more": false, "next_cursor": null }
```

The sandbox has no requests, because only a person with a passkey can make one. On your account, each entry names the requester's email, the reason and the scope.

## 3. Approve or deny it

Approve a request, optionally with a shorter duration, or deny it. These act on a real request in your account:

**curl**

```bash norun
curl -X POST $PROVENANCE_API/v1/trace/disclosure_requests/$REQUEST_ID/approve \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "ttl_days": 3 }'
```

**Node**

```ts
await prov.trace.disclosure.approve(requestId, { ttlDays: 3 });
```

**Python**

```python
prov.trace.disclosure.approve(request_id, ttl_days=3)
```

```json
{
  "id": "dsr_01M5Q1A0B2C3D4E5F6G7H8J9K0",
  "object": "disclosure_request",
  "status": "granted",
  "scope_kind": "share",
  "trace_id": "trc_3825b248bd2b537c480abfccb6640df5",
  "model_version_id": "qwen2.5-0.5b-instruct@7ae55760",
  "ref_count": null,
  "reason": "Independent audit of the injection guard",
  "requester": { "email": "auditor@example.org", "display_name": null },
  "decided_by": "api_key:prv_live",
  "decided_at": "2026-10-24T13:20:00.000Z",
  "expires_at": "2026-10-27T13:20:00.000Z",
  "created_at": "2026-10-24T13:02:00.000Z"
}
```

On approval `trace.disclosure_request.granted` fires, and the requester sees the covered neurons on the share page: layer, index, pole, label and top examples, with the watermark across the view.

| Action | Endpoint |
| --- | --- |
| Deny a pending request | [`POST /v1/trace/disclosure_requests/{id}/decline`](https://provenanceauth.com/docs/api/neuron-disclosure.md#post-v1-trace-disclosure-requests-id-decline) |
| End an active grant now | [`POST /v1/trace/disclosure_requests/{id}/revoke`](https://provenanceauth.com/docs/api/neuron-disclosure.md#post-v1-trace-disclosure-requests-id-revoke) |
| Read the view log | [`GET /v1/trace/disclosure_requests/{id}/views`](https://provenanceauth.com/docs/api/neuron-disclosure.md#get-v1-trace-disclosure-requests-id-views) |

When a grant expires or you revoke it, the share renders masked again. A disclosed view is a render for one person, so the share's signed [manifest](https://provenanceauth.com/docs/trace/concepts/trace-manifest.md) still binds the masked public render and verifies the same for everyone.

## Errors you might see

| Symptom | Cause | Fix |
| --- | --- | --- |
| `403` [`disclosure_not_permitted`](https://provenanceauth.com/docs/platform/errors.md#disclosure_not_permitted) | Deciding a request that isn't pending, or revoking one that isn't granted | List requests to check their status. |
| `404` [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing) | Another account's request | Use a request from your own inbox. |
| `401` [`disclosure_requires_human`](https://provenanceauth.com/docs/platform/errors.md#disclosure_requires_human) | Calling a requester endpoint with an API key | Requesting needs a verified person's session. |
| `402` [`trial_ended`](https://provenanceauth.com/docs/platform/errors.md#trial_ended) on approve | The Free trial ended | Choose a plan in **Settings → Plan & usage**; see [plans and usage](https://provenanceauth.com/docs/account/plans-and-usage.md#free-trial). |

## See also

- [Attribution traces](https://provenanceauth.com/docs/trace/concepts/attribution-traces.md)
- [Neuron registry](https://provenanceauth.com/docs/trace/concepts/neuron-registry.md)
- [Webhooks](https://provenanceauth.com/docs/integrate/webhooks.md)
