Skip to main content
POST
curl
Units. amount on this request is in dollars (25 means $25.00). A program’s amount in every response is in cents (2500 means $25.00).
There is no sandbox. This adds a real person to a real program and uses one of your invitations. Test on a program you made for the purpose, with your own email addresses.
  • Uses one invitation from your plan, like adding someone in the dashboard.
  • Already in the program? You get their existing record back, no invitation is used and no email is sent. If your account is set up to allow the same person twice in a program, they’re added again.
  • No email unless you ask. Hoppier emails the person only when sendEmailAsUsersAreAdded is true. Otherwise, send them inviteUrl yourself. A scheduled invite email that your admins set up for the program still goes to everyone who hasn’t claimed yet, including people added here.
  • Retries. Send an Idempotency-Key so a retried request never adds anyone twice.

Authorizations

Authorization
string
header
required

Send your key in the Authorization header: Authorization: Bearer hk_live.…. The word Bearer is case-sensitive.

Keys are issued by Hoppier during the beta and shown once. Treat them like passwords and never put one in code that runs in a browser or an app.

Headers

Idempotency-Key
string<uuid>

A UUID you generate for this add. If the request fails or times out, send it again with the same key and body: Hoppier won't add the person twice.

  • Same key, same body, already finished: you get the original response again.
  • Same key, different body: 422 idempotency_key_reuse.
  • Same key while the first request is still running: 503 in_progress; retry after Retry-After.
  • The first request started more than 5 minutes ago and never finished: 409 request_outcome_unknown.

Keys are remembered for at least a day. Use a new key for each new add.

Body

application/json
program
string
required

Id of the program to add the person to. Starts with prg_.

Example:

"prg_Z8q3NnW2xK"

email
string<email>
required

The person's email address. Hoppier stores it in lowercase.

Example:

"ada@example.com"

firstName
string

The person's first name.

Example:

"Ada"

lastName
string

The person's last name. First and last name together can be at most 24 characters.

Example:

"Lovelace"

amount
number

This person's amount, in dollars (25 means $25.00), at most 500.

Only for programs where each person has their own amount, in accounts with custom program amounts turned on. Leave it out for a fixed-amount program: the program's amount applies, and sending one is refused.

Example:

25

sendEmailAsUsersAreAdded
boolean

true emails the person their invite now, using the program's "as users are added" invite email (if the program has none, nothing is sent). Leave it out to add them without an email. Send a JSON boolean: the string "false" counts as true.

Example:

false

Response

The participant: the new record, or the existing one if they were already in the program.

A person in a program.

id
string
required

The participant's id. Starts with pcpt_.

Example:

"pcpt_R4k1LmQ8vB"

object
string
required
Allowed value: "participant"
email
string<email>
required
Example:

"ada@example.com"

program
string
required

Id of the program. Starts with prg_.

Example:

"prg_Z8q3NnW2xK"

status
enum<string>
required

pending: invited, hasn't claimed yet. active: claimed. inactive: no longer active in the program.

Available options:
pending,
active,
inactive
firstName
string

First word of the person's name. Left out when no name was given.

Example:

"Ada"

lastName
string

Second word of the person's name. Left out when there isn't one.

Example:

"Lovelace"

inviteUrl
string<uri>

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.

publicInviteUrl
string<uri>

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.