Add Participant
growsurf_add_participantAdd or fetch a participant by email. Existing participants are returned unchanged. This is trusted direct enrollment and bypasses the public application review flow for affiliates. For affiliate programs, set isAffiliate to true to enroll a new participant as approved or false to create a non-affiliate. If you omit it, a valid referredBy creates a referred non-affiliate; without a valid referrer, the new participant is enrolled as approved. A valid referredBy can be combined with isAffiliate: true. Targets campaignId if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Yes | |||
| language | No | The language of the participant's portal and program emails. Must be one of the program's languages (`languages` in `growsurf_get_campaign_options`); any other code returns a `400`. Applies only when this call creates the participant. Omit it or send `null` to use the program's base language. Supported codes: `en`, `es`, `fr`, `de`, `it`, `pt-BR`, `nl`, `pl`, `sv`, `tr`, `ja`, `ko`, `zh-CN`, `id`, `da`, `nb`, `nn`, `fi`, `is`, `cs`, `sk`, `hu`, `ro`, `hr`, `sl`, `et`, `lv`, `lt`, `el`, `bg`, `uk`, `ru`, `pt-PT`, `ca`, `vi`, `ms`, `fil`, `af`, `sw`. | |
| lastName | No | ||
| metadata | No | ||
| firstName | No | ||
| ipAddress | No | ||
| campaignId | Yes | Target program (campaign) id for this call. Defaults to GROWSURF_CAMPAIGN_ID when omitted. Program IDs also identify newly created programs without restarting the server. | |
| referredBy | No | ||
| fingerprint | No | ||
| isAffiliate | No | Affiliate programs only. Controls affiliate enrollment for a new participant. `true` enrolls the participant with `affiliateStatus: APPROVED`; `false` creates a non-affiliate without `affiliateStatus`. Existing participants are returned unchanged. | |
| referralStatus | No | ||
| mobileInstanceId | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||