{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/qrflow-codes/json-schema/qrflow-codes-create-code-schema.json",
  "title": "CreateCode",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/qrflow-codes-openapi.yml#/components/schemas/CreateCode",
  "type": "object",
  "required": [
    "type",
    "destination_data"
  ],
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "url",
        "text",
        "wifi",
        "vcard",
        "email",
        "phone",
        "sms",
        "location"
      ]
    },
    "destination_data": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The fields for the type; add `subtype` (from /catalog) for a specific kind such as instagram or googlereview"
    },
    "label": {
      "type": "string",
      "maxLength": 120
    },
    "fg_color": {
      "type": "string",
      "pattern": "^#[0-9a-fA-F]{6}$"
    },
    "bg_color": {
      "type": "string",
      "pattern": "^#[0-9a-fA-F]{6}$"
    },
    "frame_style": {
      "type": "string"
    },
    "frame_caption": {
      "type": "string",
      "maxLength": 60
    },
    "frame_caption2": {
      "type": "string",
      "maxLength": 60
    },
    "domain_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    }
  }
}