Cancel Organization Subscription
/v1/billing/subscriptions/{org_id}/subscription/{subscription_id}/cancelPart of Billing.
Cancels a subscription. Default behavior cancels at period end (subscription stays active through the current cycle). Pass immediate=true with confirm=<resource_id> to terminate now and trigger fast-path deprovisioning of the underlying resource. Requires org owner role.
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 |
|---|---|---|
org_idrequired | string | Org Id |
subscription_idrequired | string | Subscription Id |
Request body
Optional, application/json.
| Field | Type | Description |
|---|---|---|
immediateoptional | boolean | If true, cancel immediately and trigger fast-path deprovisioning of the underlying resource (within ~10 minutes). If false (default), cancel at the end of the current billing period. Default: |
confirmoptional | string | Required when immediate=True. Must equal the subscription's resource_id (e.g. graph_id) to confirm intent. |
user_idoptional | string | Organization member whose subscription to cancel. Defaults to the caller; canceling another member's requires org owner or admin. |
Example request
curl -X POST "https://api.robosystems.ai/v1/billing/subscriptions/{org_id}/subscription/{subscription_id}/cancel" \
-H "X-API-Key: $ROBOSYSTEMS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"immediate": false,
"confirm": "string",
"user_id": "string"
}'Responses
200 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 |
| 403 | Access denied |
| 404 | Resource not found |
| 422 | Validation Error |
| 429 | Rate limit exceeded |
| 500 | Internal server error |