Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions api-reference/openapi/accounts.json
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,78 @@
}
}
},
"/api/subscription/status": {
"get": {
"servers": [
{
"url": "https://api.recoupable.com"
}
],
"description": "Check whether an account has an active pro subscription. Checks both direct account subscriptions and organization-level subscriptions in parallel. Returns a single boolean `isPro` flag.",
"security": [
{
"apiKeyAuth": []
},
{
"bearerAuth": []
}
],
"parameters": [
{
"name": "accountId",
"in": "query",
"description": "Filter to a specific account. Only applicable when the authenticated account has access to multiple accounts via organization membership; if not provided, the API key's own account is used.",
"required": false,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "Subscription status retrieved successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SubscriptionStatusResponse"
}
}
}
},
"400": {
"description": "Bad request — missing or invalid `accountId`",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized — invalid or missing authentication",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountErrorResponse"
}
}
}
},
"403": {
"description": "Forbidden - account override not permitted",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountErrorResponse"
}
}
}
}
}
}
},
"/api/workspaces": {
"post": {
"description": "Create a new workspace account. Workspaces can optionally be linked to an organization.",
Expand Down Expand Up @@ -2934,6 +3006,19 @@
"example": "Verified"
}
}
},
"SubscriptionStatusResponse": {
"type": "object",
"required": [
"isPro"
],
"properties": {
"isPro": {
"type": "boolean",
"description": "`true` if the account has an active pro subscription (via a direct account subscription or an organization-level subscription); `false` otherwise.",
"example": true
}
}
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions api-reference/subscriptions/status.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: 'Get Subscription Status'
openapi: '/api-reference/openapi/accounts.json GET /api/subscription/status'
---
3 changes: 2 additions & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,8 @@
{
"group": "Subscriptions",
"pages": [
"api-reference/subscriptions/get"
"api-reference/subscriptions/get",
"api-reference/subscriptions/status"
]
},
{
Expand Down