# API: Public records

| Method | Path | What it does | Scope |
|---|---|---|---|
| GET | `/v1/accounts/:id/public-records` | An account's register matches (with the accounting-system fingerprint), dated records with their register URLs, funding rounds, locations and partner/investor mentions | `accounts:read` |
| POST | `/v1/accounts/:id/public-records/match` | Queue a lookup of the account in the registers that are on (it runs in the worker): identifiers on the record and name-plus-domain matches are confirmed; name-only matches wait for a person | `accounts:write` |
| POST | `/v1/accounts/:id/public-records/refresh` | Queue a read of the account's confirmed register entries (it runs in the worker: filings, Form D amounts, officers, filing history, the accounting-system fingerprint) | `accounts:write` |
| PATCH | `/v1/public-record-matches/:id` | Confirm or reject a suggested register match (a person, from the app; confirming sets the account's other suggestions from that register aside) (web app only) | `accounts:write` |
| PUT | `/v1/public-records/settings` | Whether an account's public records feed its research briefs (owners) | `settings:write` |
| GET | `/v1/public-records/status` | Which registers are on (SEC EDGAR needs the operator's declared contact; Companies House a key), whether records feed research briefs, and what's deferred | `accounts:read` |

## Examples

### GET /v1/accounts/$ID/public-records

An account's register matches (with the accounting-system fingerprint), dated records with their register URLs, funding rounds, locations and partner/investor mentions

```bash
curl -s "https://api.closefinch.com/v1/accounts/$ID/public-records" \
  -H "Authorization: Bearer $RA_API_KEY"
```

```js
const res = await fetch(`https://api.closefinch.com/v1/accounts/${id}/public-records`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();
```

### POST /v1/accounts/$ID/public-records/match

Queue a lookup of the account in the registers that are on (it runs in the worker): identifiers on the record and name-plus-domain matches are confirmed; name-only matches wait for a person

```bash
curl -s -X POST "https://api.closefinch.com/v1/accounts/$ID/public-records/match" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.closefinch.com/v1/accounts/${id}/public-records/match`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();
```

### POST /v1/accounts/$ID/public-records/refresh

Queue a read of the account's confirmed register entries (it runs in the worker: filings, Form D amounts, officers, filing history, the accounting-system fingerprint)

```bash
curl -s -X POST "https://api.closefinch.com/v1/accounts/$ID/public-records/refresh" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.closefinch.com/v1/accounts/${id}/public-records/refresh`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();
```

### PUT /v1/public-records/settings

Whether an account's public records feed its research briefs (owners)

```bash
curl -s -X PUT "https://api.closefinch.com/v1/public-records/settings" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.closefinch.com/v1/public-records/settings`, {
  method: "PUT",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();
```

### GET /v1/public-records/status

Which registers are on (SEC EDGAR needs the operator's declared contact; Companies House a key), whether records feed research briefs, and what's deferred

```bash
curl -s "https://api.closefinch.com/v1/public-records/status" \
  -H "Authorization: Bearer $RA_API_KEY"
```

```js
const res = await fetch(`https://api.closefinch.com/v1/public-records/status`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();
```

Request and response schemas: [https://www.closefinch.com/openapi.json](https://www.closefinch.com/openapi.json). All resources: [API reference](https://www.closefinch.com/docs/api).
