Batch User Creation
Hi -
I am currently trying to populate users and groups on the backend using the https://api.cord.com/v1/batch and am getting errors around the email format.
Here are a few examples that failed
The exact API request body message is {"error":"invalid_request","message":"Invalid BatchAPIVariables:\nInput \"name@example.com \" for users/128/email must match format \"email\".\nRefer to https://docs.cord.com/rest-apis/batch/"}
Could you share what are valid email patterns so we can programmatically filter out emails that do not fit?
Thanks,
Ben
![cord icon logo](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcord-icon.19285d53.png&w=32&q=75)
Hi @Ben Demers , thanks for reporting this. I can see in this error response that there is an extra space at the end of the email address. We don't currently trim the input before passing it to validation and our validation is quite strict. We can look into perhaps doing something like that before validating this input. But I suspect if you make sure there is no extra white space, those should pass.