---
title: "POST /affiliates/referralCode"
method: POST
path: "/affiliates/referralCode"
---

# POST /affiliates/referralCode

`POST /affiliates/referralCode`

## Request body

- object
  - `newCode` string, required
  - `address` string, required

## Response `200`

Ok

- CreateReferralCodeResponse
  - `referralCode` string, required

## Changes

> 50 revisions in range; 1 could not be searched.

- **2025-07-22** `3ff2d5da9736` — 1 info
  - endpoint added
- **2024-05-14** `90fd32395633` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/dydxprotocol/apis/indexer-api/changes/affiliates/referralCode/post.md)

---

[API](https://skmtc.dev/dydxprotocol/apis/indexer-api.md) · [All operations](https://skmtc.dev/dydxprotocol/apis/indexer-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/dydxprotocol/indexer-api/revisions/5005547cef75/schema)
