platform
Platform Admin
Cross-tenant platform administration: tenants, plans, licenses, custom domains, subscriptions, platform users, and job queues. Requires a platform-admin account, not a tenant membership.
37 endpoints
GET /api/v1/platform/licenses/{licenseId}/installs
Installs seen on this license, with last-seen, version, tamper signals and pending commands.
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
licenseIdrequired | path | string | — |
cursor | query | string | — |
limit | query | integer | 1–100 · default: 25 |
curl example
curl -X GET "https://api.yourdomain.com/api/v1/platform/licenses/f5f084e9-f5f0-75f0-8f08-f5f084e9f5f0/installs" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY"Responses
| Name | Type | Constraints |
|---|---|---|
datarequired | array<object> | — |
nextCursorrequired | string | null | — |
{
"data": [
{
"id": "37386ae0-3738-7738-8386-37386ae03738",
"licenseId": "f5f084e9-f5f0-75f0-8f08-f5f084e9f5f0",
"installId": "2472867d-2472-7472-8728-2472867d2472",
"appVersion": "string",
"lastSeenAt": "2026-03-02T09:00:00.000Z",
"heartbeatCounter": 0,
"signals": [
{
"kind": "silent",
"severity": "info",
"detectedAt": "2026-03-02T09:00:00.000Z",
"detail": "string"
}
],
"firstSeenAt": "2026-03-02T09:00:00.000Z",
"lastWitnessAt": "2026-03-02T09:00:00.000Z",
"updateChannel": "stable",
"updaterLastCheckAt": "2026-03-02T09:00:00.000Z",
"updaterLastResult": "up_to_date",
"updaterLastReason": "none",
"pendingCommands": [
{
"id": "37386ae0-3738-7738-8386-37386ae03738",
"kind": "lock",
"reason": "Requested by guardian.",
"issuedAt": "2026-03-02T09:00:00.000Z"
}
]
}
],
"nextCursor": null
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
POST /api/v1/platform/licenses/{licenseId}/lock
Lock a self-hosted install: issues a signed lock command applied on its next heartbeat.
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
licenseIdrequired | path | string | — |
Request body
| Name | Type | Constraints |
|---|---|---|
reasonrequired | string | 1–500 chars |
Example
{
"reason": "Requested by guardian."
}curl example
curl -X POST "https://api.yourdomain.com/api/v1/platform/licenses/f5f084e9-f5f0-75f0-8f08-f5f084e9f5f0/lock" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"reason": "Requested by guardian."
}'Responses
| Name | Type | Constraints |
|---|---|---|
idrequired | string (uuid) | — |
licenseIdrequired | string (uuid) | — |
kindrequired | enum: "lock" | "unlock" | — |
reasonrequired | string | null | — |
issuedAtrequired | string (date-time) | — |
acknowledgedAtrequired | string (date-time) | null | — |
{
"id": "37386ae0-3738-7738-8386-37386ae03738",
"licenseId": "f5f084e9-f5f0-75f0-8f08-f5f084e9f5f0",
"kind": "lock",
"reason": "Requested by guardian.",
"issuedAt": "2026-03-02T09:00:00.000Z",
"acknowledgedAt": "2026-03-02T09:00:00.000Z"
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
POST /api/v1/platform/licenses/{licenseId}/unlock
Unlock a self-hosted install: issues a signed unlock command.
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
licenseIdrequired | path | string | — |
curl example
curl -X POST "https://api.yourdomain.com/api/v1/platform/licenses/f5f084e9-f5f0-75f0-8f08-f5f084e9f5f0/unlock" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY"Responses
| Name | Type | Constraints |
|---|---|---|
idrequired | string (uuid) | — |
licenseIdrequired | string (uuid) | — |
kindrequired | enum: "lock" | "unlock" | — |
reasonrequired | string | null | — |
issuedAtrequired | string (date-time) | — |
acknowledgedAtrequired | string (date-time) | null | — |
{
"id": "37386ae0-3738-7738-8386-37386ae03738",
"licenseId": "f5f084e9-f5f0-75f0-8f08-f5f084e9f5f0",
"kind": "lock",
"reason": "Requested by guardian.",
"issuedAt": "2026-03-02T09:00:00.000Z",
"acknowledgedAt": "2026-03-02T09:00:00.000Z"
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
POST /api/v1/platform/licenses/{licenseId}/unlock-token
Mint a one-time signed unlock token the customer pastes into their self-hosted admin when the license server is unreachable.
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
licenseIdrequired | path | string | — |
curl example
curl -X POST "https://api.yourdomain.com/api/v1/platform/licenses/f5f084e9-f5f0-75f0-8f08-f5f084e9f5f0/unlock-token" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY"Responses
| Name | Type | Constraints |
|---|---|---|
tokenrequired | string | — |
expiresAtrequired | string (date-time) | — |
{
"token": "string",
"expiresAt": "2026-03-02T09:00:00.000Z"
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
POST /api/v1/platform/licenses/heartbeat
Self-hosted install heartbeat. Returns a signed envelope carrying server time, state, and any pending lock/unlock commands.
Request body
| Name | Type | Constraints |
|---|---|---|
installIdrequired | string (uuid) | — |
jtirequired | string | 1–200 chars |
appVersionrequired | string | 1–50 chars |
counterrequired | integer | 0–9007199254740991 |
clientTimerequired | string (date-time) | — |
maxObservedTimerequired | string (date-time) | null | — |
noncerequired | string | 1–100 chars |
appliedCommandIds | array<string (uuid)> | default: [] |
updater | object | — |
Example
{
"installId": "2472867d-2472-7472-8728-2472867d2472",
"jti": "string",
"appVersion": "string",
"counter": 0,
"clientTime": "2026-03-02T09:00:00.000Z",
"maxObservedTime": "2026-03-02T09:00:00.000Z",
"nonce": "string",
"appliedCommandIds": [
"3a42c45f-3a42-7a42-842c-3a42c45f3a42"
],
"updater": {
"lastCheckAt": "2026-03-02T09:00:00.000Z",
"lastResult": "up_to_date",
"reason": "none",
"channel": "stable"
}
}curl example
curl -X POST "https://api.yourdomain.com/api/v1/platform/licenses/heartbeat" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"installId": "2472867d-2472-7472-8728-2472867d2472",
"jti": "string",
"appVersion": "string",
"counter": 0,
"clientTime": "2026-03-02T09:00:00.000Z",
"maxObservedTime": "2026-03-02T09:00:00.000Z",
"nonce": "string",
"appliedCommandIds": [
"3a42c45f-3a42-7a42-842c-3a42c45f3a42"
],
"updater": {
"lastCheckAt": "2026-03-02T09:00:00.000Z",
"lastResult": "up_to_date",
"reason": "none",
"channel": "stable"
}
}'Responses
| Name | Type | Constraints |
|---|---|---|
enveloperequired | string | — |
{
"envelope": "string"
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
GET /api/v1/platform/licenses/releases/manifest
The signed release manifest for a channel. Verified against the license public key baked into every self-hosted image.
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
channel | query | enum: "stable" | "beta" | default: "stable" |
curl example
curl -X GET "https://api.yourdomain.com/api/v1/platform/licenses/releases/manifest" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY"Responses
| Name | Type | Constraints |
|---|---|---|
manifestrequired | string | — |
payloadrequired | object | — |
{
"manifest": "string",
"payload": {
"channel": "stable",
"version": "string",
"images": {
"api": {
"ref": "string",
"digest": "string"
},
"web": {
"ref": "string",
"digest": "string"
}
},
"minFromVersion": "string",
"migrations": "forward-only",
"releasedAt": "2026-03-02T09:00:00.000Z",
"notes": "Prefers afternoon sessions."
}
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
curl example
curl -X GET "https://api.yourdomain.com/api/v1/platform/plans" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY"Responses
[
{
"id": "37386ae0-3738-7738-8386-37386ae03738",
"code": "string",
"name": "Algebra I",
"priceMinor": 12000,
"currency": "USD",
"billingInterval": "month",
"limits": {
"maxStudents": -9007199254740991,
"maxBranches": -9007199254740991,
"maxVideoCourses": -9007199254740991,
"maxLessonsPerCourse": -9007199254740991,
"notificationQuota": {
"whatsapp": -9007199254740991,
"sms": -9007199254740991,
"email": "ada.lovelace@example.com"
}
},
"features": [
"string"
],
"isActive": true,
"createdAt": "2026-03-02T09:00:00.000Z",
"updatedAt": "2026-03-02T09:00:00.000Z"
}
]Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Request body
| Name | Type | Constraints |
|---|---|---|
coderequired | string | 1–50 chars |
namerequired | string | 1–200 chars |
priceMinorrequired | integer | 0–9007199254740991 |
currencyrequired | string | 3–3 chars |
billingIntervalrequired | enum: "month" | "year" | — |
limitsrequired | object | — |
featuresrequired | array<string> | — |
Example
{
"code": "string",
"name": "Algebra I",
"priceMinor": 12000,
"currency": "USD",
"billingInterval": "month",
"limits": {
"maxStudents": 0,
"maxBranches": 0,
"maxVideoCourses": -1,
"maxLessonsPerCourse": -1,
"notificationQuota": {
"whatsapp": 0,
"sms": 0,
"email": "ada.lovelace@example.com"
}
},
"features": [
"string"
]
}curl example
curl -X POST "https://api.yourdomain.com/api/v1/platform/plans" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"code": "string",
"name": "Algebra I",
"priceMinor": 12000,
"currency": "USD",
"billingInterval": "month",
"limits": {
"maxStudents": 0,
"maxBranches": 0,
"maxVideoCourses": -1,
"maxLessonsPerCourse": -1,
"notificationQuota": {
"whatsapp": 0,
"sms": 0,
"email": "ada.lovelace@example.com"
}
},
"features": [
"string"
]
}'Responses
| Name | Type | Constraints |
|---|---|---|
idrequired | string (uuid) | — |
coderequired | string | — |
namerequired | string | — |
priceMinorrequired | integer | -9007199254740991–9007199254740991 |
currencyrequired | string | 3–3 chars |
billingIntervalrequired | enum: "month" | "year" | — |
limitsrequired | PlanLimits | — |
featuresrequired | array<string> | — |
isActiverequired | boolean | — |
createdAtrequired | string (date-time) | — |
updatedAtrequired | string (date-time) | — |
{
"id": "37386ae0-3738-7738-8386-37386ae03738",
"code": "string",
"name": "Algebra I",
"priceMinor": 12000,
"currency": "USD",
"billingInterval": "month",
"limits": {
"maxStudents": -9007199254740991,
"maxBranches": -9007199254740991,
"maxVideoCourses": -9007199254740991,
"maxLessonsPerCourse": -9007199254740991,
"notificationQuota": {
"whatsapp": -9007199254740991,
"sms": -9007199254740991,
"email": "ada.lovelace@example.com"
}
},
"features": [
"string"
],
"isActive": true,
"createdAt": "2026-03-02T09:00:00.000Z",
"updatedAt": "2026-03-02T09:00:00.000Z"
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
PATCH /api/v1/platform/plans/{id}
Update a plan (use `isActive: false` to deactivate — plans are never deleted).
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
idrequired | path | string | — |
Request body
| Name | Type | Constraints |
|---|---|---|
name | string | 1–200 chars |
priceMinor | integer | 0–9007199254740991 |
currency | string | 3–3 chars |
billingInterval | enum: "month" | "year" | — |
limits | object | — |
features | array<string> | — |
isActive | boolean | — |
Example
{
"name": "Algebra I",
"priceMinor": 12000,
"currency": "USD",
"billingInterval": "month",
"limits": {
"maxStudents": 0,
"maxBranches": 0,
"maxVideoCourses": -1,
"maxLessonsPerCourse": -1,
"notificationQuota": {
"whatsapp": 0,
"sms": 0,
"email": "ada.lovelace@example.com"
}
},
"features": [
"string"
],
"isActive": true
}curl example
curl -X PATCH "https://api.yourdomain.com/api/v1/platform/plans/37386ae0-3738-7738-8386-37386ae03738" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"name": "Algebra I",
"priceMinor": 12000,
"currency": "USD",
"billingInterval": "month",
"limits": {
"maxStudents": 0,
"maxBranches": 0,
"maxVideoCourses": -1,
"maxLessonsPerCourse": -1,
"notificationQuota": {
"whatsapp": 0,
"sms": 0,
"email": "ada.lovelace@example.com"
}
},
"features": [
"string"
],
"isActive": true
}'Responses
| Name | Type | Constraints |
|---|---|---|
idrequired | string (uuid) | — |
coderequired | string | — |
namerequired | string | — |
priceMinorrequired | integer | -9007199254740991–9007199254740991 |
currencyrequired | string | 3–3 chars |
billingIntervalrequired | enum: "month" | "year" | — |
limitsrequired | PlanLimits | — |
featuresrequired | array<string> | — |
isActiverequired | boolean | — |
createdAtrequired | string (date-time) | — |
updatedAtrequired | string (date-time) | — |
{
"id": "37386ae0-3738-7738-8386-37386ae03738",
"code": "string",
"name": "Algebra I",
"priceMinor": 12000,
"currency": "USD",
"billingInterval": "month",
"limits": {
"maxStudents": -9007199254740991,
"maxBranches": -9007199254740991,
"maxVideoCourses": -9007199254740991,
"maxLessonsPerCourse": -9007199254740991,
"notificationQuota": {
"whatsapp": -9007199254740991,
"sms": -9007199254740991,
"email": "ada.lovelace@example.com"
}
},
"features": [
"string"
],
"isActive": true,
"createdAt": "2026-03-02T09:00:00.000Z",
"updatedAt": "2026-03-02T09:00:00.000Z"
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
GET /api/v1/platform/queues
Job counts (waiting/active/failed/delayed) per BullMQ queue (docs/ARCHITECTURE.md §4.7).
curl example
curl -X GET "https://api.yourdomain.com/api/v1/platform/queues" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY"Responses
| Name | Type | Constraints |
|---|---|---|
maintenancerequired | QueueJobCounts | — |
notificationsrequired | QueueJobCounts | — |
webhooksrequired | QueueJobCounts | — |
reportsrequired | QueueJobCounts | — |
digestrequired | QueueJobCounts | — |
billingrequired | QueueJobCounts | — |
academicsrequired | QueueJobCounts | — |
{
"maintenance": {
"waiting": -9007199254740991,
"active": -9007199254740991,
"failed": -9007199254740991,
"delayed": -9007199254740991
},
"notifications": {
"waiting": -9007199254740991,
"active": -9007199254740991,
"failed": -9007199254740991,
"delayed": -9007199254740991
},
"webhooks": {
"waiting": -9007199254740991,
"active": -9007199254740991,
"failed": -9007199254740991,
"delayed": -9007199254740991
},
"reports": {
"waiting": -9007199254740991,
"active": -9007199254740991,
"failed": -9007199254740991,
"delayed": -9007199254740991
},
"digest": {
"waiting": -9007199254740991,
"active": -9007199254740991,
"failed": -9007199254740991,
"delayed": -9007199254740991
},
"billing": {
"waiting": -9007199254740991,
"active": -9007199254740991,
"failed": -9007199254740991,
"delayed": -9007199254740991
},
"academics": {
"waiting": -9007199254740991,
"active": -9007199254740991,
"failed": -9007199254740991,
"delayed": -9007199254740991
}
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
GET /api/v1/platform/releases
Published releases, newest first.
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
cursor | query | string | — |
limit | query | integer | 1–100 · default: 25 |
channel | query | enum: "stable" | "beta" | — |
curl example
curl -X GET "https://api.yourdomain.com/api/v1/platform/releases" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY"Responses
| Name | Type | Constraints |
|---|---|---|
datarequired | array<object> | — |
nextCursorrequired | string | null | — |
{
"data": [
{
"id": "37386ae0-3738-7738-8386-37386ae03738",
"channel": "stable",
"version": "string",
"images": {
"api": {
"ref": "string",
"digest": "string"
},
"web": {
"ref": "string",
"digest": "string"
}
},
"minFromVersion": "string",
"notes": "Prefers afternoon sessions.",
"releasedAt": "2026-03-02T09:00:00.000Z",
"promotedAt": "2026-03-02T09:00:00.000Z"
}
],
"nextCursor": null
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
POST /api/v1/platform/releases
Publish a built release (images pinned by digest). Defaults to the beta channel — promotion to stable is a separate, manual step.
Request body
| Name | Type | Constraints |
|---|---|---|
channel | enum: "stable" | "beta" | default: "beta" |
versionrequired | string | — |
imagesrequired | object | — |
minFromVersion | string | — |
notes | string | null | 1–5000 chars · default: null |
releasedAt | string (date-time) | — |
Example
{
"channel": "beta",
"version": "string",
"images": {
"api": {
"ref": "string",
"digest": "string"
},
"web": {
"ref": "string",
"digest": "string"
}
},
"minFromVersion": "string",
"notes": null,
"releasedAt": "2026-03-02T09:00:00.000Z"
}curl example
curl -X POST "https://api.yourdomain.com/api/v1/platform/releases" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"channel": "beta",
"version": "string",
"images": {
"api": {
"ref": "string",
"digest": "string"
},
"web": {
"ref": "string",
"digest": "string"
}
},
"minFromVersion": "string",
"notes": null,
"releasedAt": "2026-03-02T09:00:00.000Z"
}'Responses
| Name | Type | Constraints |
|---|---|---|
idrequired | string (uuid) | — |
channelrequired | enum: "stable" | "beta" | — |
versionrequired | string | — |
imagesrequired | object | — |
minFromVersionrequired | string | — |
notesrequired | string | null | — |
releasedAtrequired | string (date-time) | — |
promotedAtrequired | string (date-time) | null | — |
{
"id": "37386ae0-3738-7738-8386-37386ae03738",
"channel": "stable",
"version": "string",
"images": {
"api": {
"ref": "string",
"digest": "string"
},
"web": {
"ref": "string",
"digest": "string"
}
},
"minFromVersion": "string",
"notes": "Prefers afternoon sessions.",
"releasedAt": "2026-03-02T09:00:00.000Z",
"promotedAt": "2026-03-02T09:00:00.000Z"
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
POST /api/v1/platform/releases/{releaseId}/promote
Promote a beta release to the stable channel. Platform owner only — this is what reaches every unattended install.
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
releaseIdrequired | path | string | — |
curl example
curl -X POST "https://api.yourdomain.com/api/v1/platform/releases/97e23b63-97e2-77e2-8e23-97e23b6397e2/promote" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY"Responses
| Name | Type | Constraints |
|---|---|---|
idrequired | string (uuid) | — |
channelrequired | enum: "stable" | "beta" | — |
versionrequired | string | — |
imagesrequired | object | — |
minFromVersionrequired | string | — |
notesrequired | string | null | — |
releasedAtrequired | string (date-time) | — |
promotedAtrequired | string (date-time) | null | — |
{
"id": "37386ae0-3738-7738-8386-37386ae03738",
"channel": "stable",
"version": "string",
"images": {
"api": {
"ref": "string",
"digest": "string"
},
"web": {
"ref": "string",
"digest": "string"
}
},
"minFromVersion": "string",
"notes": "Prefers afternoon sessions.",
"releasedAt": "2026-03-02T09:00:00.000Z",
"promotedAt": "2026-03-02T09:00:00.000Z"
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
GET /api/v1/platform/settings
Platform-wide settings: the global auto-lock toggle and its delay.
curl example
curl -X GET "https://api.yourdomain.com/api/v1/platform/settings" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY"Responses
| Name | Type | Constraints |
|---|---|---|
autoLockEnabledrequired | boolean | — |
autoLockAfterDaysrequired | integer | 0–9007199254740991 |
createdAtrequired | string (date-time) | — |
updatedAtrequired | string (date-time) | — |
{
"autoLockEnabled": true,
"autoLockAfterDays": 0,
"createdAt": "2026-03-02T09:00:00.000Z",
"updatedAt": "2026-03-02T09:00:00.000Z"
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
PATCH /api/v1/platform/settings
Update the global auto-lock policy. With auto-lock off (the default) an expired tenant is never locked automatically.
Request body
| Name | Type | Constraints |
|---|---|---|
autoLockEnabled | boolean | — |
autoLockAfterDays | integer | 0–365 |
Example
{
"autoLockEnabled": true,
"autoLockAfterDays": 0
}curl example
curl -X PATCH "https://api.yourdomain.com/api/v1/platform/settings" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"autoLockEnabled": true,
"autoLockAfterDays": 0
}'Responses
| Name | Type | Constraints |
|---|---|---|
autoLockEnabledrequired | boolean | — |
autoLockAfterDaysrequired | integer | 0–9007199254740991 |
createdAtrequired | string (date-time) | — |
updatedAtrequired | string (date-time) | — |
{
"autoLockEnabled": true,
"autoLockAfterDays": 0,
"createdAt": "2026-03-02T09:00:00.000Z",
"updatedAt": "2026-03-02T09:00:00.000Z"
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
GET /api/v1/platform/tenants
List tenants (cursor-paginated, optional name search and status filter).
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
cursor | query | string | — |
limit | query | integer | 1–100 · default: 25 |
search | query | string | 1–200 chars |
status | query | enum: "active" | "suspended" | "archived" | — |
curl example
curl -X GET "https://api.yourdomain.com/api/v1/platform/tenants" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY"Responses
| Name | Type | Constraints |
|---|---|---|
datarequired | array<object> | — |
nextCursorrequired | string | null | — |
{
"data": [
{
"id": "37386ae0-3738-7738-8386-37386ae03738",
"slug": "string",
"name": "Algebra I",
"status": "active",
"defaultLocale": "ar",
"timezone": "string",
"currency": "USD",
"deploymentMode": "cloud",
"autoLockOverride": "inherit",
"lockedAt": "2026-03-02T09:00:00.000Z",
"lockedReason": "string",
"lockedByPlatformAdminId": "f0abde01-f0ab-70ab-8abd-f0abde01f0ab",
"createdBy": "0b14e5a6-0b14-7b14-814e-0b14e5a60b14",
"createdAt": "2026-03-02T09:00:00.000Z",
"updatedAt": "2026-03-02T09:00:00.000Z",
"subscriptionStatus": "trialing"
}
],
"nextCursor": null
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
POST /api/v1/platform/tenants
Create a tenant: seeds its default branch/roles, primary subdomain, trial subscription, and emails the owner an invitation.
Request body
| Name | Type | Constraints |
|---|---|---|
slugrequired | string | 3–40 chars |
namerequired | string | 1–200 chars |
defaultLocalerequired | enum: "ar" | "en" | "he" | — |
timezone | string | 1–100 chars |
currency | string | 3–3 chars |
deploymentMode | enum: "cloud" | "self_hosted" | — |
planrequired | string | 1–50 chars |
trialDaysrequired | integer | 0–365 |
ownerEmailrequired | string (email) | — |
Example
{
"slug": "string",
"name": "Algebra I",
"defaultLocale": "ar",
"timezone": "string",
"currency": "USD",
"deploymentMode": "cloud",
"plan": "string",
"trialDays": 0,
"ownerEmail": "ada.lovelace@example.com"
}curl example
curl -X POST "https://api.yourdomain.com/api/v1/platform/tenants" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"slug": "string",
"name": "Algebra I",
"defaultLocale": "ar",
"timezone": "string",
"currency": "USD",
"deploymentMode": "cloud",
"plan": "string",
"trialDays": 0,
"ownerEmail": "ada.lovelace@example.com"
}'Responses
| Name | Type | Constraints |
|---|---|---|
tenantrequired | object | — |
domainrequired | string | — |
invitationIdrequired | string (uuid) | — |
{
"tenant": {
"id": "37386ae0-3738-7738-8386-37386ae03738",
"slug": "string",
"name": "Algebra I",
"status": "active",
"defaultLocale": "ar",
"timezone": "string",
"currency": "USD",
"deploymentMode": "cloud",
"autoLockOverride": "inherit",
"lockedAt": "2026-03-02T09:00:00.000Z",
"lockedReason": "string",
"lockedByPlatformAdminId": "f0abde01-f0ab-70ab-8abd-f0abde01f0ab",
"createdBy": "0b14e5a6-0b14-7b14-814e-0b14e5a60b14",
"createdAt": "2026-03-02T09:00:00.000Z",
"updatedAt": "2026-03-02T09:00:00.000Z"
},
"domain": "string",
"invitationId": "00637243-0063-7063-8637-006372430063"
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
GET /api/v1/platform/tenants/{id}
Tenant detail: subscription, domains, member/branch counts.
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
idrequired | path | string | — |
curl example
curl -X GET "https://api.yourdomain.com/api/v1/platform/tenants/37386ae0-3738-7738-8386-37386ae03738" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY"Responses
| Name | Type | Constraints |
|---|---|---|
tenantrequired | object | — |
subscriptionrequired | object | null | — |
domainsrequired | array<object> | — |
countsrequired | object | — |
{
"tenant": {
"id": "37386ae0-3738-7738-8386-37386ae03738",
"slug": "string",
"name": "Algebra I",
"status": "active",
"defaultLocale": "ar",
"timezone": "string",
"currency": "USD",
"deploymentMode": "cloud",
"autoLockOverride": "inherit",
"lockedAt": "2026-03-02T09:00:00.000Z",
"lockedReason": "string",
"lockedByPlatformAdminId": "f0abde01-f0ab-70ab-8abd-f0abde01f0ab",
"createdBy": "0b14e5a6-0b14-7b14-814e-0b14e5a60b14",
"createdAt": "2026-03-02T09:00:00.000Z",
"updatedAt": "2026-03-02T09:00:00.000Z"
},
"subscription": {
"id": "37386ae0-3738-7738-8386-37386ae03738",
"tenantId": "4332af8b-4332-7332-832a-4332af8b4332",
"planId": "744bf63f-744b-744b-84bf-744bf63f744b",
"status": "trialing",
"currentPeriodStart": "2026-03-02T09:00:00.000Z",
"currentPeriodEnd": "2026-03-02T09:00:00.000Z",
"cancelledAt": "2026-03-02T09:00:00.000Z",
"createdAt": "2026-03-02T09:00:00.000Z",
"updatedAt": "2026-03-02T09:00:00.000Z"
},
"domains": [
{
"id": "37386ae0-3738-7738-8386-37386ae03738",
"tenantId": "4332af8b-4332-7332-832a-4332af8b4332",
"domain": "string",
"kind": "subdomain",
"verificationToken": "string",
"verifiedAt": "2026-03-02T09:00:00.000Z",
"isPrimary": true,
"createdAt": "2026-03-02T09:00:00.000Z",
"updatedAt": "2026-03-02T09:00:00.000Z"
}
],
"counts": {
"members": -9007199254740991,
"branches": -9007199254740991
}
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
PATCH /api/v1/platform/tenants/{id}
Update a tenant’s name, locale, timezone, currency, or per-tenant auto-lock override.
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
idrequired | path | string | — |
Request body
| Name | Type | Constraints |
|---|---|---|
name | string | 1–200 chars |
defaultLocale | enum: "ar" | "en" | "he" | — |
timezone | string | 1–100 chars |
currency | string | 3–3 chars |
autoLockOverride | enum: "inherit" | "on" | "off" | — |
Example
{
"name": "Algebra I",
"defaultLocale": "ar",
"timezone": "string",
"currency": "USD",
"autoLockOverride": "inherit"
}curl example
curl -X PATCH "https://api.yourdomain.com/api/v1/platform/tenants/37386ae0-3738-7738-8386-37386ae03738" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"name": "Algebra I",
"defaultLocale": "ar",
"timezone": "string",
"currency": "USD",
"autoLockOverride": "inherit"
}'Responses
| Name | Type | Constraints |
|---|---|---|
idrequired | string (uuid) | — |
slugrequired | string | — |
namerequired | string | — |
statusrequired | enum: "active" | "suspended" | "archived" | — |
defaultLocalerequired | enum: "ar" | "en" | "he" | — |
timezonerequired | string | — |
currencyrequired | string | 3–3 chars |
deploymentModerequired | enum: "cloud" | "self_hosted" | — |
autoLockOverriderequired | enum: "inherit" | "on" | "off" | — |
lockedAtrequired | string (date-time) | null | — |
lockedReasonrequired | string | null | — |
lockedByPlatformAdminIdrequired | string (uuid) | null | — |
createdByrequired | string (uuid) | null | — |
createdAtrequired | string (date-time) | — |
updatedAtrequired | string (date-time) | — |
{
"id": "37386ae0-3738-7738-8386-37386ae03738",
"slug": "string",
"name": "Algebra I",
"status": "active",
"defaultLocale": "ar",
"timezone": "string",
"currency": "USD",
"deploymentMode": "cloud",
"autoLockOverride": "inherit",
"lockedAt": "2026-03-02T09:00:00.000Z",
"lockedReason": "string",
"lockedByPlatformAdminId": "f0abde01-f0ab-70ab-8abd-f0abde01f0ab",
"createdBy": "0b14e5a6-0b14-7b14-814e-0b14e5a60b14",
"createdAt": "2026-03-02T09:00:00.000Z",
"updatedAt": "2026-03-02T09:00:00.000Z"
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
POST /api/v1/platform/tenants/{id}/archive
Archive a tenant (data is never deleted).
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
idrequired | path | string | — |
curl example
curl -X POST "https://api.yourdomain.com/api/v1/platform/tenants/37386ae0-3738-7738-8386-37386ae03738/archive" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY"Responses
| Name | Type | Constraints |
|---|---|---|
idrequired | string (uuid) | — |
slugrequired | string | — |
namerequired | string | — |
statusrequired | enum: "active" | "suspended" | "archived" | — |
defaultLocalerequired | enum: "ar" | "en" | "he" | — |
timezonerequired | string | — |
currencyrequired | string | 3–3 chars |
deploymentModerequired | enum: "cloud" | "self_hosted" | — |
autoLockOverriderequired | enum: "inherit" | "on" | "off" | — |
lockedAtrequired | string (date-time) | null | — |
lockedReasonrequired | string | null | — |
lockedByPlatformAdminIdrequired | string (uuid) | null | — |
createdByrequired | string (uuid) | null | — |
createdAtrequired | string (date-time) | — |
updatedAtrequired | string (date-time) | — |
{
"id": "37386ae0-3738-7738-8386-37386ae03738",
"slug": "string",
"name": "Algebra I",
"status": "active",
"defaultLocale": "ar",
"timezone": "string",
"currency": "USD",
"deploymentMode": "cloud",
"autoLockOverride": "inherit",
"lockedAt": "2026-03-02T09:00:00.000Z",
"lockedReason": "string",
"lockedByPlatformAdminId": "f0abde01-f0ab-70ab-8abd-f0abde01f0ab",
"createdBy": "0b14e5a6-0b14-7b14-814e-0b14e5a60b14",
"createdAt": "2026-03-02T09:00:00.000Z",
"updatedAt": "2026-03-02T09:00:00.000Z"
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
POST /api/v1/platform/tenants/{id}/impersonate
Issue a 10-minute access token for the tenant’s owner membership (audited).
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
idrequired | path | string | — |
Request body
| Name | Type | Constraints |
|---|---|---|
reasonrequired | string | 1–500 chars |
Example
{
"reason": "Requested by guardian."
}curl example
curl -X POST "https://api.yourdomain.com/api/v1/platform/tenants/37386ae0-3738-7738-8386-37386ae03738/impersonate" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"reason": "Requested by guardian."
}'Responses
| Name | Type | Constraints |
|---|---|---|
accessTokenrequired | string | — |
expiresInSecrequired | integer | -9007199254740991–9007199254740991 |
{
"accessToken": "string",
"expiresInSec": -9007199254740991
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
POST /api/v1/platform/tenants/{id}/lock
Lock a tenant explicitly: its subscription becomes suspended and every member request gets 402 (except the allowlist). Expiry alone never does this.
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
idrequired | path | string | — |
Request body
| Name | Type | Constraints |
|---|---|---|
reasonrequired | string | 1–500 chars |
Example
{
"reason": "Requested by guardian."
}curl example
curl -X POST "https://api.yourdomain.com/api/v1/platform/tenants/37386ae0-3738-7738-8386-37386ae03738/lock" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"reason": "Requested by guardian."
}'Responses
| Name | Type | Constraints |
|---|---|---|
idrequired | string (uuid) | — |
tenantIdrequired | string (uuid) | — |
planIdrequired | string (uuid) | — |
statusrequired | enum: "trialing" | "active" | "expired" | "suspended" | "cancelled" | — |
currentPeriodStartrequired | string (date-time) | — |
currentPeriodEndrequired | string (date-time) | — |
cancelledAtrequired | string (date-time) | null | — |
createdAtrequired | string (date-time) | — |
updatedAtrequired | string (date-time) | — |
{
"id": "37386ae0-3738-7738-8386-37386ae03738",
"tenantId": "4332af8b-4332-7332-832a-4332af8b4332",
"planId": "744bf63f-744b-744b-84bf-744bf63f744b",
"status": "trialing",
"currentPeriodStart": "2026-03-02T09:00:00.000Z",
"currentPeriodEnd": "2026-03-02T09:00:00.000Z",
"cancelledAt": "2026-03-02T09:00:00.000Z",
"createdAt": "2026-03-02T09:00:00.000Z",
"updatedAt": "2026-03-02T09:00:00.000Z"
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
POST /api/v1/platform/tenants/{id}/reactivate
Reactivate a suspended tenant.
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
idrequired | path | string | — |
curl example
curl -X POST "https://api.yourdomain.com/api/v1/platform/tenants/37386ae0-3738-7738-8386-37386ae03738/reactivate" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY"Responses
| Name | Type | Constraints |
|---|---|---|
idrequired | string (uuid) | — |
slugrequired | string | — |
namerequired | string | — |
statusrequired | enum: "active" | "suspended" | "archived" | — |
defaultLocalerequired | enum: "ar" | "en" | "he" | — |
timezonerequired | string | — |
currencyrequired | string | 3–3 chars |
deploymentModerequired | enum: "cloud" | "self_hosted" | — |
autoLockOverriderequired | enum: "inherit" | "on" | "off" | — |
lockedAtrequired | string (date-time) | null | — |
lockedReasonrequired | string | null | — |
lockedByPlatformAdminIdrequired | string (uuid) | null | — |
createdByrequired | string (uuid) | null | — |
createdAtrequired | string (date-time) | — |
updatedAtrequired | string (date-time) | — |
{
"id": "37386ae0-3738-7738-8386-37386ae03738",
"slug": "string",
"name": "Algebra I",
"status": "active",
"defaultLocale": "ar",
"timezone": "string",
"currency": "USD",
"deploymentMode": "cloud",
"autoLockOverride": "inherit",
"lockedAt": "2026-03-02T09:00:00.000Z",
"lockedReason": "string",
"lockedByPlatformAdminId": "f0abde01-f0ab-70ab-8abd-f0abde01f0ab",
"createdBy": "0b14e5a6-0b14-7b14-814e-0b14e5a60b14",
"createdAt": "2026-03-02T09:00:00.000Z",
"updatedAt": "2026-03-02T09:00:00.000Z"
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
POST /api/v1/platform/tenants/{id}/suspend
Suspend a tenant. Every member request then gets 402 (except the allowlist).
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
idrequired | path | string | — |
curl example
curl -X POST "https://api.yourdomain.com/api/v1/platform/tenants/37386ae0-3738-7738-8386-37386ae03738/suspend" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY"Responses
| Name | Type | Constraints |
|---|---|---|
idrequired | string (uuid) | — |
slugrequired | string | — |
namerequired | string | — |
statusrequired | enum: "active" | "suspended" | "archived" | — |
defaultLocalerequired | enum: "ar" | "en" | "he" | — |
timezonerequired | string | — |
currencyrequired | string | 3–3 chars |
deploymentModerequired | enum: "cloud" | "self_hosted" | — |
autoLockOverriderequired | enum: "inherit" | "on" | "off" | — |
lockedAtrequired | string (date-time) | null | — |
lockedReasonrequired | string | null | — |
lockedByPlatformAdminIdrequired | string (uuid) | null | — |
createdByrequired | string (uuid) | null | — |
createdAtrequired | string (date-time) | — |
updatedAtrequired | string (date-time) | — |
{
"id": "37386ae0-3738-7738-8386-37386ae03738",
"slug": "string",
"name": "Algebra I",
"status": "active",
"defaultLocale": "ar",
"timezone": "string",
"currency": "USD",
"deploymentMode": "cloud",
"autoLockOverride": "inherit",
"lockedAt": "2026-03-02T09:00:00.000Z",
"lockedReason": "string",
"lockedByPlatformAdminId": "f0abde01-f0ab-70ab-8abd-f0abde01f0ab",
"createdBy": "0b14e5a6-0b14-7b14-814e-0b14e5a60b14",
"createdAt": "2026-03-02T09:00:00.000Z",
"updatedAt": "2026-03-02T09:00:00.000Z"
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
POST /api/v1/platform/tenants/{id}/unlock
Unlock a tenant: back to active, or expired if the paid period has run out.
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
idrequired | path | string | — |
curl example
curl -X POST "https://api.yourdomain.com/api/v1/platform/tenants/37386ae0-3738-7738-8386-37386ae03738/unlock" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY"Responses
| Name | Type | Constraints |
|---|---|---|
idrequired | string (uuid) | — |
tenantIdrequired | string (uuid) | — |
planIdrequired | string (uuid) | — |
statusrequired | enum: "trialing" | "active" | "expired" | "suspended" | "cancelled" | — |
currentPeriodStartrequired | string (date-time) | — |
currentPeriodEndrequired | string (date-time) | — |
cancelledAtrequired | string (date-time) | null | — |
createdAtrequired | string (date-time) | — |
updatedAtrequired | string (date-time) | — |
{
"id": "37386ae0-3738-7738-8386-37386ae03738",
"tenantId": "4332af8b-4332-7332-832a-4332af8b4332",
"planId": "744bf63f-744b-744b-84bf-744bf63f744b",
"status": "trialing",
"currentPeriodStart": "2026-03-02T09:00:00.000Z",
"currentPeriodEnd": "2026-03-02T09:00:00.000Z",
"cancelledAt": "2026-03-02T09:00:00.000Z",
"createdAt": "2026-03-02T09:00:00.000Z",
"updatedAt": "2026-03-02T09:00:00.000Z"
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
POST /api/v1/platform/tenants/{tenantId}/domains
Add a custom domain (CNAME). Returns a verification token to publish as a DNS TXT record.
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
tenantIdrequired | path | string | — |
Request body
| Name | Type | Constraints |
|---|---|---|
domainrequired | string | 3–253 chars |
Example
{
"domain": "string"
}curl example
curl -X POST "https://api.yourdomain.com/api/v1/platform/tenants/4332af8b-4332-7332-832a-4332af8b4332/domains" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"domain": "string"
}'Responses
| Name | Type | Constraints |
|---|---|---|
idrequired | string (uuid) | — |
tenantIdrequired | string (uuid) | — |
domainrequired | string | — |
kindrequired | enum: "subdomain" | "custom" | — |
verificationTokenrequired | string | — |
verifiedAtrequired | string (date-time) | null | — |
isPrimaryrequired | boolean | — |
createdAtrequired | string (date-time) | — |
updatedAtrequired | string (date-time) | — |
{
"id": "37386ae0-3738-7738-8386-37386ae03738",
"tenantId": "4332af8b-4332-7332-832a-4332af8b4332",
"domain": "string",
"kind": "subdomain",
"verificationToken": "string",
"verifiedAt": "2026-03-02T09:00:00.000Z",
"isPrimary": true,
"createdAt": "2026-03-02T09:00:00.000Z",
"updatedAt": "2026-03-02T09:00:00.000Z"
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
DELETE /api/v1/platform/tenants/{tenantId}/domains/{domainId}
Remove a custom domain (the primary domain cannot be removed).
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
tenantIdrequired | path | string | — |
domainIdrequired | path | string | — |
curl example
curl -X DELETE "https://api.yourdomain.com/api/v1/platform/tenants/4332af8b-4332-7332-832a-4332af8b4332/domains/f5472324-f547-7547-8472-f5472324f547" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY"Responses
| Name | Type | Constraints |
|---|---|---|
okrequired | enum: true | — |
{
"ok": true
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
POST /api/v1/platform/tenants/{tenantId}/domains/{domainId}/verify
Verify a custom domain by DNS TXT lookup at `_ims-verify.<domain>`.
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
tenantIdrequired | path | string | — |
domainIdrequired | path | string | — |
curl example
curl -X POST "https://api.yourdomain.com/api/v1/platform/tenants/4332af8b-4332-7332-832a-4332af8b4332/domains/f5472324-f547-7547-8472-f5472324f547/verify" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY"Responses
| Name | Type | Constraints |
|---|---|---|
idrequired | string (uuid) | — |
tenantIdrequired | string (uuid) | — |
domainrequired | string | — |
kindrequired | enum: "subdomain" | "custom" | — |
verificationTokenrequired | string | — |
verifiedAtrequired | string (date-time) | null | — |
isPrimaryrequired | boolean | — |
createdAtrequired | string (date-time) | — |
updatedAtrequired | string (date-time) | — |
{
"id": "37386ae0-3738-7738-8386-37386ae03738",
"tenantId": "4332af8b-4332-7332-832a-4332af8b4332",
"domain": "string",
"kind": "subdomain",
"verificationToken": "string",
"verifiedAt": "2026-03-02T09:00:00.000Z",
"isPrimary": true,
"createdAt": "2026-03-02T09:00:00.000Z",
"updatedAt": "2026-03-02T09:00:00.000Z"
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
GET /api/v1/platform/tenants/{tenantId}/licenses
List every license issued to this tenant.
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
tenantIdrequired | path | string | — |
curl example
curl -X GET "https://api.yourdomain.com/api/v1/platform/tenants/4332af8b-4332-7332-832a-4332af8b4332/licenses" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY"Responses
[
{
"id": "37386ae0-3738-7738-8386-37386ae03738",
"tenantId": "4332af8b-4332-7332-832a-4332af8b4332",
"jti": "string",
"issuedAt": "2026-03-02T09:00:00.000Z",
"expiresAt": "2026-03-02T09:00:00.000Z",
"lastValidatedAt": "2026-03-02T09:00:00.000Z",
"status": "valid",
"metadata": {},
"createdAt": "2026-03-02T09:00:00.000Z",
"updatedAt": "2026-03-02T09:00:00.000Z"
}
]Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
POST /api/v1/platform/tenants/{tenantId}/licenses
Issue a signed license for this tenant. The key is returned exactly once.
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
tenantIdrequired | path | string | — |
Request body
| Name | Type | Constraints |
|---|---|---|
ttlDays | integer | 0–3650 · default: 365 |
Example
{
"ttlDays": 365
}curl example
curl -X POST "https://api.yourdomain.com/api/v1/platform/tenants/4332af8b-4332-7332-832a-4332af8b4332/licenses" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"ttlDays": 365
}'Responses
| Name | Type | Constraints |
|---|---|---|
licenserequired | object | — |
keyrequired | string | — |
{
"license": {
"id": "37386ae0-3738-7738-8386-37386ae03738",
"tenantId": "4332af8b-4332-7332-832a-4332af8b4332",
"jti": "string",
"issuedAt": "2026-03-02T09:00:00.000Z",
"expiresAt": "2026-03-02T09:00:00.000Z",
"lastValidatedAt": "2026-03-02T09:00:00.000Z",
"status": "valid",
"metadata": {},
"createdAt": "2026-03-02T09:00:00.000Z",
"updatedAt": "2026-03-02T09:00:00.000Z"
},
"key": "string"
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
POST /api/v1/platform/tenants/{tenantId}/licenses/{licenseId}/revoke
Revoke a license (key compromise / re-issue). Its heartbeats then answer 404, identically to an unknown license.
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
tenantIdrequired | path | string | — |
licenseIdrequired | path | string | — |
curl example
curl -X POST "https://api.yourdomain.com/api/v1/platform/tenants/4332af8b-4332-7332-832a-4332af8b4332/licenses/f5f084e9-f5f0-75f0-8f08-f5f084e9f5f0/revoke" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY"Responses
| Name | Type | Constraints |
|---|---|---|
idrequired | string (uuid) | — |
tenantIdrequired | string (uuid) | — |
jtirequired | string | — |
issuedAtrequired | string (date-time) | — |
expiresAtrequired | string (date-time) | — |
lastValidatedAtrequired | string (date-time) | null | — |
statusrequired | enum: "valid" | "expired" | "locked" | "revoked" | — |
metadatarequired | object | null | — |
createdAtrequired | string (date-time) | — |
updatedAtrequired | string (date-time) | — |
{
"id": "37386ae0-3738-7738-8386-37386ae03738",
"tenantId": "4332af8b-4332-7332-832a-4332af8b4332",
"jti": "string",
"issuedAt": "2026-03-02T09:00:00.000Z",
"expiresAt": "2026-03-02T09:00:00.000Z",
"lastValidatedAt": "2026-03-02T09:00:00.000Z",
"status": "valid",
"metadata": {},
"createdAt": "2026-03-02T09:00:00.000Z",
"updatedAt": "2026-03-02T09:00:00.000Z"
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
POST /api/v1/platform/tenants/{tenantId}/subscription
Set a tenant’s plan and/or billing period.
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
tenantIdrequired | path | string | — |
Request body
| Name | Type | Constraints |
|---|---|---|
planId | string (uuid) | — |
currentPeriodStart | string (date-time) | — |
currentPeriodEnd | string (date-time) | — |
Example
{
"planId": "744bf63f-744b-744b-84bf-744bf63f744b",
"currentPeriodStart": "2026-03-02T09:00:00.000Z",
"currentPeriodEnd": "2026-03-02T09:00:00.000Z"
}curl example
curl -X POST "https://api.yourdomain.com/api/v1/platform/tenants/4332af8b-4332-7332-832a-4332af8b4332/subscription" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"planId": "744bf63f-744b-744b-84bf-744bf63f744b",
"currentPeriodStart": "2026-03-02T09:00:00.000Z",
"currentPeriodEnd": "2026-03-02T09:00:00.000Z"
}'Responses
| Name | Type | Constraints |
|---|---|---|
idrequired | string (uuid) | — |
tenantIdrequired | string (uuid) | — |
planIdrequired | string (uuid) | — |
statusrequired | enum: "trialing" | "active" | "expired" | "suspended" | "cancelled" | — |
currentPeriodStartrequired | string (date-time) | — |
currentPeriodEndrequired | string (date-time) | — |
cancelledAtrequired | string (date-time) | null | — |
createdAtrequired | string (date-time) | — |
updatedAtrequired | string (date-time) | — |
{
"id": "37386ae0-3738-7738-8386-37386ae03738",
"tenantId": "4332af8b-4332-7332-832a-4332af8b4332",
"planId": "744bf63f-744b-744b-84bf-744bf63f744b",
"status": "trialing",
"currentPeriodStart": "2026-03-02T09:00:00.000Z",
"currentPeriodEnd": "2026-03-02T09:00:00.000Z",
"cancelledAt": "2026-03-02T09:00:00.000Z",
"createdAt": "2026-03-02T09:00:00.000Z",
"updatedAt": "2026-03-02T09:00:00.000Z"
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
POST /api/v1/platform/tenants/{tenantId}/subscription/cancel
Cancel a tenant’s subscription.
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
tenantIdrequired | path | string | — |
curl example
curl -X POST "https://api.yourdomain.com/api/v1/platform/tenants/4332af8b-4332-7332-832a-4332af8b4332/subscription/cancel" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY"Responses
| Name | Type | Constraints |
|---|---|---|
idrequired | string (uuid) | — |
tenantIdrequired | string (uuid) | — |
planIdrequired | string (uuid) | — |
statusrequired | enum: "trialing" | "active" | "expired" | "suspended" | "cancelled" | — |
currentPeriodStartrequired | string (date-time) | — |
currentPeriodEndrequired | string (date-time) | — |
cancelledAtrequired | string (date-time) | null | — |
createdAtrequired | string (date-time) | — |
updatedAtrequired | string (date-time) | — |
{
"id": "37386ae0-3738-7738-8386-37386ae03738",
"tenantId": "4332af8b-4332-7332-832a-4332af8b4332",
"planId": "744bf63f-744b-744b-84bf-744bf63f744b",
"status": "trialing",
"currentPeriodStart": "2026-03-02T09:00:00.000Z",
"currentPeriodEnd": "2026-03-02T09:00:00.000Z",
"cancelledAt": "2026-03-02T09:00:00.000Z",
"createdAt": "2026-03-02T09:00:00.000Z",
"updatedAt": "2026-03-02T09:00:00.000Z"
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
POST /api/v1/platform/tenants/{tenantId}/subscription/renew
Extend the billing period and set status back to active.
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
tenantIdrequired | path | string | — |
Request body
| Name | Type | Constraints |
|---|---|---|
currentPeriodStart | string (date-time) | — |
currentPeriodEndrequired | string (date-time) | — |
Example
{
"currentPeriodStart": "2026-03-02T09:00:00.000Z",
"currentPeriodEnd": "2026-03-02T09:00:00.000Z"
}curl example
curl -X POST "https://api.yourdomain.com/api/v1/platform/tenants/4332af8b-4332-7332-832a-4332af8b4332/subscription/renew" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"currentPeriodStart": "2026-03-02T09:00:00.000Z",
"currentPeriodEnd": "2026-03-02T09:00:00.000Z"
}'Responses
| Name | Type | Constraints |
|---|---|---|
idrequired | string (uuid) | — |
tenantIdrequired | string (uuid) | — |
planIdrequired | string (uuid) | — |
statusrequired | enum: "trialing" | "active" | "expired" | "suspended" | "cancelled" | — |
currentPeriodStartrequired | string (date-time) | — |
currentPeriodEndrequired | string (date-time) | — |
cancelledAtrequired | string (date-time) | null | — |
createdAtrequired | string (date-time) | — |
updatedAtrequired | string (date-time) | — |
{
"id": "37386ae0-3738-7738-8386-37386ae03738",
"tenantId": "4332af8b-4332-7332-832a-4332af8b4332",
"planId": "744bf63f-744b-744b-84bf-744bf63f744b",
"status": "trialing",
"currentPeriodStart": "2026-03-02T09:00:00.000Z",
"currentPeriodEnd": "2026-03-02T09:00:00.000Z",
"cancelledAt": "2026-03-02T09:00:00.000Z",
"createdAt": "2026-03-02T09:00:00.000Z",
"updatedAt": "2026-03-02T09:00:00.000Z"
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
GET /api/v1/platform/users
Search users globally (cursor-paginated).
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
cursor | query | string | — |
limit | query | integer | 1–100 · default: 25 |
search | query | string | 1–200 chars |
curl example
curl -X GET "https://api.yourdomain.com/api/v1/platform/users" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY"Responses
| Name | Type | Constraints |
|---|---|---|
datarequired | array<object> | — |
nextCursorrequired | string | null | — |
{
"data": [
{
"id": "37386ae0-3738-7738-8386-37386ae03738",
"email": "ada.lovelace@example.com",
"emailVerifiedAt": "2026-03-02T09:00:00.000Z",
"fullName": "Ada Lovelace",
"phone": "+15551234567",
"locale": "ar",
"avatarFileId": "3561389f-3561-7561-8613-3561389f3561",
"status": "active",
"lastLoginAt": "2026-03-02T09:00:00.000Z",
"failedLoginCount": -9007199254740991,
"lockedUntil": "2026-03-02T09:00:00.000Z",
"createdAt": "2026-03-02T09:00:00.000Z",
"updatedAt": "2026-03-02T09:00:00.000Z"
}
],
"nextCursor": null
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
POST /api/v1/platform/users/{id}/disable
Disable a user account and revoke every one of their sessions.
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
idrequired | path | string | — |
curl example
curl -X POST "https://api.yourdomain.com/api/v1/platform/users/37386ae0-3738-7738-8386-37386ae03738/disable" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY"Responses
| Name | Type | Constraints |
|---|---|---|
okrequired | enum: true | — |
{
"ok": true
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
POST /api/v1/platform/users/{id}/enable
Re-enable a disabled user account.
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
idrequired | path | string | — |
curl example
curl -X POST "https://api.yourdomain.com/api/v1/platform/users/37386ae0-3738-7738-8386-37386ae03738/enable" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY"Responses
| Name | Type | Constraints |
|---|---|---|
okrequired | enum: true | — |
{
"ok": true
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.