---
title: "Create Repository Subscription"
method: POST
path: "/v1/graphs/{graph_id}/subscriptions"
tags: ["Subscriptions"]
---

# Create Repository Subscription

`POST /v1/graphs/{graph_id}/subscriptions`

## Request

- Base URL: `https://api.robosystems.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.robosystems.ai/v1/graphs/{graph_id}/subscriptions`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

For shared repositories only (sec, industry, etc.). User graph subscriptions are created automatically during provisioning. Subscribes the caller by default; org owners and admins may subscribe another member of their organization by passing `user_id`. Billing is charged to the organization either way — repository access is per-user, so the subscriber determines who receives access.

## Path parameters

- `graph_id` string, required: Repository name (e.g., 'sec', 'industry')

## Request body

- CreateRepositorySubscriptionRequest: Request to create a repository subscription.
  - `plan_name` string, required: Plan name for the repository subscription
  - `user_id` string, nullable: Subscribe this user instead of yourself. Org owners and admins only, and the target must belong to the same organization. Omit to subscribe yourself. Repository access is per-user while billing is org-level, so the subscriber is what determines who gets access.

## Response `201`

Successful Response

- GraphSubscriptionResponse: Response for graph or repository subscription details.
  - `id` string, required: Subscription ID
  - `resource_type` string, required: Resource type (graph or repository)
  - `resource_id` string, required: Resource identifier
  - `user_id` string, nullable: Organization member the subscription belongs to. Set for repository subscriptions, which are billed to the org but granted per user.
  - `plan_name` string, required: Current plan name
  - `plan_display_name` string, required: Human-readable plan name for UI display
  - `billing_interval` string, required: Billing interval
  - `status` string, required: Subscription status
  - `base_price_cents` integer, required: Base price in cents
  - `current_period_start` string, nullable: Current billing period start
  - `current_period_end` string, nullable: Current billing period end
  - `started_at` string, nullable: Subscription start date
  - `canceled_at` string, nullable: Cancellation date
  - `ends_at` string, nullable: Subscription end date (when access will be revoked, especially relevant for cancelled subscriptions)
  - `created_at` string, required: Creation timestamp
  - `operation_id` string, nullable: Operation ID for tracking async tier changes via SSE

## Other responses

- `400`: Invalid request
- `401`: Authentication required
- `402`: Payment required — add a payment method first
- `403`: Access denied
- `404`: Resource not found
- `409`: Already subscribed to this repository
- `422`: Validation Error
- `429`: Rate limit exceeded
- `500`: Internal server error

---

[API](https://skmtc.dev/robosystems/apis/robosystems-api.md) · [All operations](https://skmtc.dev/robosystems/apis/robosystems-api/llms.txt) · [OpenAPI document](https://skmtc.dev/robosystems/apis/robosystems-api/revisions/e661e2d5ca6a?raw)
