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

# Accept Team Invite New Account

> Accept a team invite by creating an account for the invited address.

Creates an account for the address the invite was sent to, with that
address already verified and the given `password` (at least 8
characters), adds it to the team and signs it in: the response is the
same access + refresh pair login returns. The account gets no team of its
own; the invited team is its default. Sets an HttpOnly refresh cookie when
the request originates from a configured platform origin.

If an account already exists for the address, 409
`team_invite_sign_in_required`: sign in and accept with
`POST /api/auth/team-invites/accept`. An account that was registered but
never verified its email is instead taken over by the invite's recipient:
everything set on it before (its password, sessions, API keys and
platform OAuth grants) stops working, the new password is set and the
address is verified.

An unknown, expired, revoked or already used invite returns 404
`team_invite_invalid`.



## OpenAPI

````yaml /openapi/mio-openapi.json post /api/v1/auth/team-invites/accept-new
openapi: 3.1.0
info:
  description: >-
    Production API reference for Membership.io. Use the authored guides for
    workflows and the generated endpoint pages for exact parameters and schemas.
  title: Membership.io API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.member.dev
security:
  - bearerAuth: []
paths:
  /api/v1/auth/team-invites/accept-new:
    post:
      tags:
        - auth
      summary: Accept Team Invite New Account
      description: >-
        Accept a team invite by creating an account for the invited address.


        Creates an account for the address the invite was sent to, with that

        address already verified and the given `password` (at least 8

        characters), adds it to the team and signs it in: the response is the

        same access + refresh pair login returns. The account gets no team of
        its

        own; the invited team is its default. Sets an HttpOnly refresh cookie
        when

        the request originates from a configured platform origin.


        If an account already exists for the address, 409

        `team_invite_sign_in_required`: sign in and accept with

        `POST /api/auth/team-invites/accept`. An account that was registered but

        never verified its email is instead taken over by the invite's
        recipient:

        everything set on it before (its password, sessions, API keys and

        platform OAuth grants) stops working, the new password is set and the

        address is verified.


        An unknown, expired, revoked or already used invite returns 404

        `team_invite_invalid`.
      operationId: auth.post_auth_post_auth_team_invites_accept_new
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/TeamInviteAcceptNewRequest'
        required: true
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
          description: Successful Response
        '404':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: >-
            Invite unknown, expired, revoked or already used
            (`team_invite_invalid`)
        '409':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: >-
            An account already exists for the invited address; sign in and use
            `POST /api/auth/team-invites/accept`
            (`team_invite_sign_in_required`)
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Malformed body
        '429':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Rate limited
components:
  schemas:
    TeamInviteAcceptNewRequest:
      additionalProperties: false
      properties:
        first_name:
          anyOf:
            - maxLength: 100
              minLength: 1
              type: string
            - type: 'null'
          title: First Name
        last_name:
          anyOf:
            - maxLength: 100
              minLength: 1
              type: string
            - type: 'null'
          title: Last Name
        password:
          maxLength: 4096
          minLength: 8
          title: Password
          type: string
        token:
          maxLength: 512
          minLength: 1
          title: Token
          type: string
      required:
        - token
        - password
      title: TeamInviteAcceptNewRequest
      type: object
    TokenResponse:
      properties:
        access_token:
          title: Access Token
          type: string
        expires_in:
          title: Expires In
          type: integer
        refresh_token:
          title: Refresh Token
          type: string
        token_type:
          default: Bearer
          title: Token Type
          type: string
      required:
        - access_token
        - refresh_token
        - expires_in
      title: TokenResponse
      type: object
    JsonApiErrorResponse:
      description: Error JSON:API response.
      properties:
        errors:
          items:
            $ref: '#/components/schemas/JsonApiError'
          title: Errors
          type: array
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
      required:
        - errors
      title: JsonApiErrorResponse
      type: object
    JsonApiError:
      properties:
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
        source:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Source
        status:
          title: Status
          type: string
        title:
          title: Title
          type: string
      required:
        - status
        - title
      title: JsonApiError
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT or mio_sk API key
      description: >-
        Send platform JWTs, contact JWTs, or team API keys as `Authorization:
        Bearer <token>`.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.