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

# Register a guest

> Registers a new guest or confirms an existing guest through a public form submission.



## OpenAPI

````yaml openapi.json post /v1/guests/register
openapi: 3.0.1
info:
  title: Envelope API
  description: >-
    Event management API for programmatically managing events, guests, and
    related resources.
  license:
    name: MIT
  contact:
    email: support@envelope.so
  version: 1.0.4
servers:
  - url: https://envelope.so/api
security:
  - api_key: []
tags:
  - name: Guests
    description: API for managing guests
  - name: Events
    description: API for managing events
paths:
  /v1/guests/register:
    post:
      tags:
        - Guests
      summary: Register a guest
      description: >-
        Registers a new guest or confirms an existing guest through a public
        form submission.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - eventId
                - formData
              properties:
                eventId:
                  type: string
                  description: ID of the event
                formData:
                  type: object
                  required:
                    - properties
                  properties:
                    properties:
                      type: object
                      required:
                        - email
                      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
                      additionalProperties: true
                    partners:
                      type: integer
                      description: Number of additional guests (+1, +2)
                      minimum: 0
                      maximum: 2
                    givenConsents:
                      type: array
                      items:
                        type: string
                      description: Array of consent IDs that the guest has given
                guestId:
                  type: string
                  description: ID of existing guest if updating
                pageId:
                  type: string
                  description: ID of the page containing the form
      responses:
        '200':
          description: Guest registered successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Guest'
        '400':
          description: Invalid request parameters or registration constraints not met.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: integer
                    example: 400
                  message:
                    type: string
                    example: Guest email is required
        '403':
          description: Event is full or registration not allowed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: integer
                    example: 403
                  message:
                    type: string
                    example: Event is full
        '404':
          description: Event, guest, or form section not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: integer
                    example: 404
                  message:
                    type: string
                    example: Event not found
components:
  schemas:
    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
          example:
            firstName: John
            lastName: Doe
            email: john@example.com
            lang: en
            X62TkjiV: My custom note
            yN9hzaCj: 1QLXYBlw
            Ybb48GO7:
              - 7bR7m2au
              - BdwYyYmi
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: x-api-key

````

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