Rest API: unable to send account invite while I create a customer

Hi,

I need to create customers via API and automatically send the activation account email.

I do a POST call to /admin/api/2021-07/customers.json with the following data:

{
  "customer": {
    "first_name": "Steve",
    "last_name": "Lastnameson",
    "email": "egiuliani@endurance.it",
    "phone": "+15142546011",
    "verified_email": true,
    "addresses": [
      {
        "address1": "123 Oak St",
        "city": "Ottawa",
        "province": "ON",
        "phone": "555-1212",
        "zip": "123 ABC",
        "last_name": "Lastnameson",
        "first_name": "Mother",
        "country": "CA"
      }
    ],
    "send_email_invite": true
  }
}​

Customer is properly created but none invite is send.

Did I misunderstand the function of this field?

Thanks!

Hey @egiuliani

That’s strange - I do exactly the same via the POST to customers.json and the Account email Invite is sent fine as we expect, and it’s received ok at my test email.

Would you like to send me the x-request_id for one of these requests? I can then check out the logs. Thanks!