PublishDrive
Api

Create a new book

POST
/books
apikey<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://api.publishdrive.com/v2/distribution/books" \  -H "Content-Type: application/json" \  -d '{    "format": "ebook",    "title": "The Great Adventure",    "subtitle": "A Journey Through Time",    "language": [      "EN"    ],    "description": "An epic tale of discovery.",    "category": [      "FIC002000"    ],    "keyword": [      "adventure"    ],    "copyright": "SELF",    "saleTerritory": [      "ALL"    ],    "publicationDate": "2027-06-15",    "contributor": [      {        "firstName": "Jane",        "lastName": "Doe",        "role": "Author"      }    ],    "price": [      {        "currency": "USD",        "price": 9.99      }    ]  }'

{
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "type": "book",
    "attributes": {
      "format": "ebook",
      "status": "draft",
      "title": "The Great Adventure",
      "externalId": null,
      "subtitle": null,
      "series": null,
      "language": [
        "EN"
      ],
      "isbn": null,
      "imprint": {
        "id": "e9e8d15e-52cb-11f1-8d0d-aedf0546306a",
        "name": "Demo Imprint"
      },
      "description": "An epic tale.",
      "category": [
        "FIC002000"
      ],
      "keyword": [
        "adventure"
      ],
      "copyright": "SELF",
      "saleTerritory": [
        "ALL"
      ],
      "publicationDate": "2027-06-15",
      "isFinalVersion": false,
      "contributor": [
        {
          "firstName": "Jane",
          "lastName": "Doe",
          "role": "Author"
        }
      ],
      "price": [
        {
          "currency": "USD",
          "price": 9.99
        }
      ],
      "audience": null,
      "ebookDetails": {
        "pageCount": 120,
        "kdpEnrolled": false,
        "publishedOnAmazon": false
      },
      "podDetails": null,
      "audioDetails": null,
      "files": [],
      "chapters": null
    }
  }
}

{
  "title": "Bad Request",
  "status": 400,
  "detail": "Server Request message failed validation",
  "instance": "/v2/distribution/books",
  "invalidParams": [
    {
      "name": "title",
      "reason": "Keyword validation failed: Required property 'title' must be present in the object"
    }
  ]
}
Empty
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "invalidParams": [
    {
      "name": "string",
      "reason": "string"
    }
  ]
}

On this page