growsurf_integration_guide
Plan Program Integration
Plan a web integration for a referral or affiliate program. Returns Markdown steps for installing the Universal Code, identifying participants, tracking referrals or sales, and verifying webhooks. Does not inspect or change a program. Use `growsurf_client_snippets` for browser JavaScript examples, `growsurf_api_library_snippets` for backend code, or `growsurf_mobile_sdk_guide` for native or React Native apps.
输入参数programTypesinglePageAppreferralTriggerwebhookSecurityparticipantAuthEnabled
growsurf_agent_program_creation_eval
Generate Program Creation Checks
Generate Markdown prompts and acceptance checks for evaluating an agent's program-creation workflow: starter content, rewards, configuration, and frontend installation. Does not create a program or run the checks. Use `growsurf_program_design_advisor` to choose a program design, or `growsurf_integration_guide` to plan its web integration.
输入参数programTypeincludeOneShotPrompts
growsurf_program_design_advisor
Recommend Program Design
Generate program designs, benchmarks, typical rewards, and metric definitions, including participant-to-referral and lead-to-referral ratios. Read-only. Returns a short draft, complete `benchmarkFacts`, a proposed `configurationPlan`, and unresolved `decisions`. Incentive amounts and qualifying actions remain unresolved unless supplied by the customer. `detail: summary` returns a configuration draft and reward structure; `detail: full` adds detailed benchmark tables. Hosted figures describe GrowSurf's high-performing programs; without a bundle, guidance is documentation-based. `programType: AFFILIATE` selects affiliate advice. `industry: other` covers local services, pets, hospitality, and agencies. All inputs are optional.
输入参数goaldetailaudienceindustrycompanyNamecurrencyISOprogramTypesalesMotionincludeRulesbusinessModelqualifyingActionrewardBudgetPerReferral
growsurf_troubleshoot_referral_tracking
Troubleshoot Referral Tracking
Diagnose referral tracking and program problems. Accepts a symptom or description without requiring a program or participant ID. Covers referrals not credited, participant emails not sending, rewards not issued, participants not added, Universal Code not detected, integrations or CRMs not syncing, Zapier errors, fraud flags, and analytics discrepancies. Returns ordered diagnostic checks, likely causes, fixes, and documentation links. It does not read program or participant records. Unknown `symptom` keys return the available symptoms. A `description` matches only when it contains a symptom label or alias verbatim; otherwise the symptom list is returned.
输入参数symptomcampaignIddescriptionparticipantIdparticipantEmail
growsurf_mobile_sdk_guide
Get Mobile SDK Guide
Get Markdown implementation guidance for native iOS/Android SDK 0.10.3 or React Native SDK 0.3.1, including attribution, `shareUrl` sharing, `trackShare`, and the native GrowSurf Window. Choose `platform` and `participantState` to tailor the guide; `includeInstallSnippets` controls installation examples. Does not install an SDK or create a participant token. Use `growsurf_client_snippets` for browser JavaScript or `growsurf_api_library_snippets` for backend token-creation code.
输入参数platformcampaignIdmobilePublicKeyparticipantStateattributionProviderincludeInstallSnippetsserverVerifiedQualifyingAction
growsurf_api_library_snippets
Generate REST API Library Snippets
Generate Markdown code examples for the official backend REST API libraries in TypeScript, Python, PHP, Ruby, and Java. Select `language` and `workflow`; both default to `all`. Covers setup, program lookup, participant creation, referral credit, sales, and mobile participant tokens. Returns code without executing API calls. Use `growsurf_client_snippets` for browser JavaScript or `growsurf_mobile_sdk_guide` for native or React Native app setup.
输入参数emaillanguageworkflowcampaignIdreferredByparticipantIdOrEmail
growsurf_get_campaign
Get Program
Fetch your GrowSurf campaign (program) details via REST. Embedded reward settings do not establish that an individual reward was earned, approved, or delivered. Earned reward records belong to the individual participant. Targets `campaignId` if supplied, otherwise `GROWSURF_CAMPAIGN_ID`.
输入参数campaignId必填
growsurf_list_campaigns
List Programs
List the GrowSurf programs available to the bound team, including their IDs for program selection. Deleted programs are not returned. Does not require `GROWSURF_CAMPAIGN_ID`.
无需输入参数。
growsurf_create_campaign
Create Program
Create a new GrowSurf program (campaign) with type-appropriate starter content and optional inline rewards. Starter content includes Design, Emails, Options, Installation, and GrowSurf Window defaults. Only `type` is required. The program starts in `DRAFT` status and is owned by the credential's bound team. `currencyISO` defaults to `USD` and is immutable after creation. `goal` sets the sharing settings at creation and cannot be set later. Incentives require the customer's chosen amount or commission rate. Without `rewards`, GrowSurf's starter rewards are switched off and award nothing. Editor-tab configuration is not accepted here. Does not require `GROWSURF_CAMPAIGN_ID`. The response includes the new program `id`.
输入参数goalnametype必填rewardscompanyNamecurrencyISOcompanyLogoImageUrl
growsurf_update_campaign
Update Program
Update your GrowSurf program's (campaign's) identity and lifecycle: name, companyName, companyLogoImageUrl, and status (set IN_PROGRESS to publish/resume the program, COMPLETE to end it). Only the fields you send are changed. `type`, `urlId`, and `currencyISO` are immutable (currency is chosen once at program creation), so this tool does not accept them. Editor-tab config (design, emails, options, installation) is edited with the dedicated config sub-resource tools, not here. Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数namestatuscampaignId必填companyNamecompanyLogoImageUrl
growsurf_clone_campaign
Clone Program
Clone your GrowSurf program (campaign) into a new DRAFT program. Integrations and credentials are not copied; active rewards are cloned. Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数campaignId必填
growsurf_list_campaign_rewards
List Campaign Rewards
List your GrowSurf program's configured Campaign Rewards, including switched-off rewards and rewards whose reward type is not selected. Deleted rewards are excluded. A reward can be earned only when it also appears in the campaign response's embedded `rewards` array. The list includes every group's rewards; each reward's `groupId` names its group (`null` is Default). These settings do not establish that a participant earned or received a reward; earned reward records belong to the individual participant. Targets `campaignId` if supplied, otherwise `GROWSURF_CAMPAIGN_ID`.
输入参数groupIdcampaignId必填
growsurf_create_campaign_reward
Create Campaign Reward
Create a new campaign reward (reward config) on your GrowSurf program. `type` must be compatible with the program type (affiliate programs support only AFFILIATE rewards; referral programs support the other types). Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数type必填eventlimitordertitlevaluegroupIdimageUrlmetadataisVisiblecampaignId必填couponCode另有 13 个
growsurf_update_campaign_reward
Update Campaign Reward
Update an existing campaign reward (reward config) on your GrowSurf program. `campaignRewardId` is the reward key (e.g. crew_...). The reward `type` is immutable. Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数eventlimitordertitlevaluegroupIdimageUrlmetadataisVisiblecampaignId必填couponCodedescription另有 13 个
growsurf_delete_campaign_reward
Delete Campaign Reward
Delete a campaign reward (reward config) from your GrowSurf program. The reward is deactivated, removed from the program's reward set, and any connected upfront-discount coupons are cleaned up. `campaignRewardId` is the reward key. Returns { id, success }. Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数campaignId必填campaignRewardId必填
growsurf_list_campaign_groups
List Campaign Groups
List your GrowSurf program's groups in display order. Groups give some participants a different reward list. Each participant is in one group, and `groupId: null` is Default, which holds the program's standard rewards and is not in this list. A group's rewards replace Default's whole reward list for its members' new referrals. Leaderboard rewards stay program-wide. Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数campaignId必填
growsurf_create_campaign_group
Create Campaign Group
Create a group on your GrowSurf program. GrowSurf copies each active Default reward into it, except Leaderboard rewards; change the copies with `growsurf_update_campaign_reward`. `rules` place participants: `EMAIL` matches an exact email, `DOMAIN` matches a company domain (public email domains are refused), and `PARTICIPANT` moves an existing participant in now. Each email and domain can be in one group only. Email and domain rules place new signups and affiliate approvals only. Confirm reward amounts with the person before you change the copies. Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数name必填rulescampaignId必填
growsurf_update_campaign_group
Update Campaign Group
Rename, reorder, or change the rules of a group on your GrowSurf program. Sending `rules` replaces the whole list. An added `PARTICIPANT` rule moves that participant in now; a removed one moves them back to Default if they are still in this group. Email and domain rule changes move no one. To change the group's rewards, use `growsurf_update_campaign_reward`. Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数nameorderrulesgroupId必填campaignId必填
growsurf_delete_campaign_group
Delete Campaign Group
Delete a group from your GrowSurf program. Its members move to Default, and its Campaign Rewards are removed from the program. Rewards already earned keep their amounts and can still be sent. Returns { id, success, movedToDefault }. Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数groupId必填campaignId必填
growsurf_list_program_resources
List Program Resources
List the participant resources configured for your GrowSurf program, including drafts. Results stay in display order. Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数campaignId必填
growsurf_prepare_program_resource_file
Prepare Program Resource File
Prepare a local file for a `FILE` Program Resource. Accepts a safe file name, matching supported MIME type, and padded base64 bytes, up to 10 MB. GrowSurf requests a one-time ticket and uploads only to the secure HTTPS destination selected by GrowSurf. Returns the original `uploadTicket` and `uploadResult` required for file resource creation or replacement. Altered upload results are not valid. The tool does not accept upload URLs or credentials and never retries an ambiguous upload. Requires `GROWSURF_UPLOAD_ALLOWED_ORIGINS` on the server; without it, only `LINK` and `TEXT` resources are available. Targets `campaignId` if supplied, otherwise `GROWSURF_CAMPAIGN_ID`.
输入参数fileName必填mimeType必填campaignId必填fileBase64必填
growsurf_create_program_resource
Create Program Resource
Create a `FILE`, `LINK`, or `TEXT` resource for participants. `LINK` requires an HTTPS `url`. `TEXT` requires plain `text`. A `FILE` up to 10 MB requires a one-time `uploadTicket` and the unmodified `uploadResult` from GrowSurf's secure upload flow. New resources default to draft unless `isPublished` is set. API reference: https://growsurf.com/openapi.json. Targets `campaignId` if supplied, otherwise `GROWSURF_CAMPAIGN_ID`.
输入参数urltexttype必填title必填categorycampaignId必填descriptionisPublisheduploadResultuploadTicket
growsurf_update_program_resource
Update Program Resource
Update at least one participant resource field, or move it to a zero-based `position`. Only supplied fields change. A replacement `FILE` requires a one-time `uploadTicket` and the unmodified `uploadResult` from GrowSurf's secure upload flow. API reference: https://growsurf.com/openapi.json. Targets `campaignId` if supplied, otherwise `GROWSURF_CAMPAIGN_ID`.
输入参数urltexttypetitlecategorypositioncampaignId必填resourceId必填descriptionisPublisheduploadResultuploadTicket
growsurf_delete_program_resource
Delete Program Resource
Delete a participant resource from your GrowSurf program. This does not remove its reusable Media Center asset. Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数campaignId必填resourceId必填
growsurf_get_campaign_design
Get Program Design
Fetch the configured design fields for your GrowSurf program, including GrowSurf Window content, colors, sharing sections, participant avatars under `participantAvatarStyle`, referred-visitor content such as the Claim Offer Popup, the website widget under `widget`, the participant Traffic report under `trafficInsights` (it starts on for new affiliate programs and hidden for referral programs, and every setting is returned with its default copy), participant sign-in copy under `login`, payout-destination confirmation page copy under `payoutDestinationConfirmation`, country-name overrides under `countryLabels`, and the participant Settings panel under `participantSettings` (its `languageSectionTitle` and `languageSectionInstructionsText` label the language picker shown when the program has more than one language). `participantAvatarStyle` is `CHARACTERS`, `INITIALS`, `ANIMALS`, or `GRADIENT`; missing or unknown values mean `INITIALS`. `visualStyle` is the program Style (`GLOW`, `CLEAN`, `FLAT`, `ROUND`, `TINT`, or `GLASS`) and is omitted when the program has no saved Style. The confirmation section is omitted when no confirmation fields are stored. Stored `null` fields are returned as `null`; omitted and `null` fields use localized defaults. Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数campaignId必填
growsurf_update_campaign_design
Update Program Design
Update the design configuration for your GrowSurf program, including participant avatars under `participantAvatarStyle`, referred-visitor content such as the Claim Offer Popup and the side content of its GrowSurf page (`referredExperience.offerPageDescription` HTML, up to 5 `offerPageSteps` of `{ text, iconKey }`, and up to 3 `offerPageLinks` of `{ text, url }` where an empty `url` links to the Share URL), the website widget under `widget` (button or card, placement, timing, and visible pages), the participant Traffic report under `trafficInsights`, participant sign-in copy under `login`, payout-destination confirmation page copy under `payoutDestinationConfirmation`, and the participant Settings panel under `participantSettings`, such as the language picker's `languageSectionTitle` (up to 100 characters) and `languageSectionInstructionsText` (up to 255 characters). `trafficInsights.isPublicDisplayed` controls visibility; its labels cannot be blank. `participantAvatarStyle` accepts `CHARACTERS`, `INITIALS`, `ANIMALS`, or `GRADIENT`. `visualStyle` accepts `GLOW`, `CLEAN`, `FLAT`, `ROUND`, `TINT`, or `GLASS`; it sets corners, shadows, button shape and background on program pages and the GrowSurf Window. Changing it also fills `theme.buttons.borderRadius` and the `theme.globalBoxShadow` fields unless the same request sets them. Text fields use the same character limits as the dashboard Program Editor. Text the Program Editor requires, such as Window labels, button text, and status names, cannot be set to `null`, empty, or only spaces. Only supplied `fields` change; omitted fields retain their existing content and arrays replace wholesale. Targets `campaignId` if supplied, otherwise `GROWSURF_CAMPAIGN_ID`.
输入参数fields必填campaignId必填
growsurf_get_campaign_emails
Get Program Emails
Fetch the Emails tab configuration for your GrowSurf program, including participant and admin email templates, settings, and read-only fields. `settings.sender.fromEmail` is read-only and can be changed in the dashboard after domain verification. When updating, omit unchanged sender fields; `fromName` and `replyToEmail` cannot be cleared with `null`. Targets `campaignId` if supplied, otherwise `GROWSURF_CAMPAIGN_ID`.
输入参数campaignId必填
growsurf_update_campaign_emails
Update Program Emails
Update writable Emails tab fields for your GrowSurf program under `fields`, in their existing nested shape. `settings.sender.fromEmail` is read-only; sender address changes require domain verification in the dashboard. `settings.sender.fromName` and `settings.sender.replyToEmail` accept non-empty strings, not `null`. Omit either field to keep its current value, including an unset value returned by a read. The `invite` and transactional email `isEnabled` toggles are read-only. An email `subject` cannot be empty. Email bodies require their template links and footer tokens. When `settings.design.layoutMode` is `INLINE`, each body must include `{{emailFooter}}`; `{{emailHeader}}` is optional. `layoutMode` is read-only. Omitted fields retain their existing content; arrays replace wholesale. Targets `campaignId` if supplied, otherwise `GROWSURF_CAMPAIGN_ID`.
输入参数fields必填campaignId必填
growsurf_get_campaign_options
Get Program Options
Fetch the Options tab configuration for your GrowSurf program (referral triggers, anti-fraud lists and toggles, affiliate enrollment and application review, notifications, the program's languages under `languages`, and other behavior options). Returns the full object with every field and its current value, the same shape you send back on update. `autoFulfillRewards: false` permits manual fulfillment and does not prove that any reward went undelivered. Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数campaignId必填
growsurf_update_campaign_options
Update Program Options
Update the Options tab configuration for your GrowSurf program under `fields`, in its existing nested shape. Only supplied fields change; omitted fields retain their existing values and arrays replace wholesale. `languages.additionalLanguages` takes the full list of extra languages; send `[]` to turn them off. The base language is dropped from that list and duplicates collapse. `languages.showFlags` shows or hides the flag next to each language name. `languages.flagCountries` picks the flag for a language that offers more than one, such as `{ "en": "GB" }`; `null` restores the default flag. Turning on `languages.additionalLanguages` returns `403` if your account does not include additional languages. While any are on, every `languages` change, including turning them off, returns the same `403`. Translations are managed in the GrowSurf dashboard, not through this tool. `notificationEmails.recipients` needs at least one valid email address. Targets `campaignId` if supplied, otherwise `GROWSURF_CAMPAIGN_ID`.
输入参数fields必填campaignId必填
growsurf_get_campaign_installation
Get Program Installation
Fetch the Installation tab configuration for your GrowSurf program (embed/installation and tracking setup). Returns the full object with every field and its current value — the same shape you send back on update. Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数campaignId必填
growsurf_update_campaign_installation
Update Program Installation
Update the Installation tab configuration for your GrowSurf program under `fields`. Only supplied fields change; omitted fields retain their existing values and arrays replace wholesale. `allowedUrls` includes permitted browser origins such as `http://localhost:3000`. An origin missing from both `shareUrl` and `allowedUrls` can return `403`. Referral links already shared point at the current `shareUrl`. Replacing an existing Share URL requires the customer's explicit approval and `replaceExistingShareUrl: true`; otherwise the patch is refused. Targets `campaignId` if supplied, otherwise `GROWSURF_CAMPAIGN_ID`.
输入参数fields必填campaignId必填replaceExistingShareUrl
growsurf_get_campaign_custom_domain
Get Program Custom Domain
Fetch the custom domain that serves your GrowSurf program's landing pages, such as `https://refer.example.com`. Returns `domain` (`null` when none is set), `isVerified`, `verifiedAt`, and `dnsRecord`, the `CNAME` record to add at the DNS provider. This read does not check DNS; use `growsurf_verify_campaign_custom_domain` for a live check. Targets `campaignId` if supplied, otherwise `GROWSURF_CAMPAIGN_ID`.
输入参数campaignId必填
growsurf_set_campaign_custom_domain
Set Program Custom Domain
Set or replace the custom domain for your GrowSurf program's landing pages. Pass a hostname such as `refer.example.com` in `domain`; `https://` is added if you leave it out. Paths, ports, queries, and `http://` return `400`. Replacing a domain removes the old one right away, and its pages stop loading there, so confirm with the customer before replacing a domain that is already set. Sending the current domain again changes nothing. A domain used by another program returns `409`, and `403` means the account cannot use custom domains yet: a higher plan is needed, or for an affiliate program, a payment method on file. A new domain starts unverified: add the `CNAME` record from the returned `dnsRecord` at the DNS provider (`dnsRecord.name` pointing to `dnsRecord.value`), then call `growsurf_verify_campaign_custom_domain`. Targets `campaignId` if supplied, otherwise `GROWSURF_CAMPAIGN_ID`.
输入参数domain必填campaignId必填
growsurf_verify_campaign_custom_domain
Verify Program Custom Domain
Check the program's custom domain DNS now and return the result in `isVerified`. Call it after the `CNAME` record from `dnsRecord` is in place. If the record is wrong or has not propagated yet, `isVerified` stays `false`; try again later. The first time the check passes, GrowSurf sets up the domain's SSL certificate, and pages can take a few minutes to load over `https://` after that. More than one `CNAME` record on the hostname returns `400`. Returns `404` when no custom domain is set. A domain that is already verified is returned as is, without a new check. Targets `campaignId` if supplied, otherwise `GROWSURF_CAMPAIGN_ID`.
输入参数campaignId必填
growsurf_remove_campaign_custom_domain
Remove Program Custom Domain
Remove the custom domain from your GrowSurf program. Its landing pages stop loading on that domain and go back to their GrowSurf URL. Returns `{ domain, success }`. Returns `404` when no custom domain is set. Targets `campaignId` if supplied, otherwise `GROWSURF_CAMPAIGN_ID`.
输入参数campaignId必填
growsurf_capture_referral_flow_screenshots
Capture Referral Flow Screenshots
Capture temporary GrowSurf preview screenshots after a draft program is saved. Returns short-lived URLs for the controlled referrer Window and referred-friend experience, with an `expiresAt` timestamp in UTC. The screenshots reflect the saved program at capture time and do not verify installation on the customer's site. A failed inline image alone does not establish that the URL expired. This tool does not accept arbitrary URLs, HTML, JavaScript, or external screenshot targets. Targets `campaignId` if supplied, otherwise `GROWSURF_CAMPAIGN_ID`.
输入参数campaignId必填
growsurf_get_team
Get Team
Fetch the team bound to the API key or OAuth connection. `verificationStatus` is `VERIFIED` once GrowSurf has verified the team, which is required before a program can email participants. Personal profiles and internal identifiers are not returned. Requires `GROWSURF_API_KEY`; does not require `GROWSURF_CAMPAIGN_ID`.
无需输入参数。
growsurf_update_team
Update Team
Update the display name of the team bound to the API key or OAuth connection. Personal profiles, billing, and team ownership are not editable here. Requires `GROWSURF_API_KEY`; does not require `GROWSURF_CAMPAIGN_ID`.
输入参数name必填
growsurf_request_team_verification
Request Team Verification
Ask GrowSurf to verify the team bound to the API key or OAuth connection. Verification is required before a program can email participants. Calling this again while a request is pending does not create a duplicate. Returns the team with its updated `verificationStatus`. Requires `GROWSURF_API_KEY`; does not require `GROWSURF_CAMPAIGN_ID`.
无需输入参数。
growsurf_resend_team_owner_verification_email
Resend Team Owner Verification Email
Resend the email-verification message to the bound team's owner. The response never reveals the owner's email address. A `200` with `status: SENT` is returned only when an email was sent. Returns `400` if the email is already verified and `429` if one was sent too recently. Requires `GROWSURF_API_KEY`; does not require `GROWSURF_CAMPAIGN_ID`.
无需输入参数。
growsurf_get_campaign_analytics
Get Program Analytics
Fetch analytics for your GrowSurf program: participants, referrals, impressions, per-channel shares, and affiliate revenue, commission, and payout metrics when applicable. Pass `interval` (`day`, `week`, or `month`) for a per-period `series`. Pass comma-separated `include` values for `previousPeriod`, `statusCounts`, `rates`, `email`, or `engagement`. `engagement` groups unique active, sharing, repeat, and retained participants by when portal views and share actions occurred. Its `coverageStartAt`, `state`, and `reason` distinguish measured zeroes from partial or unavailable history. Scope the timeframe with `days` (default 365, max 1825) or an explicit `startDate`/`endDate` window. Explicit dates must both be positive Unix timestamps in milliseconds, with `endDate` >= `startDate` and a maximum span of 1825 days. `timezone` and `platform` apply to engagement only. Targets `campaignId` if passed, otherwise `GROWSURF_CAMPAIGN_ID`.
输入参数daysendDateincludeintervalplatformtimezonestartDatecampaignId必填
growsurf_get_campaign_activation_analytics
Get Activation Analytics
Fetch strict activation for eligible participants in one enrollment cohort. Referral programs group by `enrolledAsAdvocateAt`; affiliate programs group by `approvedAsAffiliateAt`. The ordered stages are `ELIGIBLE`, `PORTAL_VIEWED`, `SHARE_ACTION`, `UNIQUE_REFERRAL_VISIT`, `LEAD`, and `CREDITED_REFERRAL`. Each participant gets the selected 7- or 30-day observation window. Omit both cohort bounds for the latest fully matured cohort. Read `coverageStartAt`, `state`, and `reason` before interpreting a null or zero; unavailable history does not mean an action never happened. Targets `campaignId` if passed, otherwise `GROWSURF_CAMPAIGN_ID`.
输入参数cohortTotimezonecampaignId必填cohortFromcohortIntervalobservationWindowDays
growsurf_list_integrations
List Integrations
List the integrations available to your GrowSurf program, including Stripe, PayPal, Wise, Mailchimp, Slack, Zapier, and Webhooks. Each entry includes `connected` (credentials stored), `enabled` (working), `autoDisabled` (delivery stopped after repeated failures until the user reconnects), and `connectUrl` (dashboard connection link). Integrations that do not apply to the program type are omitted, such as Wise on a referral program. Read-only. Account connection takes place in the GrowSurf dashboard and is not available through the API. Targets `campaignId` if supplied, otherwise `GROWSURF_CAMPAIGN_ID`.
输入参数campaignId必填
growsurf_list_campaign_webhooks
List Webhooks
List your GrowSurf program's webhooks (secrets are never returned). Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数campaignId必填
growsurf_create_campaign_webhook
Create Webhook
Add a webhook to your GrowSurf program. `payloadUrl` is required. `events` is the list of events this webhook is subscribed to. Omit it to subscribe the webhook to every event its program type offers, or send `[]` for none. An event the program type does not offer returns `400`. A program can have up to 5 webhooks, counting the primary webhook, so you can create up to 4. Creating another returns `400`. `secret` is write-only — GrowSurf uses it to sign deliveries (the GrowSurf-Signature HMAC header) and never returns it. A program can have only one saved Bask Health webhook across all `bask.ninja` hosts and paths, including disabled webhooks. A second Bask Health webhook returns `400`. A concurrent change to webhook settings can return `409`; reload the webhooks before retrying. Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数eventssecretisEnabledcampaignId必填payloadUrl必填
growsurf_update_campaign_webhook
Update Webhook
Update a webhook on your GrowSurf program by id (`webhookId` is `primary` for the program's primary webhook). Only the fields you send are changed. `secret` is write-only and never returned. A program can have only one saved Bask Health webhook across all `bask.ninja` hosts and paths, including disabled webhooks. An update that leaves more than one Bask Health webhook returns `400`. A concurrent change to webhook settings can return `409`; reload the webhooks before retrying. Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数eventssecretisEnabledwebhookId必填campaignId必填payloadUrl
growsurf_delete_campaign_webhook
Delete Webhook
Remove a webhook from your GrowSurf program by id. Returns { id, success }. Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数webhookId必填campaignId必填
growsurf_test_campaign_webhook
Send Test Webhook
Send a live test event to a webhook on your GrowSurf program using its stored URL and secret. Optionally pass `event` to choose which event type to simulate; when omitted, the webhook's first enabled event is used (returns 400 if the webhook has no enabled events). Returns the mock payload and the receiving endpoint's response. Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数eventwebhookId必填campaignId必填
growsurf_list_participants
List Participants
List participants in your GrowSurf program, newest page first. `limit` is 1-100 (default 10). Pass response `nextId` into the next call to continue paging. Pass `metadata` to return only participants whose stored metadata matches every given key and value exactly, for example `{ "customerId": "12345" }` to look someone up by your own customer ID; filtered results are ordered by participant ID. Results include participant IDs. Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数limitnextIdgroupIdmetadatacampaignId必填
growsurf_get_participant
Get Participant
Fetch a single participant by GrowSurf participant ID or email address. `referralStatus` describes credit to their referrer; `referralCount` counts referrals this participant generated, so zero is consistent with `CREDIT_AWARDED`. In `rewards`, `approved` records approval; `status`, `isFulfilled`, and `fulfilledAt` record fulfillment marking, not confirmation of delivery. Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数campaignId必填participantIdparticipantEmail
growsurf_add_participant
Add Participant
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`. Targets `campaignId` if you pass it, otherwise `GROWSURF_CAMPAIGN_ID`.
输入参数email必填groupIdlanguagelastNamemetadatafirstNameipAddresscampaignId必填referredAtreferredByfingerprintisAffiliate另有 2 个
growsurf_update_participant
Update Participant
Update a participant by GrowSurf participant ID or email. Only the fields you send are changed; read-only fields such as counters, `isAffiliate`, `origin`, and fraud state are rejected with a `400`. In affiliate programs, `affiliateStatus` accepts `APPROVED`, `SUSPENDED`, or `BANNED`; `APPROVED` enrolls the participant, while `SUSPENDED` and `BANNED` require an existing affiliate. Affiliate enrollment cannot be removed through REST. `notes` is freeform internal notes (never shown to participants). Targets `campaignId` if you pass it, otherwise `GROWSURF_CAMPAIGN_ID`.
输入参数emailnotesgroupIdlanguagelastNamemetadatafirstNamecampaignId必填referredByvanityKeysunsubscribedparticipantId另有 3 个
growsurf_bulk_delete_participants
Bulk Delete Participants
Bulk delete participants from your GrowSurf program in one request. DESTRUCTIVE: deletion is permanent and cannot be undone. Successful rows lose participant access immediately; related record cleanup completes automatically, subject to required financial record retention. Each entry in `participants` is a GrowSurf participant ID or an email address (mixed lists are allowed), up to 200 entries per request — chunk larger lists across multiple calls. Returns a `summary` (total, deletedCount, notFoundCount, duplicateCount, errorCount) plus per-row `results` in request order, each with `status` DELETED, NOT_FOUND, DUPLICATE (resolves to the same participant as an earlier entry), or ERROR — both `200` and `202` responses can include NOT_FOUND or ERROR rows, and the summary reports these outcomes. A `202` response includes `analyticsErasure` when analytics erasure is pending. `DELETED` means participant access was removed; reports can retain the participant until cleanup completes. Do not repeat successful rows to finish cleanup. Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数campaignId必填participants必填
growsurf_bulk_move_participants
Bulk Move Participants
Move participants in your GrowSurf program to a group, or to Default with `groupId: null`. Each entry in `participants` is a GrowSurf participant ID or an email address (mixed lists are allowed), up to 200 entries per request. All found participants move together: if the move fails, no one moves. A move is a manual placement, so the groups' email and domain rules do not override it later. A move applies to new referrals only; rewards already earned keep their amounts. Returns a `summary` (total, groupId, movedCount, notFoundCount, duplicateCount, errorCount) plus per-row `results` in request order, each with `status` MOVED, NOT_FOUND, DUPLICATE, or ERROR. Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数groupId必填campaignId必填participants必填
growsurf_email_participant
Email Participant
Send an email to a participant (by GrowSurf participant ID or email). Provide EITHER `emailType` to trigger one of the program's configured email templates, OR `subject` + `body` for a free-form email (optionally `preheader`). For programs with `settings.design.layoutMode` set to `INLINE`, `body` must include `{{emailFooter}}`; `{{emailHeader}}` is optional. Free-form emails are sent with the same compliance handling (company name, postal address, and an unsubscribe link are added automatically, and unsubscribed participants are suppressed). Sending requires the team to be verified by GrowSurf and a verified custom email domain on the program (set up in *Program Editor > 3. Emails > Email Settings*). Returns 400 until one is verified. The email is accepted for delivery. Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数bodysubjectemailTypepreheadercampaignId必填participantIdparticipantEmail
growsurf_get_participant_analytics
Get Participant Analytics
Fetch analytics for one participant by GrowSurf participant ID or email. The base response includes all-time engagement, rank, share, and applicable affiliate revenue, commission, and payout metrics. Add `activation` to `include` for the program-specific eligibility anchor and covered first milestones, including `firstPortalViewedAt` and `firstShareChannel`. A null milestone with a partial or unavailable `state` is unknown, not proof that the action never happened. Request both `activation` and `series` for covered `portalViews` and `shareActions` buckets. Filter optional series and email data with `days` (up to 1825) or both `startDate` and `endDate` as positive Unix timestamps in milliseconds. `endDate` must be at or after `startDate`, and the range can span at most 1825 days. These date parameters do not filter the base response or activation milestones. Targets `campaignId` if passed, otherwise `GROWSURF_CAMPAIGN_ID`.
输入参数daysendDateincludeintervalstartDatecampaignId必填participantIdparticipantEmail
growsurf_get_participant_activity_logs
Get Participant Activity Logs
List a participant's activity logs (by GrowSurf participant ID or email), most recent first, offset/limit paginated. `limit` is 1-100 (default 20); `offset` skips logs. The response `offset` is the cursor for the next page (null when there are no more). Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数limitoffsetcampaignId必填participantIdparticipantEmail
growsurf_trigger_referral
Trigger Referral
Trigger referral credit for a referred participant (use when your trigger is Sign up + Qualifying Action). Optionally pass delayInDays (1-90) to hold the credit for N days before awarding it (e.g. to cover a refund window). Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数campaignId必填delayInDaysparticipantIdparticipantEmail
growsurf_cancel_delayed_referral
Cancel Delayed Referral
Cancel a pending delayed referral trigger for a participant before the delay elapses (e.g. on refund/cancellation). Returns { success, message }. Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数campaignId必填participantIdparticipantEmail
growsurf_get_participant_payout_destination
Get Payout Destination
Get a participant's payout-destination status (by GrowSurf participant ID or email) across every payout provider enabled for the program (PayPal, Venmo, or Wise). For each provider it reports the current `status`, the confirmed payout email, the legal recipient type, and — when a delivery bounced or a recipient was invalidated — the repair reason. `activeProvider` is the provider that currently gets paid, or null until the participant confirms one. Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数campaignId必填participantIdparticipantEmail
growsurf_request_participant_payout_destination_confirmation
Request Payout Destination Confirmation
Ask a participant to confirm their payout destination for a provider (by GrowSurf participant ID or email). Sends them a one-time confirmation link for the chosen `provider`; only the participant can open the link and confirm — this just triggers the message, and the provider must be enabled for the program. Returns { status, provider, providerDisplayName, expiresAt }. Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数provider必填campaignId必填participantIdparticipantEmail
growsurf_record_sale
Record Sale
Record a sale/transaction for an affiliate program. Use webhooks to know when commissions are added. Requires at least one transaction identifier (externalId, transactionId, orderId, paymentId, invoiceId, paymentIntentId, or chargeId) so repeated calls are de-duplicated instead of double-paying the referrer; reuse the same one when refunding. Targets `campaignId` if you pass it, otherwise GROWSURF_CAMPAIGN_ID.
输入参数paidAtorderIdchargeIdcurrency必填testModeinvoiceIdnetAmountpaymentIdtaxAmountamountPaidcampaignId必填customerId另有 16 个
growsurf_refund_transaction
Record Affiliate Refund or Chargeback
Record a refund, partial refund, or chargeback for a previously recorded affiliate transaction in GrowSurf and reverse or adjust the referrer's commission. This records the amendment without sending a refund through the payment provider. Requires the same transaction identifier as the original sale. Omitted `amountRefunded` means a full refund. Already-paid commissions are not clawed back and are recorded for tax only. Targets `campaignId` if supplied, otherwise `GROWSURF_CAMPAIGN_ID`.
输入参数amountorderIdchargeIdcurrencyrefundIdtestModeinvoiceIdpaymentIdcampaignId必填externalIddescriptionrefundAmount另有 9 个
growsurf_create_mobile_participant_token
Create Mobile Participant Token
Create or fetch a participant, then create a participant-scoped mobile SDK token via GrowSurf REST. Participant creation is trusted direct enrollment and bypasses the public application review flow for affiliates. Targets `campaignId` if you pass it, otherwise `GROWSURF_CAMPAIGN_ID`.
输入参数email必填languagelastNamemetadatafirstNameipAddresscampaignId必填referredAtreferredByfingerprintisAffiliatereferralStatus另有 1 个
growsurf_participant_auth_hash
Compute Participant Auth Hash
Compute a SHA-256 HMAC using the caller-supplied `participantAuthSecret`. Server environment secrets are never used. Use a test secret during implementation; keep production signing in your backend. `affiliateJoin` requires permission for this signed-in user to join the affiliate program directly.
输入参数email必填affiliateJoinparticipantAuthSecret必填
growsurf_webhook_normalize
Normalize Webhook Payload
Validate/normalize a GrowSurf webhook payload and generate a best-effort idempotency key for dedupe.
输入参数payload必填
growsurf_client_snippets
Generate Browser JavaScript Snippets
Generate Markdown browser JavaScript and CSS examples for referral tracking, embeddable elements, and the GrowSurf Window, with placement guidance. Does not install code or change a program. Use `growsurf_embeddable_element_snippet` for one HTML element, `growsurf_grsf_config_snippet` for `window.grsfConfig`, or `growsurf_api_library_snippets` for backend REST code.
输入参数programTypesinglePageAppreferralTriggerincludeUnreadBadgeincludeGrowSurfWindowparticipantAuthEnabledincludeEmbeddableElementsincludeEventSubscriptions
growsurf_embeddable_element_snippet
Generate Embeddable Element HTML
Generate one embeddable element's HTML as Markdown. Choose `element`; optionally include participant authentication attributes. Does not install the element or change a program. Use `growsurf_client_snippets` for a broader browser integration or `growsurf_grsf_config_snippet` for page-level participant auto authentication.
输入参数element必填participantwithAuthAttributes
growsurf_grsf_config_snippet
Generate Participant Auto Authentication Code
Generate the HTML code for GrowSurf Participant Auto Authentication using `window.grsfConfig`. The generated code belongs in `<head>`, before the GrowSurf Universal Code.
输入参数hashemailcampaignIdaffiliateJoinuseCampaignIdPlaceholderenableParticipantAutoAuthincludeAutoAuthCommentHeader
growsurf_get_integration_connect_link
Get Integration Connect Link
Return a dashboard link to an integration's connect panel in the GrowSurf Program Editor (Options > Integrations). Connecting Stripe, PayPal, Wise, or another account requires the user to complete the dashboard flow; the API cannot connect an account on their behalf. `integration` accepts supported keys, including camelCase keys such as `constantContact` and `helpScout`. The result reports whether the integration is `connected`, `enabled`, or `autoDisabled`. If the program check cannot run, `programVerified` is `false` and the result still includes a production dashboard link. Tango Card, Tremendous, Bask Health, CareValidate, MD Integrations, Lithos, and Telegra apply only to referral programs. Wise applies only to affiliate programs. Targets `campaignId` if supplied, otherwise `GROWSURF_CAMPAIGN_ID`.
输入参数campaignIdintegration必填