referrals

Create referral code

Create a referral code for the calling user. The code must be 3-30 alphanumeric characters; an optional name marks it as a campaign.

post/referral-codes

Request

  • Base URL: https://gamma-api.polymarket.com (the document declares no server; this is the origin it was published from)
  • URL: https://gamma-api.polymarket.com/referral-codes
  • Auth: one of:
    • API key in cookie polymarketsession
    • HTTP bearer

Request body

$schemastring uri

A URL to the JSON Schema for this object.

codestring

Referral code, 3-30 alphanumeric characters

namestring

Optional campaign name, 100 characters or fewer. Setting it marks the code as a campaign.

Example request

{
  "$schema": "https://example.com/schemas/ReferralCodePayload.json"
}

Response

Created

$schemastring uri

A URL to the JSON Schema for this object.

codestring
createdAtstring date-time
idstring required
isActiveboolean
isAdminboolean
namestring
updatedAtstring date-time
userIdinteger

Example response

{
  "$schema": "https://example.com/schemas/ReferralCode.json"
}

Changes

No recorded changes to this operation across all 1 revision of this API.