{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/reviewflowz-com/json-schema/reviewflowz-com-account-schema.json",
  "title": "Account",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/reviewflowz-com-openapi.json#/components/schemas/Account",
  "type": "object",
  "required": [
    "id",
    "name",
    "api_version",
    "campaign_destinations",
    "member",
    "credential",
    "created_at"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "api_version": {
      "type": "string"
    },
    "campaign_destinations": {
      "type": "string",
      "enum": [
        "platform",
        "source"
      ],
      "description": "What a campaign's `destinations` name on this account: `platform` (billed per location: each customer's location picks the source on that platform) or `source`."
    },
    "member": {
      "type": [
        "object",
        "null"
      ],
      "description": "The team member the key or app acts as. Their access groups decide what it sees.",
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "credential": {
      "type": "object",
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "api_key",
            "oauth"
          ]
        },
        "name": {
          "type": "string",
          "description": "The key's name (api_key only)."
        },
        "app": {
          "type": [
            "string",
            "null"
          ],
          "description": "The OAuth app's name (oauth only)."
        },
        "scopes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "What this key or app may do: its permissions, like `reviews:read`."
        },
        "expires_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "When the key stops working (api_key only). Null for a key that never expires."
        }
      }
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}