whmcs_activate_affiliate
Activate a client as an affiliate in WHMCS by providing their client ID to enable referral tracking and commission management.
Instructions
Activate a client as an affiliate
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| userid | Yes | Client ID |
Implementation Reference
- src/whmcs-client.ts:1360-1362 (handler)Core implementation of the whmcs_activate_affiliate tool. Calls the WHMCS API 'AffiliateActivate' action with the provided userid parameter to activate a client as an affiliate.async affiliateActivate(params: { userid: number }) { return this.call<WhmcsApiResponse & { affiliateid: number }>('AffiliateActivate', params); }
- src/index.ts:1165-1179 (registration)Registers the MCP tool 'whmcs_activate_affiliate' with input schema (userid: number) and delegates execution to whmcsClient.affiliateActivate method.'whmcs_activate_affiliate', { title: 'Activate Affiliate', description: 'Activate a client as an affiliate', inputSchema: { userid: z.number().describe('Client ID'), }, }, async (params) => { const result = await whmcsClient.affiliateActivate(params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; } );
- src/index.ts:1170-1172 (schema)Zod input schema definition for the tool, requiring a numeric client ID (userid).userid: z.number().describe('Client ID'), }, },