Send Invitation not working in user API

I’m trying to create a user with send_invitation as true. But I’m not receiving the invitation email. The same via UI is working fine.

Hello, Deepan.

Are you using live or the sandbox?

I’m using it in live.

Hi, again.

Can you post the details for your request? The URL and payload specifically. I’ve confirmed this is all working correctly so I imagine it’s some small missed detail.

Additionally there are a couple of conditions on sending the invite:

  1. You can’t send an invite to yourself
  2. You have to have the ability to send invites meaning you need to have permission level 7 or higher.

Hi there,
Sorry for the late response

I’m posting via the admin user.

uri: https://api.freeagent.com/v2/users
method: POST
payload: {
“first_name”: “Development481”,
“last_name”: “Team481”,
“hidden”: false,
“email”: "dev@gmail.com",
“role”: “Director”,
“permission_level”: 8,
“ni_number”: “AB123456C”,
“unique_tax_reference”: “1234567890”,
“opening_mileage”: “0.0”,
“send_invitation”: true
}

Hello, Deepan.

I tested this in production using my own test company and your data. The user was created successfully and I received the email.

Just to confirm you own "dev@gmail.com" (or you’re using an email address that you do own). If you’d like to email our support team (and reference this thread) with the email address you’re using and your API app token I can check and see if there’s something in our logs that might help.

Pat

FYI, I’m using trial account and I’ve sent all the required credentials and account information via help app from my account.