> ## Documentation Index
> Fetch the complete documentation index at: https://openai-hd4n6.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create invite

> Create an invite for a user to the organization. The invite must be accepted by the user before they have access to the organization.



## OpenAPI

````yaml api-definition.yaml post /organization/invites
openapi: 3.0.0
info:
  title: OpenAI API
  description: >-
    The OpenAI REST API. Please see
    https://platform.openai.com/docs/api-reference for more details.
  version: 2.3.0
  termsOfService: https://openai.com/policies/terms-of-use
  contact:
    name: OpenAI Support
    url: https://help.openai.com/
  license:
    name: MIT
    url: https://github.com/openai/openai-openapi/blob/master/LICENSE
servers:
  - url: https://api.openai.com/v1
security:
  - ApiKeyAuth: []
tags:
  - name: Assistants
    description: Build Assistants that can call models and use tools.
  - name: Audio
    description: Turn audio into text or text into audio.
  - name: Chat
    description: >-
      Given a list of messages comprising a conversation, the model will return
      a response.
  - name: Completions
    description: >-
      Given a prompt, the model will return one or more predicted completions,
      and can also return the probabilities of alternative tokens at each
      position.
  - name: Embeddings
    description: >-
      Get a vector representation of a given input that can be easily consumed
      by machine learning models and algorithms.
  - name: Evals
    description: Manage and run evals in the OpenAI platform.
  - name: Fine-tuning
    description: Manage fine-tuning jobs to tailor a model to your specific training data.
  - name: Batch
    description: Create large batches of API requests to run asynchronously.
  - name: Files
    description: >-
      Files are used to upload documents that can be used with features like
      Assistants and Fine-tuning.
  - name: Uploads
    description: Use Uploads to upload large files in multiple parts.
  - name: Images
    description: Given a prompt and/or an input image, the model will generate a new image.
  - name: Models
    description: List and describe the various models available in the API.
  - name: Moderations
    description: >-
      Given text and/or image inputs, classifies if those inputs are potentially
      harmful.
  - name: Audit Logs
    description: List user actions and configuration changes within this organization.
paths:
  /organization/invites:
    post:
      tags:
        - Invites
      summary: Create invite
      description: >-
        Create an invite for a user to the organization. The invite must be
        accepted by the user before they have access to the organization.
      operationId: inviteUser
      requestBody:
        description: The invite request payload.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InviteRequest'
      responses:
        '200':
          description: User invited successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invite'
components:
  schemas:
    InviteRequest:
      type: object
      properties:
        email:
          type: string
          description: Send an email to this address
        role:
          type: string
          enum:
            - reader
            - owner
          description: '`owner` or `reader`'
        projects:
          type: array
          description: >-
            An array of projects to which membership is granted at the same time
            the org invite is accepted. If omitted, the user will be invited to
            the default project for compatibility with legacy behavior.
          items:
            type: object
            properties:
              id:
                type: string
                description: Project's public ID
              role:
                type: string
                enum:
                  - member
                  - owner
                description: Project membership role
            required:
              - id
              - role
      required:
        - email
        - role
    Invite:
      type: object
      description: Represents an individual `invite` to the organization.
      properties:
        object:
          type: string
          enum:
            - organization.invite
          description: The object type, which is always `organization.invite`
          x-stainless-const: true
        id:
          type: string
          description: The identifier, which can be referenced in API endpoints
        email:
          type: string
          description: The email address of the individual to whom the invite was sent
        role:
          type: string
          enum:
            - owner
            - reader
          description: '`owner` or `reader`'
        status:
          type: string
          enum:
            - accepted
            - expired
            - pending
          description: '`accepted`,`expired`, or `pending`'
        invited_at:
          type: integer
          description: The Unix timestamp (in seconds) of when the invite was sent.
        expires_at:
          type: integer
          description: The Unix timestamp (in seconds) of when the invite expires.
        accepted_at:
          type: integer
          description: The Unix timestamp (in seconds) of when the invite was accepted.
        projects:
          type: array
          description: >-
            The projects that were granted membership upon acceptance of the
            invite.
          items:
            type: object
            properties:
              id:
                type: string
                description: Project's public ID
              role:
                type: string
                enum:
                  - member
                  - owner
                description: Project membership role
      required:
        - object
        - id
        - email
        - role
        - status
        - invited_at
        - expires_at
      x-oaiMeta:
        name: The invite object
        example: |
          {
            "object": "organization.invite",
            "id": "invite-abc",
            "email": "user@example.com",
            "role": "owner",
            "status": "accepted",
            "invited_at": 1711471533,
            "expires_at": 1711471533,
            "accepted_at": 1711471533,
            "projects": [
              {
                "id": "project-xyz",
                "role": "member"
              }
            ]
          }
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer

````