# Class InviteCode | EchoHub Documentation
A registration invite code. When the server runs with Server:Registration = &quot;invite&quot;, new accounts (REST and IRC alike) require a valid, unexpired, not-fully-used code.

# Class InviteCode

Namespace
  EchoHub.Core.Models

Assembly
  EchoHub.Core.dll

A registration invite code. When the server runs with `Server:Registration = "invite"`, new accounts (REST and IRC alike) require a valid, unexpired, not-fully-used code.

    public class InviteCode

Inheritance
  object
  InviteCode

Inherited Members
  object.GetType()
  object.MemberwiseClone()
  object.ToString()
  object.Equals(object)
  object.Equals(object, object)
  object.ReferenceEquals(object, object)
  object.GetHashCode()

## Constructors

### InviteCode()

    public InviteCode()

## Properties

### Code

    public required string Code { get; set; }

#### Property Value

string

### CreatedAt

    public DateTimeOffset CreatedAt { get; set; }

#### Property Value

DateTimeOffset

### CreatedByUserId

    public Guid CreatedByUserId { get; set; }

#### Property Value

Guid

### CreatedByUsername

    public string CreatedByUsername { get; set; }

#### Property Value

string

### ExpiresAt

Null means the code never expires.

    public DateTimeOffset? ExpiresAt { get; set; }

#### Property Value

DateTimeOffset?

### Id

    public Guid Id { get; set; }

#### Property Value

Guid

### MaxUses

    public int MaxUses { get; set; }

#### Property Value

int

### UseCount

    public int UseCount { get; set; }

#### Property Value

int