> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# ResetAppInviteProxy

# Package: appInvites

# Namespace: AppInvitesProxyService

# Method link: https://dev.wix.com/docs/api-reference/app-management/app-invites/reset-app-invite-proxy.md

## Introduction

Resets a pending, declined, or expired invitation to pending, renews its expiration, and resends the email.


Returns the updated invitation and acceptance link.
Requires a signed-in user with account context.
Fails if the invitation doesn't exist or can't be reset, such as an already used or deleted invitation.

---

## REST API

### Schema

```
 Method: resetAppInviteProxy
 Description: Resets a pending, declined, or expired invitation to pending, renews its expiration, and resends the email.   Returns the updated invitation and acceptance link. Requires a signed-in user with account context. Fails if the invitation doesn't exist or can't be reset, such as an already used or deleted invitation.
 URL: https://www.wixapis.com/apps/v1/apps/invites/{inviteId}/reset
 Method: POST
 Return type: ResetAppInviteProxyResponse
  - name: invite | type: AppWebInvite | description: Renewed invitation, including its details and acceptance link.  
     - name: id | type: string | description:   | read-only: true | validation: format GUID
     - name: inviteData | type: AppInvite | description:   | read-only: true 
        - name: id | type: string | description:   | read-only: true | validation: format GUID
        - name: appId | type: string | description:   | validation: format GUID
        - name: appName | type: string | description:   | read-only: true | validation: maxLength 100
        - name: policyIds | type: array<string> | description:   | validation: minItems 1, maxItems 10, minLength 1, maxLength 25
        - name: givenByUserId | type: string | description:   | read-only: true | validation: format GUID
        - name: givenByAccountId | type: string | description:   | read-only: true | validation: format GUID
        - name: invitedToAccountId | type: string | description:   | read-only: true | validation: format GUID
        - name: acceptedBy | type: string | description:   | read-only: true | validation: format GUID
        - name: acceptedByAccountId | type: string | description:   | read-only: true | validation: format GUID
        - name: destEmail | type: string | description:   | validation: format EMAIL
        - name: status | type: string | description:   | read-only: true | validation: maxLength 20
        - name: brandDomain | type: string | description:   | validation: maxLength 50
        - name: invitePurpose | type: string | description:   | validation: maxLength 50
        - name: expirationDate | type: string | description:   | read-only: true | validation: format date-time
        - name: dateCreated | type: string | description:   | read-only: true | validation: format date-time
        - name: dateUpdated | type: string | description:   | read-only: true | validation: format date-time
     - name: acceptLink | type: string | description:   | read-only: true | validation: format WEB_URL


```

### Examples

### Renew and resend an app invitation
Use a pending, declined, or expired invitation and signed-in user authentication with account context. This sends another email. The example was not executed; its response and acceptance link are fictional.

```curl
curl -X POST \
'https://www.wixapis.com/apps/v1/apps/invites/baef7f75-e4cf-489e-a4f7-4a3f6c657314/reset' \
-H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.appManagement.appInvitesProxy.resetAppInviteProxy(inviteId)
 Description: Resets a pending, declined, or expired invitation to pending, renews its expiration, and resends the email.   Returns the updated invitation and acceptance link. Requires a signed-in user with account context. Fails if the invitation doesn't exist or can't be reset, such as an already used or deleted invitation.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  inviteId
 Method parameters: 
   param name: inviteId | type: string | description: GUID of the existing invitation to renew and resend. | required: true | validation: format GUID
 Return type: PROMISE<ResetAppInviteProxyResponse>
  - name: invite | type: AppWebInvite | description: Renewed invitation, including its details and acceptance link.  
     - name: _id | type: string | description:   | read-only: true | validation: format GUID
     - name: inviteData | type: AppInvite | description:   | read-only: true 
        - name: _id | type: string | description:   | read-only: true | validation: format GUID
        - name: appId | type: string | description:   | validation: format GUID
        - name: appName | type: string | description:   | read-only: true | validation: maxLength 100
        - name: policyIds | type: array<string> | description:   | validation: minItems 1, maxItems 10, minLength 1, maxLength 25
        - name: givenByUserId | type: string | description:   | read-only: true | validation: format GUID
        - name: givenByAccountId | type: string | description:   | read-only: true | validation: format GUID
        - name: invitedToAccountId | type: string | description:   | read-only: true | validation: format GUID
        - name: acceptedBy | type: string | description:   | read-only: true | validation: format GUID
        - name: acceptedByAccountId | type: string | description:   | read-only: true | validation: format GUID
        - name: destEmail | type: string | description:   | validation: format EMAIL
        - name: status | type: string | description:   | read-only: true | validation: maxLength 20
        - name: brandDomain | type: string | description:   | validation: maxLength 50
        - name: invitePurpose | type: string | description:   | validation: maxLength 50
        - name: expirationDate | type: Date | description:   | read-only: true 
        - name: dateCreated | type: Date | description:   | read-only: true 
        - name: dateUpdated | type: Date | description:   | read-only: true 
     - name: acceptLink | type: string | description:   | read-only: true | validation: format WEB_URL


```

### Examples

### resetAppInviteProxy
```javascript
import { appInvitesProxy } from '@wix/app-management';

async function resetAppInviteProxy(inviteId) {
  const response = await appInvitesProxy.resetAppInviteProxy(inviteId);
};
```

### resetAppInviteProxy (with elevated permissions)
```javascript
import { appInvitesProxy } from '@wix/app-management';
import { auth } from '@wix/essentials';

async function myResetAppInviteProxyMethod(inviteId) {
  const elevatedResetAppInviteProxy = auth.elevate(appInvitesProxy.resetAppInviteProxy);
  const response = await elevatedResetAppInviteProxy(inviteId);
}
```

### resetAppInviteProxy (self-hosted)
Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { appInvitesProxy } from '@wix/app-management';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { appInvitesProxy },
  // Include the auth strategy and host as relevant
});


async function resetAppInviteProxy(inviteId) {
  const response = await myWixClient.appInvitesProxy.resetAppInviteProxy(inviteId);
};
```

---