Skip to main content
Glama

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
NameRequiredDescriptionDefault
useridYesClient ID

Implementation Reference

  • 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) }],
            };
        }
    );
  • Zod input schema definition for the tool, requiring a numeric client ID (userid).
            userid: z.number().describe('Client ID'),
        },
    },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/scarecr0w12/whmcs-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server