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

# Create Invite

> Invite a user to an organization. If the user isn't already registered with Turso, they will receive a signup link. If an existing pending invite exists for the same email, it will be replaced.

<Warning>Invites are limited to scaler plan and above.</Warning>

<Info>
  You can invite by **email** or by **username** — provide exactly one. When inviting by username, the invite is sent to that user's registered email.
</Info>

<Info>
  You must be an `owner` or `admin` to invite other users. **You can only invite users to a team and not your personal account.**
</Info>

<Info>
  If a pending invite already exists for the same email, it will be replaced with a new one.
</Info>

<RequestExample>
  ```bash Invite by email theme={null}
  curl -L -X POST https://api.turso.tech/v2/organizations/{organizationSlug}/invites \
    -H 'Authorization: Bearer TOKEN' \
    -H 'Content-Type: application/json' \
    -d '{"email": "user@example.com", "role": "member"}'
  ```

  ```bash Invite by username theme={null}
  curl -L -X POST https://api.turso.tech/v2/organizations/{organizationSlug}/invites \
    -H 'Authorization: Bearer TOKEN' \
    -H 'Content-Type: application/json' \
    -d '{"username": "turso-user", "role": "member"}'
  ```

  ```ts Node.js theme={null}
  import { createClient } from "@tursodatabase/api";

  const turso = createClient({
    org: "mycompany",
    token: "",
  });

  const invite = await turso.organizations.inviteUser(
    "user@example.com",
    "member"
  );
  ```
</RequestExample>


## OpenAPI

````yaml POST /v2/organizations/{organizationSlug}/invites
openapi: 3.0.1
info:
  title: Turso Platform API
  description: API description here
  license:
    name: MIT
  version: 0.1.0
servers:
  - url: https://api.turso.tech
    description: Turso's Platform API
security: []
paths:
  /v2/organizations/{organizationSlug}/invites:
    post:
      summary: Invite Organization Member
      description: >-
        Invite a user to an organization. If the user isn't already registered
        with Turso, they will receive a signup link. If an existing pending
        invite exists for the same email, it will be replaced.
      operationId: inviteOrganizationMemberV2
      parameters:
        - $ref: '#/components/parameters/organizationSlug'
      requestBody:
        description: >-
          The user you want to invite to join Turso, and your organization.
          Provide exactly one of email or username.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: >-
                    The email of the user you want to invite. Exactly one of
                    email or username must be provided.
                username:
                  type: string
                  description: >-
                    The username of an existing Turso user you want to invite.
                    Exactly one of email or username must be provided.
                role:
                  type: string
                  enum:
                    - admin
                    - member
                    - viewer
                  description: The role given to the user.
                  default: member
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  invited:
                    $ref: '#/components/schemas/InviteCreatedV2'
components:
  parameters:
    organizationSlug:
      in: path
      name: organizationSlug
      required: true
      schema:
        type: string
      description: The slug of the organization or user account.
  schemas:
    InviteCreatedV2:
      type: object
      properties:
        email:
          type: string
          description: The email of the person invited.
          example: iku@turso.tech
        role:
          type: string
          enum:
            - admin
            - member
            - viewer
          description: The assigned role for the invited user.
          example: member
        organization:
          type: string
          description: The name of the organization the user was invited to.
          example: mycompany

````