---
title: "Create Invite Code"
method: POST
path: "/api/v1/invite-codes"
tags: ["Invite Codes", "invite-codes"]
---

# Create Invite Code

`POST /api/v1/invite-codes`

## Request

- Base URL: `https://app.aimrank.io` (the document declares no server; this is the origin it was published from)
- URL: `https://app.aimrank.io/api/v1/invite-codes`
- Auth: none declared

Create a new invite code for sharing.

## Request body

- CreateInviteCodeRequest
  - `scope_type` string, required
  - `ranking_id` string, nullable
  - `competition_id` string, nullable
  - `match_id` string, nullable
  - `access_type` string
  - `requires_registration` boolean
  - `max_uses` integer, nullable
  - `max_votes_per_user` integer
  - `expires_at` string, date-time, nullable
  - `custom_slug` string, nullable
  - `welcome_message` string, nullable

## Response `201`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/aimrank/apis/aimrank-api.md) · [All operations](https://skmtc.dev/aimrank/apis/aimrank-api/llms.txt) · [OpenAPI document](https://skmtc.dev/aimrank/apis/aimrank-api/revisions/3574d0aff459?raw)
