> ## 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 members by email

> Invites up to 100 people by email address. The response reports each invitation separately. Owners and admins only.



## OpenAPI

````yaml /api-reference/cloud-platform-openapi.json post /v1/organizations/{org_id}/members/invite-by-email
openapi: 3.1.0
info:
  description: Account, organization, workspace and billing routes of NEAR AI Cloud.
  title: NEAR AI Cloud Platform API
  version: '5'
servers:
  - url: https://cloud-platform.near.ai
    description: NEAR AI Cloud Platform
security: []
paths:
  /v1/organizations/{org_id}/members/invite-by-email:
    post:
      tags:
        - Members
      summary: Invite members by email
      description: >-
        Invites up to 100 people by email address. The response reports each
        invitation separately. Owners and admins only.
      operationId: invite_members_by_email
      parameters:
        - description: The organization id (a UUID).
          in: path
          name: org_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InviteOrganizationMemberByEmailRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InviteOrganizationMemberByEmailResponse'
          description: The result of each invitation.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: The request is invalid.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Missing or invalid credential.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: The caller is not allowed to do this.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal error.
      security:
        - session: []
components:
  schemas:
    InviteOrganizationMemberByEmailRequest:
      description: Request to invite organization members by email
      properties:
        invitations:
          description: Between 1 and 100 invitations.
          items:
            $ref: '#/components/schemas/InvitationEntry'
          type: array
      required:
        - invitations
      type: object
    InviteOrganizationMemberByEmailResponse:
      description: Response for batch invitation requests
      properties:
        failed:
          description: Number of invitations that were not created.
          minimum: 0
          type: integer
        results:
          description: One result per invitation, in request order.
          items:
            $ref: '#/components/schemas/InvitationResult'
          type: array
        successful:
          description: Number of invitations created.
          minimum: 0
          type: integer
        total:
          description: Number of invitations in the request.
          minimum: 0
          type: integer
      required:
        - results
        - total
        - successful
        - failed
      type: object
    ErrorResponse:
      description: The body of every error answer on the user routes.
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
      required:
        - error
      type: object
    InvitationEntry:
      description: 'One invitation: the invitee''s email address and the role offered.'
      properties:
        email:
          description: The invitee's email address, up to 255 characters.
          type: string
        role:
          $ref: '#/components/schemas/MemberRole'
          description: The role the invitee receives on accepting.
      required:
        - email
        - role
      type: object
    InvitationResult:
      description: Result of a single invitation attempt
      properties:
        email:
          description: The invited email address.
          type: string
        email_sent:
          description: Whether the invitation email was sent.
          type: boolean
        error:
          description: Why the invitation was not created, when `success` is false.
          type:
            - string
            - 'null'
        member:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OrganizationMemberResponse'
              description: >-
                The new member, when the invitee already had an account and was
                added at once.
        success:
          description: Whether the invitation was created.
          type: boolean
      required:
        - email
        - success
        - email_sent
      type: object
    ErrorDetail:
      properties:
        code:
          type:
            - string
            - 'null'
        message:
          type: string
        param:
          type:
            - string
            - 'null'
        type:
          type: string
      required:
        - message
        - type
      type: object
    MemberRole:
      description: Member role enum for API
      enum:
        - owner
        - admin
        - member
      type: string
    OrganizationMemberResponse:
      description: An organization member.
      properties:
        id:
          type: string
        joined_at:
          format: date-time
          type: string
        organization_id:
          type: string
        role:
          $ref: '#/components/schemas/MemberRole'
        user_id:
          type: string
      required:
        - id
        - organization_id
        - user_id
        - role
        - joined_at
      type: object
  securitySchemes:
    session:
      bearerFormat: Session token
      description: 'Session token from signing in, sent as `Authorization: Bearer <token>`.'
      scheme: bearer
      type: http

````

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