{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/affiliaterail-com/json-schema/affiliaterail-com-resource-create-schema.json",
  "title": "ResourceCreate",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/affiliaterail-com-resources-api-openapi.yml#/components/schemas/ResourceCreate",
  "type": "object",
  "properties": {
    "program_id": {
      "type": "string",
      "pattern": "^(sample_)?prg_",
      "description": "Prefixed id (`prg_…`)"
    },
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "url": {
      "type": "string",
      "format": "uri",
      "description": "Where the link points. File uploads happen in the dashboard; the API manages links and existing files."
    },
    "folder": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 60
    },
    "group_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^(sample_)?grp_",
        "description": "Prefixed id (`grp_…`)"
      },
      "default": []
    },
    "tag_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^(sample_)?tag_",
        "description": "Prefixed id (`tag_…`)"
      },
      "default": []
    },
    "published": {
      "type": "boolean",
      "default": true
    }
  },
  "required": [
    "program_id",
    "title",
    "url"
  ]
}