---
title: "Add a company or publication I opened to my history"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.sureshake.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Sureshake API › users

`POST /v2/users/me/recent-views`

## Request body

_Required._

- `subjectType` (`recent-views-record-recent-view.subjectType`; string, required)
  - one of `"company"`, `"publication"`
- `subjectId` (`recent-views-record-recent-view.subjectId`; string, required)
  - format `uuid`

## Example request

```json
{
  "subjectType": "company",
  "subjectId": "68460e63-0717-47f9-8fd8-d28f152cb30b"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://api.sureshake.com/v2/users/me/recent-views \
  --header 'Content-Type: application/json' \
  --data '
{
  "subjectType": "company",
  "subjectId": "68460e63-0717-47f9-8fd8-d28f152cb30b"
}
'
```

### TypeScript

```typescript
const url = 'https://api.sureshake.com/v2/users/me/recent-views';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({subjectType: 'company', subjectId: '68460e63-0717-47f9-8fd8-d28f152cb30b'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sureshake.com/v2/users/me/recent-views"

payload = {
    "subjectType": "company",
    "subjectId": "68460e63-0717-47f9-8fd8-d28f152cb30b"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Default Response

#### Example

```json
{
  "data": {
    "recorded": true,
    "view": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "subjectType": "company",
      "subjectId": "string",
      "title": "string",
      "href": "string",
      "imageUrl": "string",
      "viewCount": 0,
      "lastViewedAt": "string"
    }
  },
  "meta": {
    "timestamp": "2019-08-24T14:15:22Z"
  }
}
```

- `data` (`recent-views-record-recent-view.response.200.data`; object, required)
  - `recorded` (`recent-views-record-recent-view.response.200.data.recorded`; boolean, required)
  - `view` (`recent-views-record-recent-view.response.200.data.view`; object, required, nullable)
    - `id` (`recent-views-record-recent-view.response.200.data.view.id`; string, required)
      - format `uuid`
    - `subjectType` (`recent-views-record-recent-view.response.200.data.view.subjectType`; string, required)
      - one of `"company"`, `"person"`, `"publication"`
    - `subjectId` (`recent-views-record-recent-view.response.200.data.view.subjectId`; string, required)
    - `title` (`recent-views-record-recent-view.response.200.data.view.title`; string, required)
    - `href` (`recent-views-record-recent-view.response.200.data.view.href`; string, required)
    - `imageUrl` (`recent-views-record-recent-view.response.200.data.view.imageUrl`; string, required, nullable)
    - `viewCount` (`recent-views-record-recent-view.response.200.data.view.viewCount`; integer, required)
      - min 0
    - `lastViewedAt` (`recent-views-record-recent-view.response.200.data.view.lastViewedAt`; string, required)
- `meta` (`recent-views-record-recent-view.response.200.meta`; object, optional)
  - `timestamp` (`recent-views-record-recent-view.response.200.meta.timestamp`; string, required)
    - format `date-time`

### 400

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`recent-views-record-recent-view.response.400.error`; object, required)
  - `code` (`recent-views-record-recent-view.response.400.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`recent-views-record-recent-view.response.400.error.message`; string, required) — Human-readable error message
  - `details` (`recent-views-record-recent-view.response.400.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`recent-views-record-recent-view.response.400.error.traceId`; string, optional) — Unique ID for log correlation

### 401

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`recent-views-record-recent-view.response.401.error`; object, required)
  - `code` (`recent-views-record-recent-view.response.401.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`recent-views-record-recent-view.response.401.error.message`; string, required) — Human-readable error message
  - `details` (`recent-views-record-recent-view.response.401.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`recent-views-record-recent-view.response.401.error.traceId`; string, optional) — Unique ID for log correlation

### 404

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`recent-views-record-recent-view.response.404.error`; object, required)
  - `code` (`recent-views-record-recent-view.response.404.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`recent-views-record-recent-view.response.404.error.message`; string, required) — Human-readable error message
  - `details` (`recent-views-record-recent-view.response.404.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`recent-views-record-recent-view.response.404.error.traceId`; string, optional) — Unique ID for log correlation

### 500

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`recent-views-record-recent-view.response.500.error`; object, required)
  - `code` (`recent-views-record-recent-view.response.500.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`recent-views-record-recent-view.response.500.error.message`; string, required) — Human-readable error message
  - `details` (`recent-views-record-recent-view.response.500.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`recent-views-record-recent-view.response.500.error.traceId`; string, optional) — Unique ID for log correlation


Source: https://docs.sureshake.com/reference/recent-views-record-recent-view/index.md
