Browse the API reference

Create Repository Subscription

post/v1/graphs/{graph_id}/subscriptions

Part 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-Key header.
  • Bearer token in the Authorization header.

Path parameters

NameTypeDescription
graph_idrequiredstringRepository name (e.g., 'sec', 'industry')

Request body

Required, application/json.

FieldTypeDescription
plan_namerequiredstring

Plan name for the repository subscription

user_idoptionalstring

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
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

FieldTypeDescription
idrequiredstring

Subscription ID

resource_typerequiredstring

Resource type (graph or repository)

resource_idrequiredstring

Resource identifier

user_idoptionalstring

Organization member the subscription belongs to. Set for repository subscriptions, which are billed to the org but granted per user.

plan_namerequiredstring

Current plan name

plan_display_namerequiredstring

Human-readable plan name for UI display

billing_intervalrequiredstring

Billing interval

statusrequiredstring

Subscription status

base_price_centsrequiredinteger

Base price in cents

current_period_startoptionalstring

Current billing period start

current_period_endoptionalstring

Current billing period end

started_atoptionalstring

Subscription start date

canceled_atoptionalstring

Cancellation date

ends_atoptionalstring

Subscription end date (when access will be revoked, especially relevant for cancelled subscriptions)

created_atrequiredstring

Creation timestamp

operation_idoptionalstring

Operation ID for tracking async tier changes via SSE

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