---
title: "Create my referral code"
method: POST
path: "/api/invites/me"
tags: ["User"]
---

# Create my referral code

`POST /api/invites/me`

## Request

- Base URL: `https://app.d-sports.org`
- URL: `https://app.d-sports.org/api/invites/me`
- Auth: HTTP bearer

Same as GET — first tap of Invite friends creates the row.

## Response `200`

{ success, data: InviteMeView }

- InviteMeSuccess
  - `success` true, required
  - `data` InviteMeView, required
    - `code` string, required
    - `url` string, required
    - `usedCount` integer, required
    - `nextThreshold` integer, nullable, required
    - `grants` integer[], required

## Other responses

- `401`: Authentication required

## Changes

- **2026-09-24** `01971acf764b`: 2 info
  - added the media type `application/json` for the response with the status `200`
  - added the non-success response with the status `401`
- **2026-09-12** `c191eafc1801`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/d-sports-ecosystem/apis/d-sports-api/changes/api/invites/me/post.md)

---

[API](https://skmtc.dev/d-sports-ecosystem/apis/d-sports-api.md) - [All operations](https://skmtc.dev/d-sports-ecosystem/apis/d-sports-api/llms.txt) - [OpenAPI document](https://skmtc.dev/d-sports-ecosystem/apis/d-sports-api/revisions/63735cf90a04?raw)
