KtrlPlaneAPI Reference
Organizations API
Manage organizations, their settings, billing, and access control within KtrlPlane
Organizations API
Organizations are top-level containers grouping projects, users, and billing contexts.
Base URL:
https://ktrlplane.konnektr.io/api/v1All endpoints require a valid bearer token and appropriate RBAC permissions.
Organization Object
interface Organization {
organization_id: string;
name: string;
created_at: string; // ISO 8601
updated_at: string; // ISO 8601
billing_inherited?: boolean;
stripe_customer_id?: string;
}List Organizations
GET /api/v1/organizationsReturns organizations the current user can access.
Example
curl -H "Authorization: Bearer $JWT_TOKEN" \
https://ktrlplane.konnektr.io/api/v1/organizationsCreate Organization
POST /api/v1/organizationsRequest Body
{
"id": "org-abc123",
"name": "Acme Corp"
}Get Organization
GET /api/v1/organizations/{orgId}Update Organization
PUT /api/v1/organizations/{orgId}Request Body
{
"name": "Acme Corporation"
}Delete Organization
DELETE /api/v1/organizations/{orgId}Irreversible. Projects under the organization must be handled prior to deletion.
RBAC: Role Assignments
GET /api/v1/organizations/{orgId}/rbac
POST /api/v1/organizations/{orgId}/rbac
DELETE /api/v1/organizations/{orgId}/rbac/{assignmentId}Manages organization-level roles (e.g., org_owner, org_admin, org_viewer).
Billing
GET /api/v1/organizations/{orgId}/billing
PUT /api/v1/organizations/{orgId}/billing
POST /api/v1/organizations/{orgId}/billing/customer
POST /api/v1/organizations/{orgId}/billing/subscription
POST /api/v1/organizations/{orgId}/billing/portal
POST /api/v1/organizations/{orgId}/billing/cancelControls billing settings and Stripe integration.
Error Responses
| Status | Description |
|---|---|
| 400 Bad Request | Invalid input |
| 401 Unauthorized | Missing/invalid token |
| 403 Forbidden | Insufficient permission |
| 404 Not Found | Organization does not exist |