# Share a report

`POST /app/assessments/{id}/share`

Creates or extends a link anyone can open, for up to 365 days (0 for no expiry).

Scope: `reports:write`.

## Parameters

- `id` (path, integer, required)

## Request body

- `days` (integer): How long the link works, in days (30 by default, 0 for no expiry).

## Example

```bash
curl -X POST "https://api.fortwatch.ai/app/assessments/42/share" \
  -H "Authorization: Bearer $FORTWATCH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "days": 1
}'
```

## Response 200

The request succeeded.

- `id` (number, required)
- `workspaceId` (number, required)
- `scopeType` (string, required)
- `scopeId` (number | null, required)
- `scopeName` (string, required)
- `status` (string, required)
- `error` (string | null, required)
- `trigger` (string, required)
- `createdByUserId` (number | null, required)
- `shareExpiresAt` (string (date-time) | null, required)
- `shareRevokedAt` (string (date-time) | null, required)
- `generatedAt` (string (date-time) | null, required)
- `createdAt` (string (date-time), required)
- `updatedAt` (string (date-time), required)
- `createdByUser` (object)
  - `firstName` (string, required)
  - `lastName` (string, required)
- `hasNarrative` (boolean, required)
- `shareUrl` (object | null, required)
- `sharePdfUrl` (object | null, required)
- `shareLive` (boolean, required)
- `data` (object | null)
- `narrative` (object | null)

```json
{
  "id": 42,
  "workspaceId": 42,
  "scopeType": "string",
  "scopeId": 42,
  "scopeName": "string",
  "status": "string",
  "error": "string",
  "trigger": "string",
  "createdByUserId": 42,
  "shareExpiresAt": "2026-10-16T12:00:00.000Z",
  "shareRevokedAt": "2026-10-16T12:00:00.000Z",
  "generatedAt": "2026-10-16T12:00:00.000Z",
  "createdAt": "2026-10-16T12:00:00.000Z",
  "updatedAt": "2026-10-16T12:00:00.000Z",
  "createdByUser": {
    "firstName": "string",
    "lastName": "string"
  },
  "hasNarrative": true,
  "shareUrl": {},
  "sharePdfUrl": {},
  "shareLive": true,
  "data": {},
  "narrative": {}
}
```

## Errors

- 400: The request is not valid: a field is missing or has the wrong shape (the message names it).
- 401: No valid credentials: the API key or access token is missing, revoked or expired (INVALID_API_KEY, INVALID_TOKEN).
- 403: Not allowed: the key or token lacks this scope (SCOPE_REQUIRED), the route is dashboard-only (SESSION_REQUIRED), or a plan limit applies.
- 404: Not found in your workspace.
- 429: Too many requests (RATE_LIMITED): wait the seconds Retry-After gives.
