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

# Update a guest

> Updates guest information with partial modifications.



## OpenAPI

````yaml openapi.json patch /v1/guests/{_id}
openapi: 3.0.1
info:
  title: Attendu API
  description: >-
    Event management API for programmatically managing events, guests, and
    related resources.
  license:
    name: MIT
  contact:
    email: support@attendu.com
  version: 1.0.4
servers:
  - url: https://{workspace}.attendu.com/api
    variables:
      workspace:
        default: demo
        description: Subdomain of your workspace in lower-case (eg. apple)
security:
  - api_key: []
tags:
  - name: Guests
    description: API for managing guests
  - name: Events
    description: API for managing events
paths:
  /v1/guests/{_id}:
    patch:
      tags:
        - Guests
      summary: Update a guest
      description: Updates guest information with partial modifications.
      parameters:
        - name: _id
          in: path
          required: true
          description: Guest ID to update.
          schema:
            type: string
        - name: event
          in: query
          required: true
          description: Associated event ID.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GuestUpdate'
      responses:
        '200':
          description: Guest updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Guest'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
components:
  schemas:
    GuestUpdate:
      type: object
      properties:
        starred:
          type: boolean
          description: Indicates if the guest is starred
        status:
          type: object
          properties:
            confirmation:
              type: integer
              description: Confirmation status of the guest
            declineMessage:
              type: string
              description: Message from the guest when they declined the invitation
        properties:
          type: object
          description: >-
            Guest properties including default fields and any custom properties
            defined for the event
          properties:
            firstName:
              type: string
              description: First name of the guest
            lastName:
              type: string
              description: Last name of the guest
            email:
              type: string
              description: Email address of the guest
            lang:
              type: string
              description: Language of the guest
            ticketType:
              type: string
              description: Ticket type of the guest
        extras:
          type: object
          description: Optional additional guest data
          properties:
            roommates:
              type: array
              items:
                type: string
                description: Guest ID of a roommate
              description: Array of guest IDs who are roommates
    Guest:
      type: object
      required:
        - _id
        - event
        - status
        - properties
      properties:
        _id:
          type: string
          description: Guest ID
        event:
          type: string
          description: Event ID
        confirmedAt:
          type: string
          format: date-time
          nullable: true
          description: Date and time when the guest was confirmed
        attendedAt:
          type: string
          format: date-time
          nullable: true
          description: Date and time when the guest attended the event
        starred:
          type: boolean
          default: false
          description: Indicates if the guest is starred
        status:
          type: object
          required:
            - confirmation
            - attendance
            - givenConsents
            - visitedZones
          description: >-
            Guest status information including confirmation, attendance,
            consents and check-in details
          properties:
            confirmation:
              type: integer
              description: |-
                -1 = declined, 
                 0 = default, 
                 1 = confirmed, 
                 2 = confirmed + 1 partner, 
                 3 = confirmed + 2 partners
              default: 0
            attendance:
              type: integer
              description: |-
                0 = default, 
                 1 = attended, 
                 2 = attended + 1 partner, 
                 3 = attended + 2 partners
              default: 0
            declineMessage:
              type: string
              nullable: true
              description: Message from the guest when they declined the invitation
            givenConsents:
              type: array
              items:
                type: string
              description: Array of consents that the guest has given
              default: []
            visitedZones:
              type: array
              items:
                type: string
              description: Array of zone IDs that the guest has visited
              default: []
            addMethod:
              type: string
              enum:
                - batchImport
                - singleAdd
                - checkInAdd
                - publicRegistration
              description: Method used to add the guest to the event
            checkInMethod:
              type: string
              enum:
                - qrScan
                - manual
              nullable: true
              description: Method used to check in the guest
          example:
            confirmation: 2
            attendance: 1
            declineMessage: null
            givenConsents: []
            visitedZones: []
            addMethod: publicRegistration
            checkInMethod: qrScan
        properties:
          type: object
          required:
            - firstName
            - lastName
            - email
            - lang
          description: >-
            Guest properties including default required fields and any custom
            properties defined for the event
          properties:
            firstName:
              type: string
              description: First name of the guest
            lastName:
              type: string
              description: Last name of the guest
            email:
              type: string
              description: Email address of the guest
            lang:
              type: string
              description: Language of the guest
            ticketType:
              type: string
              description: Ticket type of the guest
          example:
            firstName: John
            lastName: Doe
            email: john@example.com
            lang: en
            X62TkjiV: My custom note
            yN9hzaCj: 1QLXYBlw
            Ybb48GO7:
              - 7bR7m2au
              - BdwYyYmi
            ticketType: QF78tnh3
        extras:
          type: object
          description: Optional additional guest data
          properties:
            roommates:
              type: array
              items:
                type: string
                description: Guest ID of a roommate
              description: Array of guest IDs who are roommates
            payment:
              type: object
              description: Ticket payment information
              properties:
                isPaid:
                  type: boolean
                  description: Indicates if the ticket has been paid
                paidAt:
                  type: string
                  format: date-time
                  description: Date and time when the ticket was paid
                stripePaymentIntent:
                  type: string
                  description: Stripe payment intent ID
                stripeInvoice:
                  type: string
                  description: Stripe invoice ID
                usedPromoCodes:
                  type: array
                  description: Array of promo codes used for this payment.
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        description: Unique identifier for the promo code (nanoid, 8 chars)
                      amount:
                        type: number
                        description: Discount amount for the promo code.
                      code:
                        type: string
                        description: Promo code (6 chars, uppercase, A-Z0-9)
                    required:
                      - id
                      - amount
                      - code
                  example:
                    - id: 43oMGCex
                      amount: 100
                      code: U2QWC8
          default: {}
          example:
            roommates:
              - 507f1f77bcf86cd799439011
              - 507f191e810c19729de860ea
            payment:
              isPaid: true
              paidAt: '2023-04-15T14:30:00Z'
              stripePaymentIntent: pi_3RJut1234567890
              stripeInvoice: in_1RJutEIz1234567890
              usedPromoCodes:
                - id: 43oMGCex
                  amount: 100
                  code: U2QWC8
  responses:
    UnauthorizedError:
      description: Invalid or missing API key.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: integer
                example: 401
              message:
                type: string
                example: Invalid API key.
    NotFoundError:
      description: Requested resource not found.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: integer
                example: 404
              message:
                type: string
                example: Resource not found.
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: x-api-key

````