Polyrankdocs
ApiReferral

PATCH /v1/referral/code

Set a custom referral code (must be available + appropriate).

PATCH
/v1/referral/code

Set a custom referral code (must be available + appropriate).

AuthorizationBearer <token>

API key: Authorization: Bearer pk_live_… (mint at polyrank.app/api-keys)

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/v1/referral/code" \  -H "Content-Type: application/json" \  -d '{    "code": "string"  }'
{  "ok": true,  "code": "string",  "link": "string"}
{  "error": "string",  "message": "string",  "reason": "string",  "issues": [    null  ],  "trace_id": "string"}
{  "error": "string",  "message": "string",  "reason": "string",  "issues": [    null  ],  "trace_id": "string"}
{  "error": "string",  "message": "string",  "reason": "string",  "issues": [    null  ],  "trace_id": "string"}
{  "error": "string",  "message": "string",  "reason": "string",  "issues": [    null  ],  "trace_id": "string"}
{  "error": "string",  "message": "string",  "reason": "string",  "issues": [    null  ],  "trace_id": "string"}
{  "error": "string",  "message": "string",  "reason": "string",  "issues": [    null  ],  "trace_id": "string"}
{  "error": "string",  "message": "string",  "reason": "string",  "issues": [    null  ],  "trace_id": "string"}