Create a referrals embed token
create_referrals_embed_tokenGenerate a referrals embed token by resolving an existing enrollment or creating one from partner email. Returns a token for embedding referral programs.
Instructions
Create a referrals embed token for the given partner/tenant. The endpoint first attempts to locate an existing enrollment using the provided tenantId. If no enrollment is found, it resolves the partner by email and creates a new enrollment as needed. This results in an upsert-style flow that guarantees a valid enrollment and returns a usable embed token.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | Exact configured private workspace profile label; not a tenant or provider account ID. | |
| confirm | No | Must be true for the requested mutation or exclusive private output file. | |
| partner | No | ||
| payload | No | Complete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file. | |
| tenantId | No | ||
| partnerId | No | ||
| output_file | Yes | Required absolute new private file. Exclusive 0600 creation; never overwrites or echoes PNG/embed credentials. | |
| payload_file | No | Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. |