{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/autoposting-ai/json-schema/autoposting-ai-platform-token-schema.json",
  "title": "PlatformToken",
  "description": "Stored platform token details.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/autoposting-ai-platform-oauth-api-openapi.yml#/components/schemas/PlatformToken",
  "type": "object",
  "properties": {
    "tokenId": {
      "type": "string"
    },
    "platformUserId": {
      "type": "string"
    },
    "username": {
      "type": "string"
    },
    "scopes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "expiresAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "lastUsedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "status": {
      "type": "string"
    }
  }
}