I followed the API documentation to upload a file to the project. I want to add a custom field (for example, a file checksum), but it doesn’t work.
curl -s -X POST "$CROWDIN_API/projects/$PROJECT_ID/files" \
-H "Authorization: Bearer $CROWDIN_API_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"storageId\": $storageId, \
\"name\": \"$(basename "$file")\", \
\"branchId\": $BRANCH_ID, \
\"directoryId\": $DIRECTORY_ID, \
\"fields\": { \
\"checksum\": \"$local_file_checksum\" \
} \
}"
errors:
{"errors":[{"error":{"key":"fields","errors":[{"code":"unknownField","message":"Unknown field provided (checksum)"}]}}]}