---
title: "Create a short-lived community gate code"
method: POST
path: "/community/invite-code"
---

# Create a short-lived community gate code

`POST /community/invite-code`

## Request

- Base URL: `https://superskill.sh/api`
- URL: `https://superskill.sh/api/community/invite-code`
- Auth: HTTP bearer

Auth required. Verifies the current user's entitlement before minting a signed short-lived code that can be pasted into a Discord or Telegram gate bot.

## Request body

- object
  - `harness` string: Harness ref as owner/name.
  - `owner` string
  - `repo` string
  - `version` string
  - `ttl_seconds` integer

## Response `201`

Community invite code minted

- CommunityInviteCode
  - `ok` boolean, required
  - `code` string, required
  - `owner` string, required
  - `repo` string, required
  - `version` string, required
  - `subject_type` 'user', required
  - `subject_id` string, required
  - `expires_at` string, date-time, required
  - `next` string, required

## Other responses

- `400`: Bad request
- `401`: Authorization required
- `402`: The authenticated user is not entitled to this paid harness
- `403`: Authorization was provided but is not allowed for this action
- `404`: Resource not found

---

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