I’m sending the following curl command:
curl --request POST --url 'https://mattermost.foo.com/api/v4/teams/xxxxxxxxxxxxxxxxxxxxxxxxx/invite/email' --header 'Authorization: Bearer yyyyyyyyyyyyyyyyyyyyyyyyyyyyx' --header 'Content-Type: application/json' --data '{ "bar@foo.com", "test@foo.com" }'
But it returns an error:
{"id":"api.context.invalid_body_param.app_error","message":"Invalid or missing user_email in request body ","detailed_error":"","request_id":"bbbbbbbbbbbbbbbbbb","status_code":400}
https://api.mattermost.com/#tag/teams%2Fpaths%2F~1teams~1{team_id}~1invite~1email%2Fpost
said that I should post an array of strings. But the error said that “user_email” is missing.
But what is the correct JSON data format for this command? Which array of strings?
Thanks for your help.