Why am I getting "Missing required attribute 'name'" error when creating a document even though the attribute doesn't exist ? #9176
Replies: 1 comment
|
The schema screenshot and payload are for different collection schemas. Your screenshot shows four required attributes: title, link, difficulty, and company. The payload includes all four. Appwrite's error says a required attribute named name is missing, which means the collection ID used by the createDocument request currently has a required name attribute—even if the collection visible in the Console does not. Check the identifiers passed to the SDK call, not only the displayed collection name: Then fetch the exact collection's attributes with the same endpoint/project credentials: Common causes are:
Also note that documentId belongs in the createDocument method argument, not inside data (your screenshot appears to show it separately, which is correct). There is no hidden inference here: document validation loads the target collection's active attributes and reports the missing required key by name. If listAttributes for the exact IDs does not show name, log the request endpoint/project ID and verify that the API key/session and Console are using the same Appwrite instance. The fact that the error names name is strong evidence that the request is reaching a different/stale schema, not that title is being renamed. |
Uh oh!
There was an error while loading. Please reload this page.
I'm facing an issue while trying to create a document in my Appwrite database. Here's the error response:
I am attaching images of my payload and schema
Collection Schema:
Payload:

All reactions