# Class InvitesController | EchoHub Documentation
Invite-code management for invite-gated registration (Admin+ only). Codes live in this server's own database — there is no central service.

# Class InvitesController

Namespace
  EchoHub.Server.Controllers

Assembly
  EchoHub.Server.dll

Invite-code management for invite-gated registration (Admin+ only). Codes live in this server's own database — there is no central service.

    [ApiController]
    [Route("api/invites")]
    [Authorize]
    [EnableRateLimiting("general")]
    public class InvitesController : ControllerBase

Inheritance
  object
  ControllerBase
  InvitesController

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

## Constructors

### InvitesController(EchoHubDbContext, ILogger<InvitesController>)

    public InvitesController(EchoHubDbContext db, ILogger<InvitesController> logger)

#### Parameters

`db` EchoHubDbContext
`logger` ILogger<InvitesController>

## Methods

### Create(CreateInviteRequest)

    [HttpPost]
    public Task<IActionResult> Create(CreateInviteRequest request)

#### Parameters

`request` CreateInviteRequest

#### Returns

Task<IActionResult>

### List()

    [HttpGet]
    public Task<IActionResult> List()

#### Returns

Task<IActionResult>

### Revoke(string)

    [HttpDelete("{code}")]
    public Task<IActionResult> Revoke(string code)

#### Parameters

`code` string

#### Returns

Task<IActionResult>