{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/postnext-io/json-schema/postnext-io-asset-schema.json",
  "title": "Asset",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/postnext-io-openapi.json#/components/schemas/Asset",
  "type": "object",
  "properties": {
    "_id": {
      "type": "string"
    },
    "teamId": {
      "type": "string"
    },
    "userId": {
      "type": "string"
    },
    "folderId": {
      "type": [
        "string",
        "null"
      ]
    },
    "name": {
      "type": "string",
      "description": "Stored (S3) filename."
    },
    "originalName": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "MIME type (stored under `type`, not `mimeType`)."
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "size": {
      "type": "integer",
      "description": "Bytes."
    },
    "width": {
      "type": "integer"
    },
    "height": {
      "type": "integer"
    },
    "displayName": {
      "type": "string"
    },
    "source": {
      "type": "string",
      "enum": [
        "user_upload",
        "unsplash",
        "pixabay",
        "pexels",
        "brand_scraper",
        "ai_generated",
        "other"
      ]
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  }
}