v1

latestOpenAPI 3.1.02026-07-265817860.8 KB
referrals

Create or fetch a referral code for a customer in a referral program.

post/v1/referrals.create_code

Headers

x-api-versionstring required

Request body

customer_idstring required

The unique identifier of the customer

program_idstring required

ID of your referral program

Example request

{
  "customer_id": "cus_123",
  "program_id": "prog_123"
}

Response

OK

codestring required

The referral code that can be shared with customers

customer_idstring required

Your unique identifier for the customer

created_atnumber required

The timestamp of when the referral code was created

Example response

{
  "code": "<string>",
  "customer_id": "<string>",
  "created_at": 123
}