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

# Subscriptions

> Manage regulatory source and reference subscriptions

# Subscriptions

Subscriptions control which regulatory sources and references a workspace monitors. Updates and references are filtered based on subscription status.

Subscriptions work at two levels:

* **Source level** — subscribe to an entire regulatory body (e.g. FDA Guidances)
* **Reference level** — override for individual documents (e.g. unsubscribe from a specific guidance even if the source is subscribed, or subscribe to a specific standard even if the source is not)

## Get subscriptions

```bash theme={null}
GET /api/workspaces/:workspaceId/subscriptions
```

Returns all sources with their subscription status, plus any reference-level overrides.

**Response:**

```json theme={null}
{
  "sources": [
    {
      "sourceId": "fda_guidance",
      "sourceTitle": "FDA Guidances",
      "geography": "us",
      "status": "subscribed"
    },
    {
      "sourceId": "mdcg",
      "sourceTitle": "MDCG Guidelines",
      "geography": "eu",
      "status": "unsubscribed"
    }
  ],
  "references": [
    {
      "referenceId": "ref-uuid",
      "referenceTitle": "MDCG 2021-24",
      "referenceExternalId": "mdcg-2021-24",
      "sourceId": "mdcg",
      "status": "subscribed"
    }
  ]
}
```

<Note>
  Sources with no subscription record are returned as `"unsubscribed"`.
</Note>

## Update subscriptions

```bash theme={null}
PATCH /api/workspaces/:workspaceId/subscriptions
```

Update source and/or reference subscriptions. Both fields are optional.

<ParamField body="sources" type="object[]">
  Source-level subscription changes. Each object has `sourceId` and `status` (`"subscribed"` or `"unsubscribed"`).
</ParamField>

<ParamField body="references" type="object[]">
  Reference-level subscription overrides. Each object has `referenceId` and `status` (`"subscribed"` or `"unsubscribed"`).
</ParamField>

```json theme={null}
{
  "sources": [
    { "sourceId": "fda_guidance", "status": "subscribed" },
    { "sourceId": "ansm", "status": "unsubscribed" }
  ],
  "references": [
    { "referenceId": "ref-uuid", "status": "subscribed" }
  ]
}
```

**Response:**

```json theme={null}
{ "updated": 3 }
```

After updating, an impact assessment job is triggered in the background to generate AI impact summaries for newly subscribed updates.

## Generate subscriptions with AI

```bash theme={null}
POST /api/workspaces/:workspaceId/subscriptions/generate
```

AI reads the workspace profile and recommends source and reference subscriptions based on the company's products, markets, and risk classifications.

**Requires** a profile to exist first (create one via the profile endpoints).

Returns immediately — the AI tasks and impact assessment run in the background.

**Response:**

```json theme={null}
{ "success": true }
```
