{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ditto-audio/json-schema/ditto-audio-upsert-audiobook-dto-schema.json",
  "title": "UpsertAudiobookDto",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ditto-audio-reader-api-openapi.yml#/components/schemas/UpsertAudiobookDto",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Your own stable id for this audiobook (an ISBN, a uuid, your primary key). Ignored on PUT — the path wins. Omit on POST and one is generated. Ids are per account: another account's audiobook with the same id is another audiobook."
    },
    "title": {
      "type": "string"
    },
    "author": {
      "type": "string"
    },
    "format": {
      "type": "string",
      "description": "Source document type."
    },
    "chapterCount": {
      "type": "number",
      "description": "How many chapters the source has."
    },
    "contentHash": {
      "type": "string",
      "description": "sha-256 of the source file, lowercase hex. Enables upload dedup. Set while the audiobook has no source; after that only the same hash is accepted (409 SOURCE_ALREADY_SET)."
    },
    "coverImageUrl": {
      "type": "string",
      "description": "https:// or data:image/ URL."
    }
  },
  "required": [
    "title"
  ]
}