{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/flowral-app/json-schema/flowral-app-context-schema.json",
  "title": "Context",
  "description": "Who the credential is and what it may do — the first call to make when wiring an integration.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/flowral-app-workspace-api-openapi.yml#/components/schemas/Context",
  "type": "object",
  "properties": {
    "workspaceId": {
      "type": "string"
    },
    "workspaceName": {
      "type": "string"
    },
    "credentialId": {
      "type": "string",
      "description": "The key or client this token belongs to."
    },
    "credentialName": {
      "type": "string"
    },
    "role": {
      "type": "string",
      "enum": [
        "admin",
        "member",
        "viewer"
      ],
      "description": "The credential’s role in the workspace. It decides what every other call may do."
    },
    "scopes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "plan": {
      "type": "string",
      "enum": [
        "free",
        "pro"
      ]
    }
  },
  "required": [
    "workspaceId",
    "workspaceName",
    "role",
    "scopes",
    "plan"
  ]
}