Create or update a partner
create_partnerCreates or updates a partner by email: existing partners get program enrollment updated; new partners are registered with contact and link details.
Instructions
Creates or updates a partner record (upsert behavior). If a partner with the same email already exists, their program enrollment will be updated with the provided tenantId. If no existing partner is found, a new partner will be created using the supplied information.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | The partner's full name. If undefined, the partner's email will be used in lieu of their name (e.g. `john@acme.com`) | |
| No | The partner's email address. Partners will be able to claim their profile by signing up at `partners.dub.co` with this email. | ||
| image | No | The partner's avatar image. If not provided, a default avatar will be used. | |
| 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. | |
| country | No | The partner's country of residence. Must be passed as a 2-letter ISO 3166-1 country code. See https://d.to/geo for more information. | |
| groupId | No | The group ID to add the partner to. If not provided, the partner will be added to the default group. | |
| 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 | The partner's unique ID in your system. Useful for retrieving the partner's links and stats later on. If not provided, the partner will be created as a standalone partner. | |
| username | No | The partner's unique username in your system (max 100 characters). This will be used to create a short link for the partner using your program's default domain. If not provided, Dub will try to generate a username from the partner's name or email. | |
| linkProps | No | Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner. | |
| description | No | A brief description of the partner and their background. Max 5,000 characters. | |
| payload_file | No | Absolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags. |