Skip to content
Back

Can't create empty documents?

  • 0
  • Databases
UCYT5040
17 Aug, 2025, 19:49

When I try to create a document without any data, I get this error:

TypeScript
{"message":"The document data is missing. Try again with document data populated","code":400,"type":"document_missing_data","version":"1.7.4"}

I'm confused as to why that is an error anyway. To clarify: I am passing an empty object ({}) as data, not omitting it All attributes in this collection have default values. I assume a workaround would be to just set one attribute (and I'll try that in a moment). I just find this to be annoying, and a useless error message. Would make more sense if I omitted the data completely.

Is there something else I'm doing wrong?

TL;DR
Issue: Getting an error (document_missing_data) when trying to create an empty document even when passing an empty object as data. Find the error message unnecessary since all attributes have default values. Try setting at least one attribute with a non-default value as a workaround.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more