To summarize this post, I'm able to import Kibana saved objects using the web UI, but I face some issues importing them using the API.
We use a dashboard.ndjson file which is the result of a saved object export using the Kibana web UI on port 5601 (Stack Management / Saved objects / Export objects).
When I import this file using the Kibana web UI (Stack Management / Saved objects / Import), it works well: by clicking "Confirm all changes" in the the dialog box below which shows the index pattern conflicts, the saved objects are imported.
When I try to import the same file using the API, by typing the following command, some errors appears related to the same index pattern conflicts than the previous ones (see the image below), but this time the saved objects are not imported:
curl -X POST localhost:5601/api/saved_objects/_import?createNewCopies=true -H "kbn-xsrf: true" --form email@example.com
So using the same dashboard.ndjson file, I'm able to import it using the web UI but not using the API. Do you have any idea on how to import it using the API ?