Adding users via api

Hi,
I use Python to send post request to add new user. I have a paid subscription. I have tried different Get request and they work. This is how the request looks like. the taken is already added to the header of the session

data = {"email": "test@gmail.com"}
requests.Session.headers.update({'Content-type':'application/json','Accept':'application/json'})
response = requests.Session.post(url=url,data=data)

I got this error: requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.clockify.me/api/v1/workspaces

Any suggestion on how to solve this?
Thank you

Hello Adan,

Did you include your API key in the header also?
Additional question, did you add an additional user seat on your subscription page for an additional user you are trying to invite?
And please let me know if you are using this URL for the POST method: https://api.clockify.me/api/v1/workspaces/{workspaceId}/users
As you will need to include the workspace id in the URL request.

Cheers!

Hi Damjan,
The X-Api-Key is added to the header. The subscription allows adding new users (I need to double check this). I do not want to invite, I see there is a parameter to set for that in the request.
Yes, I use the same URL.

Thank you!