User API keys: duplicate client_id will lead to internal server error

The error should be better, yes, but client_id needs to be unique.

When you are sending users that way you must generate a unique id in your API call. The index is correct, 1 user may have N client ids.