> ## 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.

# Update Invite Status

> Update the status of an invite

This endpoint allows you to change the status of an invitation. Use it to manually update an invitation's status when needed, such as marking it as accepted or rejected.

**What it does:**

* Changes the status of a specific invitation
* Updates the invitation record with the new status
* Records the time of the status change

**When to use it:**

* When manually updating an invitation based on an RSVP
* If an attendee contacts you directly to accept or decline
* When you need to override an invitation status
* For administrative management of invitations

## Path Parameters

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

## Request Body

The request body should include the new status for the invite:

```json theme={null}
{
  "status": "accepted"
}
```

| Field    | Type   | Required | Description                                                                              |
| -------- | ------ | -------- | ---------------------------------------------------------------------------------------- |
| `status` | string | Yes      | The new status of the invite. Options include: "pending", "sent", "accepted", "rejected" |

## Response

The API returns the updated invite object with all its details:

```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",
  "image": "https://example.com/profile-photos/john-doe.jpg",
  "status": "accepted",
  "created_at": "2023-02-28T12:00:00Z",
  "updated_at": "2023-03-01T09:30:00Z",
  "last_seen": null,
  "onyxplus_id": "onyx-123",
  "ticket_id": "ticket-456"
}
```

**Status meanings:**

* `pending`: The invitation has been created but not sent
* `sent`: The invitation has been sent but not yet responded to
* `accepted`: The invitee has accepted the invitation
* `rejected`: The invitee has declined the invitation

**Note:** The `updated_at` field will automatically be set to the current time when you change the status.


## OpenAPI

````yaml PUT /events/{event_id}/invites/{invite_id}
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/{invite_id}:
    put:
      summary: Update Invite Status
      description: Update the status of an invite
      operationId: update_invite_status_events__event_id__invites__invite_id__put
      parameters:
        - name: event_id
          in: path
          required: true
          schema:
            type: string
            title: Event Id
        - name: invite_id
          in: path
          required: true
          schema:
            type: string
            title: Invite Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InviteStatusUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invite'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    InviteStatusUpdate:
      properties:
        status:
          $ref: '#/components/schemas/InviteStatus'
      type: object
      required:
        - status
      title: InviteStatusUpdate
    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
    InviteStatus:
      type: string
      enum:
        - pending
        - sent
        - accepted
        - rejected
      title: InviteStatus
    CountryCodeSimple:
      type: string
      enum:
        - '1'
        - '44'
        - '1'
        - '61'
        - '91'
        - '345'
      title: CountryCodeSimple
    AuthenticationMethod:
      type: string
      enum:
        - QR Code
        - Biometric
        - Both
      title: AuthenticationMethod
    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.

````