---
title: "Subscribe KG to a package"
method: POST
path: "/api/v0/knowledge-graphs/{kg_id}/subscriptions"
tags: ["Knowledge Graphs"]
---

# Subscribe KG to a package

`POST /api/v0/knowledge-graphs/{kg_id}/subscriptions`

## Path parameters

- `kg_id` string, uuid, required

## Request body

- SubscribeRequest
  - `package_slug` string, required
  - `package_version` string, required

## Response `200`

Successful Response

- SubscriptionResponse
  - `package_slug` string, required
  - `package_version` string, required
  - `enabled_at` string, date-time, required
  - `in_scope` boolean, required — False when the subscription's (slug, version) no longer resolves to a Package in code — e.g., the Package was removed. Surfaces the deprecation-as-not-in-scope behaviour to clients.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/outerport/apis/outerport-api.md) · [All operations](https://skmtc.dev/outerport/apis/outerport-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/outerport/outerport-api/revisions/f565b46daaea/schema)
