# The organizations/{orgId}/invitations endpoint throws 400 if user already exists

**URL:** <https://community.auth0.com/t/the-organizations-orgid-invitations-endpoint-throws-400-if-user-already-exists/86851>\
**Category:** Get Help\
**Tags:** bug\
**Created:** [July 12, 2022, 7:57pm UTC](https://community.auth0.com/t/the-organizations-orgid-invitations-endpoint-throws-400-if-user-already-exists/86851 "2022-07-12T19:57:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![adam19](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/adam19/32/34464_2.png) [@adam19](https://community.auth0.com/u/adam19)\
**Post date:** [July 12, 2022, 7:57pm UTC](https://community.auth0.com/t/the-organizations-orgid-invitations-endpoint-throws-400-if-user-already-exists/86851/1 "2022-07-12T19:57:05Z")

</div>

Hi,

We’re utilizing the organizations/{orgId}/invitations endpoint to invite users to an organization but we get a 400 error if the user already exists. Is there an endpoint that checks if the user exists and, if so, adds the member to the organization?

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [July 12, 2022, 8:31pm UTC](https://community.auth0.com/t/the-organizations-orgid-invitations-endpoint-throws-400-if-user-already-exists/86851/3 "2022-07-12T20:31:39Z")

</div>

Hi @adam19 ,

Welcome to the Auth0 Community!

I tested with the POST `https://{your domain}/api/v2/organizations/{org_id}/invitations` endpoint with the below body scripts and did not see the error. The user existing in the organization received the invitation by email.

```auto
{ 
    "inviter": { 
        "name": "inviter name"}, 
    "invitee": { 
        "email": "invitee@email.com" }, 
    "client_id": "xxx", 
    "send_invitation_email": true
}

```

As far as I know, the only way to check if a user belongs to an organization via API is by sending the `GET https://{your domain}/api/v2/organizations/{org_id}/members` request to get the user list. [This](https://auth0.com/docs/manage-users/organizations/configure-organizations/retrieve-members) is the reference doc.

If you still observe this error, could you please provide your body scripts and the details of the error?

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [July 27, 2022, 8:31pm UTC](https://community.auth0.com/t/the-organizations-orgid-invitations-endpoint-throws-400-if-user-already-exists/86851/4 "2022-07-27T20:31:10Z")

</div>


