# API: Partners and investors

| Method | Path | What it does | Scope |
|---|---|---|---|
| GET | `/v1/account-mentions` | Accounts named on watched pages, newest first, with the quote, page, dates, type and whether the account is a customer | `accounts:read` |
| DELETE | `/v1/mention-watch-pages/:id` | Stop watching a page | `accounts:write` |
| GET | `/v1/mention-watches` | Watched partners, agencies and investors with their pages and how many accounts they name | `accounts:read` |
| POST | `/v1/mention-watches` | Watch a partner, agency or investor (name, kind and its own domain) | `accounts:write` |
| DELETE | `/v1/mention-watches/:id` | Stop watching (its mentions stay as history) | `accounts:write` |
| PATCH | `/v1/mention-watches/:id` | Rename a watch, change its kind or notes | `accounts:write` |
| POST | `/v1/mention-watches/:id/pages` | Watch a public page on the entity's own domain (portfolio, case studies, customers, press; no query strings) | `accounts:write` |
| POST | `/v1/mention-watches/check` | Read watched pages now (one watch, or all of them) and record which accounts they name | `accounts:write` |

## Examples

### GET /v1/account-mentions

Accounts named on watched pages, newest first, with the quote, page, dates, type and whether the account is a customer

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

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

### DELETE /v1/mention-watch-pages/$ID

Stop watching a page

```bash
curl -s -X DELETE "https://api.closefinch.com/v1/mention-watch-pages/$ID" \
  -H "Authorization: Bearer $RA_API_KEY"
```

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

### GET /v1/mention-watches

Watched partners, agencies and investors with their pages and how many accounts they name

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

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

### POST /v1/mention-watches

Watch a partner, agency or investor (name, kind and its own domain)

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

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

### DELETE /v1/mention-watches/$ID

Stop watching (its mentions stay as history)

```bash
curl -s -X DELETE "https://api.closefinch.com/v1/mention-watches/$ID" \
  -H "Authorization: Bearer $RA_API_KEY"
```

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

### PATCH /v1/mention-watches/$ID

Rename a watch, change its kind or notes

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

```js
const res = await fetch(`https://api.closefinch.com/v1/mention-watches/${id}`, {
  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();
```

### POST /v1/mention-watches/$ID/pages

Watch a public page on the entity's own domain (portfolio, case studies, customers, press; no query strings)

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

```js
const res = await fetch(`https://api.closefinch.com/v1/mention-watches/${id}/pages`, {
  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/mention-watches/check

Read watched pages now (one watch, or all of them) and record which accounts they name

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

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

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