> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mercurjs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# acceptMemberInviteWorkflow

> Redeem an invite token and join a seller's team.

Validates the invite token, upserts the member by the invited email, links them to the seller with the invited role (as owner if the seller has none yet), binds the auth identity when the member is new, and deletes the consumed invite. Triggered by `POST /vendor/members/invites/accept`. Emits `member_invite.accepted`.

## Usage

```ts theme={null}
import { acceptMemberInviteWorkflow } from "@mercurjs/core/workflows"

const { result } = await acceptMemberInviteWorkflow(container).run({
  input: {
    invite_token: "eyJhbGciOi...",
    auth_identity_id: "authid_123",
    first_name: "Jane",
    last_name: "Doe",
  },
})
```

## Input

<ParamField body="invite_token" type="string" required>Signed invite token from the invitation link.</ParamField>
<ParamField body="auth_identity_id" type="string" required>Auth identity of the accepting user.</ParamField>
<ParamField body="member_id" type="string">Existing member id; when set, no auth metadata is written.</ParamField>
<ParamField body="first_name" type="string">First name for a newly created member.</ParamField>
<ParamField body="last_name" type="string">Last name for a newly created member.</ParamField>

## Result

<ResponseField name="result" type="MemberDTO">The member linked to the seller.</ResponseField>
