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

# Create Invites

> Create a batch of invites for an event

This endpoint sends invitations to people for your event. Unlike public events, Securegate focuses on controlled access - only invited and verified attendees can enter your event.

**What it does:**

* Sends invitations to multiple people at once
* Generates unique invitation codes for each person
* Sets up the identity verification process for attendees
* Allows you to customize the security level required (simple authentication or full KYC)

**When to use it:**

* When you've created an event and are ready to invite attendees
* To send secure invitations that require identity verification
* When planning events with restricted access requirements

## Path Parameters

| Parameter  | Type   | Required | Description                        |
| ---------- | ------ | -------- | ---------------------------------- |
| `event_id` | string | Yes      | The unique identifier of the event |

## Query Parameters

| Parameter              | Type    | Required | Description                                                                                                                                                                                                    |
| ---------------------- | ------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `onboarding_flow_type` | string  | No       | The level of verification required. Options: "only\_auth" (basic facial recognition), "kyc" (full identity verification), "ssn\_verification", "peps\_sanctions", "criminal\_check" (advanced security checks) |
| `notify`               | integer | No       | Whether to send email notifications automatically. Defaults to 2                                                                                                                                               |

## Request Body

The request body should include an array of invite objects:

```json theme={null}
{
  "invites": [
    {
      "first_name": "John",
      "last_name": "Doe",
      "email": "john.doe@example.com",
      "country_code": "1",
      "mobile_number": "5551234567",
      "authentication_method": "QR Code"
    },
    {
      "first_name": "Jane",
      "last_name": "Smith",
      "email": "jane.smith@example.com",
      "country_code": "1",
      "mobile_number": "5559876543",
      "authentication_method": "Biometric"
    }
  ]
}
```

**Authentication methods:**

* `QR Code`: Attendees will verify with a QR code (simpler)
* `Biometric`: Attendees will verify with facial recognition (more secure)
* `Both`: Attendees will need both QR and facial recognition (highest security)

## Response

The API returns an array of created invite objects with all their details, including generated invite IDs:

```json theme={null}
[
  {
    "id": "invite-123",
    "first_name": "John",
    "last_name": "Doe",
    "email": "john.doe@example.com",
    "country_code": "1",
    "mobile_number": "5551234567",
    "authentication_method": "QR Code",
    "event_id": "event-456",
    "session_code": "ABC123",
    "session_id": "session-789",
    "status": "pending",
    "created_at": "2023-02-28T12:00:00Z",
    "updated_at": "2023-02-28T12:00:00Z"
  },
  {
    "id": "invite-124",
    "first_name": "Jane",
    "last_name": "Smith",
    "email": "jane.smith@example.com",
    "country_code": "1",
    "mobile_number": "5559876543",
    "authentication_method": "Biometric",
    "event_id": "event-456",
    "session_code": "DEF456",
    "session_id": "session-790",
    "status": "pending",
    "created_at": "2023-02-28T12:01:00Z",
    "updated_at": "2023-02-28T12:01:00Z"
  }
]
```

**Note:** After sending invites, you can track their status (pending, sent, accepted, rejected) using the [Get Invites](/api-reference/endpoint/get-invites) endpoint.


## OpenAPI

````yaml POST /events/{event_id}/invites
openapi: 3.1.0
info:
  title: Securegate.ai API
  version: 0.1.0
servers:
  - url: https://api.securegate.ai
    description: Production environment
security:
  - ApiKeyAuth: []
paths:
  /events/{event_id}/invites:
    post:
      summary: Create Invites
      description: Create a batch of invites for an event
      operationId: create_invites_events__event_id__invites_post
      parameters:
        - name: event_id
          in: path
          required: true
          schema:
            type: string
            title: Event Id
        - name: onboarding_flow_type
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/OnboardingFlow'
            default: only_auth
        - name: notify
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            default: 2
            title: Notify
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InviteBatchRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Invite'
                title: Response Create Invites Events  Event Id  Invites Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    OnboardingFlow:
      type: string
      enum:
        - only_auth
        - kyc
        - ssn_verification
        - peps_sanctions
        - criminal_check
      title: OnboardingFlow
    InviteBatchRequest:
      properties:
        invites:
          items:
            $ref: '#/components/schemas/InviteCreate'
          type: array
          title: Invites
      type: object
      required:
        - invites
      title: InviteBatchRequest
    Invite:
      properties:
        first_name:
          type: string
          title: First Name
        last_name:
          type: string
          title: Last Name
        email:
          type: string
          title: Email
        country_code:
          $ref: '#/components/schemas/CountryCodeSimple'
        mobile_number:
          type: string
          title: Mobile Number
        authentication_method:
          $ref: '#/components/schemas/AuthenticationMethod'
        id:
          type: string
          title: Id
        event_id:
          type: string
          title: Event Id
        session_code:
          type: string
          title: Session Code
        image:
          anyOf:
            - type: string
            - type: 'null'
          title: Image
        session_id:
          type: string
          title: Session Id
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        last_seen:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Seen
        onyxplus_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Onyxplus Id
        ticket_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Ticket Id
        status:
          $ref: '#/components/schemas/InviteStatus'
          default: pending
      type: object
      required:
        - first_name
        - last_name
        - email
        - country_code
        - mobile_number
        - authentication_method
        - id
        - event_id
        - session_code
        - session_id
        - created_at
        - updated_at
      title: Invite
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    InviteCreate:
      properties:
        first_name:
          type: string
          title: First Name
        last_name:
          type: string
          title: Last Name
        email:
          type: string
          title: Email
        country_code:
          $ref: '#/components/schemas/CountryCodeSimple'
        mobile_number:
          type: string
          title: Mobile Number
        authentication_method:
          $ref: '#/components/schemas/AuthenticationMethod'
      type: object
      required:
        - first_name
        - last_name
        - email
        - country_code
        - mobile_number
        - authentication_method
      title: InviteCreate
    CountryCodeSimple:
      type: string
      enum:
        - '1'
        - '44'
        - '1'
        - '61'
        - '91'
        - '345'
      title: CountryCodeSimple
    AuthenticationMethod:
      type: string
      enum:
        - QR Code
        - Biometric
        - Both
      title: AuthenticationMethod
    InviteStatus:
      type: string
      enum:
        - pending
        - sent
        - accepted
        - rejected
      title: InviteStatus
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key authentication. Add your API key as the value of the 'x-api-key'
        header.

````