{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/audivo-dev/json-schema/audivo-dev-upload-created-schema.json",
  "title": "UploadCreated",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/audivo-dev-uploads-api-openapi.yml#/components/schemas/UploadCreated",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "upload_id",
    "put_url",
    "put_headers",
    "put_url_expires_at",
    "retained_until",
    "bytes",
    "content_type",
    "declared_duration_seconds",
    "title"
  ],
  "properties": {
    "upload_id": {
      "$ref": "#/$defs/UploadId"
    },
    "put_url": {
      "type": "string",
      "format": "uri",
      "maxLength": 4096,
      "description": "Presigned `PUT`; send the file body with `put_headers` and nothing else."
    },
    "put_headers": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Every header the PUT must carry, verbatim; they are part of the signature."
    },
    "put_url_expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "retained_until": {
      "type": "string",
      "format": "date-time",
      "description": "Logical upload expiry and allowance-release time; physical cleanup is asynchronous."
    },
    "bytes": {
      "type": "integer",
      "minimum": 1
    },
    "content_type": {
      "$ref": "#/$defs/UploadContentType"
    },
    "declared_duration_seconds": {
      "type": "number",
      "exclusiveMinimum": 0
    },
    "title": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 300
        },
        {
          "enum": [
            null
          ]
        }
      ]
    }
  },
  "$defs": {
    "UploadContentType": {
      "type": "string",
      "enum": [
        "audio/mpeg",
        "audio/mp3",
        "audio/mp4",
        "audio/m4a",
        "audio/x-m4a",
        "audio/aac",
        "audio/x-aac",
        "audio/ogg",
        "audio/opus",
        "audio/flac",
        "audio/x-flac",
        "audio/wav",
        "audio/x-wav",
        "audio/webm"
      ]
    },
    "UploadId": {
      "type": "string",
      "pattern": "^upl_[A-Za-z0-9]{16,32}$",
      "maxLength": 40,
      "description": "Opaque, server-generated upload identifier."
    }
  }
}