Creating a new item on wikidata with api should not fail, because some other people get the same number in the same second. Please avoid concurrent requests for the next item id. Thanks.
The request:
api.php?format=xml&action=wbeditentity
POST: new=item&data=*&token=
Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=46535