Add Participant
growsurf_add_participantAdd or fetch a participant by email, complete a pending offer signup, and directly enroll new participants, including affiliates, without the public review flow.
Instructions
Add or fetch a participant by email. If the email already exists, the existing participant is returned unchanged. One exception: if that participant claimed an offer in the Claim Offer Popup and the signup is not complete yet, this call completes the signup with the original referrer and saves any non-blank firstName, lastName, and metadata you send. 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. A 409 means the same participant is already being added or cannot join right now, so do not retry in a loop. A 422 means the program's fraud rules blocked the participant. Targets campaignId if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"email": "<email>",
"campaignId": "<campaignId>"
},
"name": "growsurf_add_participant"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Yes | |||
| groupId | No | Places the new participant in this group (`grp_…`), or in Default with `null`. This is a manual placement, so the groups' email and domain rules do not apply to them. Applies only when this call creates the participant; to move an existing participant, use `growsurf_update_participant`. An ID that is not a group in this program returns `400` and adds no one. | |
| language | No | The language of the participant's portal and program emails. Stored when it is one of the program's languages (`languages` in `growsurf_get_campaign_options`). A regional tag maps to its language (for example, `fr-BE` is stored as `fr`). Any other value is ignored and the program's base language applies. Applies only when this call creates the participant. Omit it 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`, `zh-TW`, `es-419`. | |
| lastName | No | ||
| metadata | No | ||
| firstName | No | ||
| ipAddress | No | ||
| campaignId | Yes | Target program id for this call: the `id` returned by `growsurf_list_campaigns`, not the program name or a share URL. Defaults to GROWSURF_CAMPAIGN_ID when omitted. Program IDs also identify newly created programs without restarting the server. | |
| referredAt | No | When the participant was referred, in Unix milliseconds. Used only with a valid `referredBy`. If you omit `referralStatus`, GrowSurf compares this time with the program's referral credit window to set it. Defaults to the time of the request. | |
| 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 | |||