{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cherami-to/json-schema/cherami-to-bulk-label-change-schema.json",
  "title": "BulkLabelChange",
  "description": "At least one nonempty change array, and no name in both. Duplicate IDs are updated once.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cherami-to-labels-api-openapi.yml#/components/schemas/BulkLabelChange",
  "type": "object",
  "properties": {
    "message_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "Message ID, in lowercase.",
        "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"
      },
      "minItems": 1,
      "maxItems": 100
    },
    "add_labels": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Label"
      },
      "maxItems": 32,
      "description": "Label names, case-sensitive; order and duplicates don't matter."
    },
    "remove_labels": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Label"
      },
      "maxItems": 32,
      "description": "Label names, case-sensitive; order and duplicates don't matter."
    }
  },
  "required": [
    "message_ids"
  ],
  "additionalProperties": false,
  "$defs": {
    "Label": {
      "type": "string",
      "description": "1–128 UTF-8 bytes after trimming, without control characters; case-sensitive.",
      "x-max-utf8-bytes": 128
    }
  }
}