Migration API - Failed to create document (custom type)

Hi, we're unable to create a new document using the migration API for a custom type called "book". Would appreciate the help.

1 - Type was created via Slicemahcine, published to our repo.
2 - Data and fields match, and I'm using the recommended htmlAsRichText helper from the migrate library.

Code:

Prismic Setup

ERROR

I see the data missing in the payload, no idea why?

CUSTOM TYPE:

Hi @scholarly_dev,

400 could be a couple of different things - do you have an error with your title field in the first screenshot? Is this document the first of its kind in the book custom type, or do you have others already?

I was able to resolve this; the issue was that I was running it on the client side instead of the node.

Just to confirm, the document migration feature doesn't work on the client side, correct?

Hi @scholarly_dev, thanks for letting us know! Yes, you're correct, it doesn't work on the client side :slight_smile: