---
title: "Add follower"
---

> 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 › entities

`POST /v2/entities/{id}/followers`

## Path parameters

- `id` (`entity-add-follower.path.id`; string, required)
  - format `uuid`

## Request body

- `followerId` (`entity-add-follower.followerId`; string, optional)
- `roleIds` (`entity-add-follower.roleIds`; array<string>, optional)
  - format `uuid`
- `notificationsEnabled` (`entity-add-follower.notificationsEnabled`; boolean, optional)
  - default `true`

## Example request

```json
{
  "followerId": "string",
  "roleIds": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ],
  "notificationsEnabled": true
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.sureshake.com/v2/entities/<id>/followers' \
  --header 'Content-Type: application/json' \
  --data '
{
  "followerId": "string",
  "roleIds": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ],
  "notificationsEnabled": true
}
'
```

### TypeScript

```typescript
const url = 'https://api.sureshake.com/v2/entities/<id>/followers';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    followerId: 'string',
    roleIds: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],
    notificationsEnabled: true
  })
};

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/entities/<id>/followers"

payload = {
    "followerId": "string",
    "roleIds": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"],
    "notificationsEnabled": True
}
headers = {"Content-Type": "application/json"}

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

print(response.text)
```

## Responses

### 200

Default Response

#### Example

```json
{
  "success": true,
  "message": "string",
  "followerId": "string",
  "graphEnabled": true
}
```

- `success` (`entity-add-follower.response.200.success`; boolean, required)
- `message` (`entity-add-follower.response.200.message`; string, required)
- `graphEnabled` (`entity-add-follower.response.200.graphEnabled`; boolean, required)
- `followerId` (`entity-add-follower.response.200.followerId`; string, optional)

### 400

Default Response

#### Example

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

- `error` (`entity-add-follower.response.400.error`; object, required)
  - `code` (`entity-add-follower.response.400.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-add-follower.response.400.error.message`; string, required) — Human-readable error message
  - `details` (`entity-add-follower.response.400.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-add-follower.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` (`entity-add-follower.response.401.error`; object, required)
  - `code` (`entity-add-follower.response.401.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-add-follower.response.401.error.message`; string, required) — Human-readable error message
  - `details` (`entity-add-follower.response.401.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-add-follower.response.401.error.traceId`; string, optional) — Unique ID for log correlation

### 403

Default Response

#### Example

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

- `error` (`entity-add-follower.response.403.error`; object, required)
  - `code` (`entity-add-follower.response.403.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-add-follower.response.403.error.message`; string, required) — Human-readable error message
  - `details` (`entity-add-follower.response.403.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-add-follower.response.403.error.traceId`; string, optional) — Unique ID for log correlation

### 404

Default Response

#### Example

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

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

### 409

Default Response

#### Example

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

- `error` (`entity-add-follower.response.409.error`; object, required)
  - `code` (`entity-add-follower.response.409.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-add-follower.response.409.error.message`; string, required) — Human-readable error message
  - `details` (`entity-add-follower.response.409.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-add-follower.response.409.error.traceId`; string, optional) — Unique ID for log correlation

### 422

Default Response

#### Example

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

- `error` (`entity-add-follower.response.422.error`; object, required)
  - `code` (`entity-add-follower.response.422.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-add-follower.response.422.error.message`; string, required) — Human-readable error message
  - `details` (`entity-add-follower.response.422.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-add-follower.response.422.error.traceId`; string, optional) — Unique ID for log correlation

### 429

Default Response

#### Example

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

- `error` (`entity-add-follower.response.429.error`; object, required)
  - `code` (`entity-add-follower.response.429.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-add-follower.response.429.error.message`; string, required) — Human-readable error message
  - `details` (`entity-add-follower.response.429.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-add-follower.response.429.error.traceId`; string, optional) — Unique ID for log correlation

### 500

Default Response

#### Example

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

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

### 503

Default Response

#### Example

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

- `error` (`entity-add-follower.response.503.error`; object, required)
  - `code` (`entity-add-follower.response.503.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-add-follower.response.503.error.message`; string, required) — Human-readable error message
  - `details` (`entity-add-follower.response.503.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-add-follower.response.503.error.traceId`; string, optional) — Unique ID for log correlation


Source: https://docs.sureshake.com/reference/entity-add-follower/index.md
