{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/logo-dev/json-schema/logo-dev-v2-brand-schema.json",
  "title": "V2Brand",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/logo-dev-openapi.json#/components/schemas/V2Brand",
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "const": "brand"
    },
    "id": {
      "type": "string",
      "description": "The brand's id. Stable across domain changes; use it to key your records."
    },
    "slug": {
      "type": "string",
      "description": "Readable label for display. It can change and is not accepted for lookups; use `id`."
    },
    "domain": {
      "type": [
        "string",
        "null"
      ],
      "description": "The brand's own domain, which can differ from the one you sent. `null` for brands with no website, such as some crypto tokens."
    },
    "status": {
      "type": "string",
      "const": "ready"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "indexed_at": {
      "type": "string",
      "format": "date-time",
      "description": "When the record was last refreshed."
    },
    "is_profane": {
      "type": "boolean",
      "description": "`true` when the brand may carry NSFW imagery."
    },
    "socials": {
      "type": "object",
      "description": "Profile URLs keyed by network. Networks with no profile are omitted.",
      "propertyNames": {
        "enum": [
          "facebook",
          "github",
          "instagram",
          "linkedin",
          "pinterest",
          "reddit",
          "snapchat",
          "telegram",
          "tumblr",
          "twitter",
          "wechat",
          "whatsapp",
          "wikipedia",
          "youtube"
        ]
      },
      "additionalProperties": {
        "type": "string",
        "format": "uri"
      }
    },
    "colors": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/V2Color"
      },
      "description": "Brand colors, most dominant first."
    },
    "logo": {
      "oneOf": [
        {
          "$ref": "#/$defs/V2Image"
        },
        {
          "type": "null"
        }
      ],
      "description": "The primary logo. `null` when the brand has none."
    },
    "brandmark": {
      "oneOf": [
        {
          "$ref": "#/$defs/V2Image"
        },
        {
          "type": "null"
        }
      ],
      "description": "The wide logo lockup: the symbol and wordmark together for most brands, or the wordmark alone for pure-type brands. `null` when the brand has none. See [brandmark](/concepts#brandmark)."
    },
    "social_banners": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/V2Image"
      },
      "description": "Banner images. Empty when there are none."
    }
  },
  "required": [
    "object",
    "id",
    "slug",
    "domain",
    "status",
    "name",
    "description",
    "indexed_at",
    "is_profane",
    "socials",
    "colors",
    "logo",
    "brandmark",
    "social_banners"
  ],
  "$defs": {
    "V2Color": {
      "type": "object",
      "properties": {
        "r": {
          "type": "integer",
          "minimum": 0,
          "maximum": 255
        },
        "g": {
          "type": "integer",
          "minimum": 0,
          "maximum": 255
        },
        "b": {
          "type": "integer",
          "minimum": 0,
          "maximum": 255
        },
        "hex": {
          "type": "string"
        },
        "oklch": {
          "type": "object",
          "properties": {
            "l": {
              "type": "number",
              "description": "Lightness, 0 to 1."
            },
            "c": {
              "type": "number",
              "description": "Chroma. Usually below 0.4."
            },
            "h": {
              "type": "number",
              "description": "Hue in degrees, 0 to 360. `0` when chroma is 0."
            }
          },
          "required": [
            "l",
            "c",
            "h"
          ]
        }
      },
      "required": [
        "r",
        "g",
        "b",
        "hex",
        "oklch"
      ]
    },
    "V2Image": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "format": "uri",
          "description": "Temporary signed download URL. It stops working at `expires_at`: download and host the image yourself. Add `size`, `format` (`png`, `jpg`, `webp`), or `theme` (`light`, `dark`) to format the download. Downloads do not count toward CDN image usage."
        },
        "etag": {
          "type": "string",
          "description": "Identifies this version of the source image, and is the same on every route. Save it and download again only when it changes."
        },
        "blurhash": {
          "type": "string",
          "description": "Compact blurred placeholder for the image."
        },
        "source": {
          "$ref": "#/$defs/V2ImageSource"
        },
        "last_updated_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "When the image last changed. `null` if it has not changed since the brand was indexed."
        },
        "expires_at": {
          "type": "string",
          "format": "date-time",
          "description": "When `url` stops working, about 24 hours after the request."
        }
      },
      "required": [
        "url",
        "etag",
        "blurhash",
        "source",
        "last_updated_at",
        "expires_at"
      ]
    },
    "V2ImageSource": {
      "type": "object",
      "description": "The source file behind the image.",
      "properties": {
        "width": {
          "type": "integer"
        },
        "height": {
          "type": "integer"
        },
        "format": {
          "type": "string",
          "enum": [
            "png",
            "jpg",
            "svg",
            "webp",
            "gif",
            "ico",
            "avif"
          ],
          "description": "Omitted when the format is not recognized."
        },
        "has_transparency": {
          "type": "boolean"
        },
        "is_vector": {
          "type": "boolean"
        }
      },
      "required": [
        "width",
        "height",
        "has_transparency",
        "is_vector"
      ]
    }
  }
}