Create Repository Subscription
/v1/graphs/{graph_id}/subscriptionsPart of Subscriptions.
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.
Authentication
Authenticate in any one of these ways — not all of them:
- API key in the
X-API-Keyheader. - Bearer token in the
Authorizationheader.
Path parameters
| Name | Type | Description |
|---|---|---|
graph_idrequired | string | Repository name (e.g., 'sec', 'industry') |
Request body
Required, application/json.
| Field | Type | Description |
|---|---|---|
plan_namerequired | string | Plan name for the repository subscription |
user_idoptional | string | 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. |
Example request
curl -X POST "https://api.robosystems.ai/v1/graphs/{graph_id}/subscriptions" \
-H "X-API-Key: $ROBOSYSTEMS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"plan_name": "sec-starter"
}'Responses
201 Successful Response
| Field | Type | Description |
|---|---|---|
idrequired | string | Subscription ID |
resource_typerequired | string | Resource type (graph or repository) |
resource_idrequired | string | Resource identifier |
user_idoptional | string | Organization member the subscription belongs to. Set for repository subscriptions, which are billed to the org but granted per user. |
plan_namerequired | string | Current plan name |
plan_display_namerequired | string | Human-readable plan name for UI display |
billing_intervalrequired | string | Billing interval |
statusrequired | string | Subscription status |
base_price_centsrequired | integer | Base price in cents |
current_period_startoptional | string | Current billing period start |
current_period_endoptional | string | Current billing period end |
started_atoptional | string | Subscription start date |
canceled_atoptional | string | Cancellation date |
ends_atoptional | string | Subscription end date (when access will be revoked, especially relevant for cancelled subscriptions) |
created_atrequired | string | Creation timestamp |
operation_idoptional | string | Operation ID for tracking async tier changes via SSE |
| Status | Meaning |
|---|---|
| 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 |