{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nopaque-co-uk/json-schema/nopaque-co-uk-add-profile-item-request-schema.json",
  "title": "AddProfileItemRequest",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nopaque-co-uk-profiles-api-openapi.yml#/components/schemas/AddProfileItemRequest",
  "oneOf": [
    {
      "$ref": "#/$defs/AddVoiceProfileItemRequest"
    },
    {
      "$ref": "#/$defs/AddDataProfileItemRequest"
    }
  ],
  "$defs": {
    "AddDataProfileItemRequest": {
      "type": "object",
      "description": "Body for `POST /profiles/{id}/items` when adding a data item.",
      "required": [
        "type",
        "datasetId",
        "itemId",
        "label"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "data"
          ]
        },
        "datasetId": {
          "type": "string",
          "format": "uuid"
        },
        "itemId": {
          "type": "string",
          "description": "`DataItem.id` inside the dataset."
        },
        "label": {
          "type": "string"
        },
        "description": {
          "type": "string"
        }
      }
    },
    "AddVoiceProfileItemRequest": {
      "type": "object",
      "description": "Body for `POST /profiles/{id}/items` when adding a voice item.",
      "required": [
        "type",
        "audioId",
        "label"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "voice"
          ]
        },
        "audioId": {
          "type": "string",
          "format": "uuid",
          "description": "`AudioObject.id` to bind to this profile."
        },
        "label": {
          "type": "string"
        },
        "description": {
          "type": "string"
        }
      }
    }
  }
}