Invite users to the team by email with API SYNTAX

https://your-mattermost-url.com/api/v4/teams/{team_id}/invite/email

Hello guyss, what is the correct syntax of that request with curl?

I tried that but it doesn’t work:
curl -H "Authorization Bearer: XXXXX-X POST -d ‘{“ivan.hristov@mlosa.com”}’ xxxxx.com

Hi @alfador,

What error message are you getting?

@alfador, based on your other Forum post, it looks like you’re getting a permission error.

You’ll need to have invite_to_team permission for the team. Is this setting enabled on your server: https://docs.mattermost.com/administration/config-settings.html#enable-email-invitations?