Program memberships

Creates a new membership with a given wallet_address, external_user_id, or both.

post

Invoke this endpoint to add a new membership to your loyalty program.

Authorizations
Body
family_member_birthdays[status]stringRequired

family member's membership status

family_member_birthdays[first_name]stringRequired

the first name of the family member

family_member_birthdays[birthday]stringRequired

the birthday of the family member

external_user_idstringOptional

the user's external_user_id (must be provided if wallet_address is blank)

wallet_addressstringOptional

the user's wallet_address (must be provided if external_user_id is blank)

emailstringOptional

the user's email address

phonestringOptional

the user's phone

birthdaystringOptional

The user's birthday

first_namestringOptional

The user's first name

last_namestringOptional

The user's last name

include_magic_linkbooleanOptional

Whether to return a magic link URL. Defaults to false.

family_member_birthdays[last_name]stringOptional

the last name of the family member

Responses
200
Membership was created successfully, or an existing membership was found
application/json
post
POST /partner-api/v2/program-memberships HTTP/1.1
Host: 
X-API-Key: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 337

"family_member_birthdays[status]='text'&family_member_birthdays[first_name]='text'&family_member_birthdays[birthday]='text'&external_user_id='text'&wallet_address='text'&email='text'&phone='text'&birthday='text'&first_name='text'&last_name='text'&include_magic_link=true&family_member_birthdays[last_name]='text'"
{
  "membership": {
    "id": "text",
    "external_user_id": "text",
    "wallet_address": "text",
    "profile_image": "text",
    "on_chain_token_id": "text",
    "created_at": 1,
    "social_media_credentials": {
      "twitter_username": "text",
      "instagram_username": "text",
      "tiktok_username": "text"
    },
    "family_member_birthdays": [
      "text"
    ]
  }
}

Endpoint to update a program membership with a wallet_address, on_chain_token_id, and/or external_user_id

patch

Sets a wallet_address, on_chain_token_id, and/or external_user_id on the specified program_membership.

Authorizations
Path parameters
program_membership_idnumberRequired
Body
family_member_birthdays[status]stringRequired

family member's membership status

family_member_birthdays[first_name]stringRequired

the first name of the family member

family_member_birthdays[birthday]stringRequired

the birthday of the family member

wallet_addressstringOptional

the wallet address to update the program membership with

on_chain_token_idstringOptional

the on chain token id to update the program membership with

external_user_idstringOptional

the external user id to update the program membership with

birthdaystringOptional

The user's birthday

first_namestringOptional

The user's first name

last_namestringOptional

The user's last name

emailstringOptional

the user's email address

phonestringOptional

the user's phone number

family_member_birthdays[last_name]stringOptional

the last name of the family member

Responses
200
Membership was updated with provided wallet_address, on_chain_token_id, and/or external_user_id
application/json
patch
PATCH /partner-api/v2/program-memberships/{program_membership_id} HTTP/1.1
Host: 
X-API-Key: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 338

"family_member_birthdays[status]='text'&family_member_birthdays[first_name]='text'&family_member_birthdays[birthday]='text'&wallet_address='text'&on_chain_token_id='text'&external_user_id='text'&birthday='text'&first_name='text'&last_name='text'&email='text'&phone='text'&family_member_birthdays[last_name]='text'"
200

Membership was updated with provided wallet_address, on_chain_token_id, and/or external_user_id

{
  "membership": {
    "id": "text",
    "external_user_id": "text",
    "wallet_address": "text",
    "profile_image": "text",
    "on_chain_token_id": "text",
    "created_at": 1,
    "social_media_credentials": {
      "twitter_username": "text",
      "instagram_username": "text",
      "tiktok_username": "text"
    },
    "family_member_birthdays": [
      "text"
    ]
  }
}