# check_affiliate_code

Source: https://modulify.ai/docs/mcp/account/check-affiliate-code

Checks whether a referral code is free before you claim it.

- Title: Check a referral code is free
- Scope: `account:read`
- Access: Read only

Codes are unique across Modulify, so a code somebody else holds is reported as taken. Always check before setting one with `update_affiliate`, because a code cannot be changed once a referral has used it.

A free code answers `ok` with `Affiliate code is available.`, and a taken one `not-ok` with `Affiliate code is not available.` A code must be 3 to 12 letters and digits, and anything else is refused with `Code is not valid, please check again!` It acts only for the account the token belongs to and needs no workspace. See [Affiliates](https://modulify.ai/docs/plans/affiliates#change-your-code-or-your-payout-email).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | Yes | The code to test, 3 to 12 letters and digits. It is compared in lowercase. |