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

# Invite users to an organization by email

> Invites multiple users to the organization by their email addresses. The authenticated user must be an owner or admin.
Returns results for each invitation attempt, including successes and failures.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/organizations/{org_id}/members/invite-by-email
openapi: 3.1.0
info:
  title: NEAR AI Cloud API
  description: >-
    NEAR AI Cloud API for private AI model inference and organization
    administration.
  contact:
    name: NEAR AI Team
    email: support@near.ai
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://cloud-api.near.ai
    description: NEAR AI Cloud
security:
  - session_token: []
  - api_key: []
tags:
  - name: Chat
    description: Chat completion endpoints for AI model inference
  - name: Images
    description: Image generation endpoints
  - name: Audio
    description: Audio transcription endpoints
  - name: Rerank
    description: Document reranking endpoints
  - name: Score
    description: Text similarity scoring endpoints
  - name: Privacy
    description: Privacy classification (PII span detection) endpoints
  - name: Models
    description: Public model catalog and information
  - name: Responses
    description: >-
      Stateless response inference (`store: false` only). Raw request/response
      content, response items, and history are not persisted. Clients must
      include any prior context in each request. Every successful Responses
      inference makes exactly one Chat Completions call. Only custom `function`
      tools are supported. They are client-managed: Cloud returns
      `function_call` items but never executes them; a later `store: false`
      request replays the individual call (the raw item from output is accepted)
      with its matching `function_call_output`, alongside caller-managed message
      history and the same function tool definitions. The minimal replay path
      also accepts assistant `message` text parts of type `output_text`, but not
      reasoning or arbitrary full `response.output` items. Server-executed tools
      (`web_search`, `web_context_search`, `file_search`, `code_interpreter`,
      `computer`, and remote `mcp`) and image-generation/editing models are
      rejected. The separate `POST /mcp` endpoint continues to expose its
      `web_search` tool independently of Responses; use `/v1/images/*` for image
      generation/editing. Existing completed-response gateway attestation is
      preserved best-effort: when the signature write succeeds, `GET
      /v1/signature/resp_*` retrieves signatures over SHA-256 request/response
      digests, never raw content. Interrupted streams create no `resp_*`
      attestation record or legacy disconnect fallback. Conversations, response
      history, and file input are rejected.
  - name: Organizations
    description: Organization management
  - name: Organization Members
    description: Organization member and invitation management
  - name: Workspaces
    description: Workspace and API key management
  - name: Users
    description: User profile and token management
  - name: Invitations
    description: Token-based invitation handling
  - name: Usage
    description: Usage tracking and billing information
  - name: Reporting
    description: Read-only customer usage reporting
  - name: Billing
    description: Billing costs endpoint (HuggingFace integration)
  - name: Staking Farm
    description: House of Stake farm credit configuration and synchronization
  - name: Health
    description: Health check endpoints
  - name: Attestation
    description: Attestation and verification endpoints
  - name: Gateway
    description: Model gateway integration endpoints
  - name: Admin
    description: Administrative endpoints (admin access required)
  - name: Services
    description: Public platform services (e.g. web_search pricing)
paths:
  /v1/organizations/{org_id}/members/invite-by-email:
    post:
      tags:
        - Organization Members
      summary: Invite users to an organization by email
      description: >-
        Invites multiple users to the organization by their email addresses. The
        authenticated user must be an owner or admin.

        Returns results for each invitation attempt, including successes and
        failures.
      operationId: invite_organization_member_by_email
      parameters:
        - name: org_id
          in: path
          description: Organization ID
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InviteOrganizationMemberByEmailRequest'
        required: true
      responses:
        '200':
          description: Invitation results (may include partial failures)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InviteOrganizationMemberByEmailResponse'
        '400':
          description: Bad request - empty invitation list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden - not an admin or owner
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - session_token: []
components:
  schemas:
    InviteOrganizationMemberByEmailRequest:
      type: object
      description: Request to invite organization members by email
      required:
        - invitations
      properties:
        invitations:
          type: array
          items:
            $ref: '#/components/schemas/InvitationEntry'
    InviteOrganizationMemberByEmailResponse:
      type: object
      description: Response for batch invitation requests
      required:
        - results
        - total
        - successful
        - failed
      properties:
        failed:
          type: integer
          minimum: 0
        results:
          type: array
          items:
            $ref: '#/components/schemas/InvitationResult'
        successful:
          type: integer
          minimum: 0
        total:
          type: integer
          minimum: 0
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
    InvitationEntry:
      type: object
      description: Individual invitation entry with email and role
      required:
        - email
        - role
      properties:
        email:
          type: string
        role:
          $ref: '#/components/schemas/MemberRole'
    InvitationResult:
      type: object
      description: Result of a single invitation attempt
      required:
        - email
        - success
        - email_sent
      properties:
        email:
          type: string
        email_error:
          type:
            - string
            - 'null'
        email_sent:
          type: boolean
        error:
          type:
            - string
            - 'null'
        member:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OrganizationMemberResponse'
        success:
          type: boolean
    ErrorDetail:
      type: object
      required:
        - message
        - type
      properties:
        code:
          type:
            - string
            - 'null'
        message:
          type: string
        param:
          type:
            - string
            - 'null'
        type:
          type: string
    MemberRole:
      type: string
      description: Member role enum for API
      enum:
        - owner
        - admin
        - member
    OrganizationMemberResponse:
      type: object
      description: Organization member response model (non-sensitive)
      required:
        - id
        - organization_id
        - user_id
        - role
        - joined_at
      properties:
        id:
          type: string
        invited_by:
          type:
            - string
            - 'null'
        joined_at:
          type: string
          format: date-time
        organization_id:
          type: string
        role:
          $ref: '#/components/schemas/MemberRole'
        user_id:
          type: string
  securitySchemes:
    session_token:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT access token for user authentication (Authorization: Bearer
        <jwt_token>). Create via POST /users/me/access_tokens.
    api_key:
      type: http
      scheme: bearer
      bearerFormat: api_key
      description: 'API key for programmatic access (Authorization: Bearer sk-<api_key>)'

````

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