{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/selfbadge-com/json-schema/selfbadge-com-public-profile-schema.json",
  "title": "PublicProfile",
  "description": "The public page of a profile this client created or manages (?view=public). Only status, updated_at and handle when it is not public; removed_at and reason_code when removed.",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/selfbadge-com-openapi.yml#/components/schemas/PublicProfile",
  "type": "object",
  "required": [
    "handle",
    "status"
  ],
  "properties": {
    "handle": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "published",
        "not_published",
        "flagged",
        "removed"
      ]
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "name": {
      "type": "string"
    },
    "headline": {
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "facts": {
      "type": "array",
      "description": "Every public fact, as /<handle>.json gives it, with its id: id, property, value, verification {level, name, label, method, verifiedAt, expiresAt}, source {type, label, url, retrievedAt}.",
      "items": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string"
          }
        }
      }
    },
    "photo_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "The public photo's selfbadge.com address."
    },
    "has_photo": {
      "type": "boolean"
    },
    "completeness": {
      "$ref": "#/$defs/Completeness"
    },
    "links": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "handle": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    },
    "not_confused_with": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "who_is": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    },
    "removed_at": {
      "type": "string",
      "format": "date-time"
    },
    "reason_code": {
      "type": "string"
    },
    "test": {
      "type": "boolean"
    }
  },
  "$defs": {
    "Completeness": {
      "type": "object",
      "required": [
        "percent",
        "missing"
      ],
      "description": "The profile strength the person sees in the editor, from the same checks and points. missing, as stable codes: photo (a photo), about (one line about the person), work (job title and organization), work_email (a verified work email), verified_accounts (two verified accounts), website (a verified website), education, expertise (topics). On ?view=public it counts the public facts only.",
      "properties": {
        "percent": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100
        },
        "missing": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "photo",
              "about",
              "work",
              "work_email",
              "verified_accounts",
              "website",
              "education",
              "expertise"
            ]
          }
        }
      }
    }
  }
}