# API: Browser extension

| Method | Path | What it does | Scope |
|---|---|---|---|
| GET | `/v1/capture/lookup` | Who an address or domain belongs to here: the contact or account, its owner, open deals, and booking pages to send | `contacts:read` |
| POST | `/v1/capture/page` | Capture the person or company on a page into the CRM (found by email, LinkedIn or domain; blanks filled; a note with the page) | `contacts:write` |
| POST | `/v1/rfp/portal-fill` | Answers for a web portal's questionnaire from the approved RFP library (the extension fills only what the person confirms) | `deals:read` |
| GET | `/v1/settings/extension` | Browser extension settings | `contacts:read` |
| PATCH | `/v1/settings/extension` | Browser extension settings: LinkedIn profile capture (off until an owner turns it on) | `settings:write` |

## Examples

### GET /v1/capture/lookup

Who an address or domain belongs to here: the contact or account, its owner, open deals, and booking pages to send

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

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

### POST /v1/capture/page

Capture the person or company on a page into the CRM (found by email, LinkedIn or domain; blanks filled; a note with the page)

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

```js
const res = await fetch(`https://api.closefinch.com/v1/capture/page`, {
  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/rfp/portal-fill

Answers for a web portal's questionnaire from the approved RFP library (the extension fills only what the person confirms)

```bash
curl -s -X POST "https://api.closefinch.com/v1/rfp/portal-fill" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.closefinch.com/v1/rfp/portal-fill`, {
  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();
```

### GET /v1/settings/extension

Browser extension settings

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

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

### PATCH /v1/settings/extension

Browser extension settings: LinkedIn profile capture (off until an owner turns it on)

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

```js
const res = await fetch(`https://api.closefinch.com/v1/settings/extension`, {
  method: "PATCH",
  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();
```

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).
