curl --request GET \
--url https://app.hoppier.com/api/v1/participants \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.hoppier.com/api/v1/participants', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hoppier.com/api/v1/participants"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)[
{
"id": "pcpt_R4k1LmQ8vB",
"object": "participant",
"email": "ada@example.com",
"firstName": "Ada",
"lastName": "Lovelace",
"program": "prg_Z8q3NnW2xK",
"status": "active"
},
{
"id": "pcpt_9Lq2XmV7cD",
"object": "participant",
"email": "grace@example.com",
"firstName": "Grace",
"lastName": "Hopper",
"program": "prg_Z8q3NnW2xK",
"status": "pending"
}
]List participants
Returns a program’s participants, a page at a time, oldest first. The key’s owner must be an admin of the company who manages the program.
curl --request GET \
--url https://app.hoppier.com/api/v1/participants \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.hoppier.com/api/v1/participants', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hoppier.com/api/v1/participants"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)[
{
"id": "pcpt_R4k1LmQ8vB",
"object": "participant",
"email": "ada@example.com",
"firstName": "Ada",
"lastName": "Lovelace",
"program": "prg_Z8q3NnW2xK",
"status": "active"
},
{
"id": "pcpt_9Lq2XmV7cD",
"object": "participant",
"email": "grace@example.com",
"firstName": "Grace",
"lastName": "Hopper",
"program": "prg_Z8q3NnW2xK",
"status": "pending"
}
]- Paging. Send the last
idof a page asstartingAfterto get the next page. There’s no “has more” flag: you’ve reached the end when a page has fewer thanlimitparticipants. - Backwards.
endingBeforereturns the participants added before that id, newest first. - Order. Participants come back in the order they were added, so paging never skips or repeats anyone.
- No invite links. Lists don’t include
inviteUrlorpublicInviteUrl. You get those when you add someone.
Authorizations
Send your key in the Authorization header: Authorization: Bearer hk_live.…. The word Bearer is case-sensitive.
Keys are shown once. Treat them like passwords and never put one in code that runs in a browser or an app.
Query Parameters
The program's id. Starts with prg_.
all: pending, active and inactive participants. onboarded: people who have claimed their reward. pending: people who haven't claimed it yet.
all, onboarded, pending How many participants to return, from 1 to 100.
1 <= x <= 100A participant id (pcpt_…). Returns the participants added after it, oldest first. Not with endingBefore.
A participant id (pcpt_…). Returns the participants added before it, newest first. Not with startingAfter.
Response
A page of participants. Fewer than limit means it's the last page.
The participant's id. Starts with pcpt_.
"pcpt_R4k1LmQ8vB"
"participant""ada@example.com"
Id of the program. Starts with prg_.
"prg_Z8q3NnW2xK"
pending: invited, hasn't claimed yet. active: claimed. inactive: no longer active in the program.
pending, active, inactive First word of the person's name. Left out when no name was given.
"Ada"
Second word of the person's name. Left out when there isn't one.
"Lovelace"
The link the person opens to claim their reward: Hoppier's sign-up page, or the sign-in page if they already have an account. Valid for 30 days. Anyone who has it can use it, so send it only to that person. Only in the response to adding someone, not in lists.
Only for accounts with public program links turned on: the program's public join link. It's the same for everyone in the program, and anyone who has it can join. Valid for 90 days. Only in the response to adding someone, not in lists.