---
title: "Share with user"
---

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

`POST /v2/reports/{id}/shares/users`

## Path parameters

- `id` (`report-share-with-user.path.id`; string, required)
  - format `uuid`

## Request body

_Required._

- `recipientUserId` (`report-share-with-user.recipientUserId`; string, required)
  - minLength 1
- `versionId` (`report-share-with-user.versionId`; string, optional)
  - format `uuid`
- `permission` (`report-share-with-user.permission`; string, optional)
  - one of `"read"`, `"comment"`, `"suggest"`; default `"read"`
- `allowDraftShare` (`report-share-with-user.allowDraftShare`; boolean, optional)
  - default `false`
- `message` (`report-share-with-user.message`; string, optional)
  - maxLength 1000
- `allowDownload` (`report-share-with-user.allowDownload`; boolean, optional, nullable)
- `watermark` (`report-share-with-user.watermark`; boolean, optional, nullable)

## Example request

```json
{
  "versionId": "14707576-2549-4848-82ed-f68f8a1b47c7",
  "recipientUserId": "string",
  "permission": "read",
  "allowDraftShare": false,
  "message": "string",
  "allowDownload": true,
  "watermark": true
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.sureshake.com/v2/reports/<id>/shares/users' \
  --header 'Content-Type: application/json' \
  --data '
{
  "versionId": "14707576-2549-4848-82ed-f68f8a1b47c7",
  "recipientUserId": "string",
  "permission": "read",
  "allowDraftShare": false,
  "message": "string",
  "allowDownload": true,
  "watermark": true
}
'
```

### TypeScript

```typescript
const url = 'https://api.sureshake.com/v2/reports/<id>/shares/users';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    versionId: '14707576-2549-4848-82ed-f68f8a1b47c7',
    recipientUserId: 'string',
    permission: 'read',
    allowDraftShare: false,
    message: 'string',
    allowDownload: true,
    watermark: 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/reports/<id>/shares/users"

payload = {
    "versionId": "14707576-2549-4848-82ed-f68f8a1b47c7",
    "recipientUserId": "string",
    "permission": "read",
    "allowDraftShare": False,
    "message": "string",
    "allowDownload": True,
    "watermark": True
}
headers = {"Content-Type": "application/json"}

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

print(response.text)
```

## Responses

### 200

Default Response

#### Example

```json
{
  "data": {
    "shareId": "6a9e781b-5ee2-4314-8665-1c09eed0443a",
    "status": "pending",
    "inviteCode": "string",
    "inviteEmailSent": true,
    "success": true
  },
  "meta": {
    "timestamp": "2019-08-24T14:15:22Z"
  }
}
```

- `data` (`report-share-with-user.response.200.data`; object, required)
  - `shareId` (`report-share-with-user.response.200.data.shareId`; string, optional)
    - format `uuid`
  - `status` (`report-share-with-user.response.200.data.status`; string, optional)
    - one of `"pending"`, `"accepted"`, `"revoked"`, `"expired"`
  - `inviteCode` (`report-share-with-user.response.200.data.inviteCode`; string, optional)
  - `inviteEmailSent` (`report-share-with-user.response.200.data.inviteEmailSent`; boolean, optional)
  - `success` (`report-share-with-user.response.200.data.success`; boolean, optional)
- `meta` (`report-share-with-user.response.200.meta`; object, optional)
  - `timestamp` (`report-share-with-user.response.200.meta.timestamp`; string, required)
    - format `date-time`

### 400

Default Response

#### Example

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

- `error` (`report-share-with-user.response.400.error`; object, required)
  - `code` (`report-share-with-user.response.400.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`report-share-with-user.response.400.error.message`; string, required) — Human-readable error message
  - `details` (`report-share-with-user.response.400.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`report-share-with-user.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` (`report-share-with-user.response.401.error`; object, required)
  - `code` (`report-share-with-user.response.401.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`report-share-with-user.response.401.error.message`; string, required) — Human-readable error message
  - `details` (`report-share-with-user.response.401.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`report-share-with-user.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` (`report-share-with-user.response.403.error`; object, required)
  - `code` (`report-share-with-user.response.403.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`report-share-with-user.response.403.error.message`; string, required) — Human-readable error message
  - `details` (`report-share-with-user.response.403.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`report-share-with-user.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` (`report-share-with-user.response.404.error`; object, required)
  - `code` (`report-share-with-user.response.404.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`report-share-with-user.response.404.error.message`; string, required) — Human-readable error message
  - `details` (`report-share-with-user.response.404.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`report-share-with-user.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` (`report-share-with-user.response.409.error`; object, required)
  - `code` (`report-share-with-user.response.409.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`report-share-with-user.response.409.error.message`; string, required) — Human-readable error message
  - `details` (`report-share-with-user.response.409.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`report-share-with-user.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` (`report-share-with-user.response.422.error`; object, required)
  - `code` (`report-share-with-user.response.422.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`report-share-with-user.response.422.error.message`; string, required) — Human-readable error message
  - `details` (`report-share-with-user.response.422.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`report-share-with-user.response.422.error.traceId`; string, optional) — Unique ID for log correlation

### 500

Default Response

#### Example

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

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


Source: https://docs.sureshake.com/reference/report-share-with-user/index.md
