---
updatedAt: 2026-05-19T14:43:03.000Z
agentTools:
  projectIndex: https://fuul.readme.io/llms.txt
---

# Update project affiliate (managed)

Partially updates configuration, audiences, optional tier protection, and optional tier approvals for a project affiliate.
Send `tier_protection: null` to clear protection. Include `reviewed_by_user_id` when manual tier approval is required
(`tier_protection` manual tier or `approve_project_tier_ids` listing any manual tier).


# OpenAPI definition

````json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Fuul API",
    "version": "1.0.0",
    "description": "# Fuul API\n\nFuul is a Web3 growth and affiliate marketing platform that enables projects\nto track referrals, manage affiliate programs, and distribute rewards across\nmultiple blockchain networks (EVM, Solana, XRPL, Sui).\n\n## Core Concepts\n\n### Events\nEvents track user actions (conversions) that trigger rewards. Send events\nwhen users complete valuable actions like trades, deposits, or purchases.\n\n### Affiliates\nAffiliates are partners who promote your project. They receive unique codes\nand earn commissions on referred user activity.\n\n### Referral Codes\nEnd-users can generate referral codes to share with friends. Both referrer\nand referee can earn rewards.\n\n### Payouts\nRewards earned through the affiliate/referral program. Can be claimed\non-chain or tracked as points.\n\n## Authentication\n\n### API Keys\nAPI keys are bound to a single project. Include in the Authorization header:\n```\nAuthorization: Bearer YOUR_API_KEY\n```\n\n## Multi-Chain Support\n\nFuul supports multiple blockchain networks. When identifying users, specify:\n- `user_identifier`: The wallet address, email, or opaque UUID\n- `user_identifier_type`: `evm_address` | `solana_address` | `sui_address` | `xrpl_address` | `stellar_address` | `email` | `uuid`\n\n## Smart Contracts\n\nFuul is an on-chain affiliate protocol. The API works in conjunction with\nsmart contracts deployed across multiple EVM networks.\n\n### Contract Architecture\n\n- **FuulManager**: Central contract that handles attributions and claims.\n  Deployed once per network.\n\n- **FuulFactory**: Creates new FuulProject contracts for each project.\n\n- **FuulProject**: Per-project contracts that hold deposited funds and\n  execute payouts. Address returned when creating a project.\n\nFor contract addresses per network, see:\nhttps://docs.fuul.xyz/protocol/smart-contracts\n\n### Claim Flow\n\n1. User earns rewards through referral/affiliate activity\n2. Call `GET /v1/claim-checks/totals` to see claimable amounts\n3. Call `POST /v1/claim-checks/claim` to get a signed claim message\n4. User submits the signature to `FuulManager.claim()` on-chain\n5. Funds are transferred from FuulProject to user's wallet\n\n### Resources\n\n- [Smart Contract Addresses](https://docs.fuul.xyz/protocol/smart-contracts)\n- [Protocol Contracts Source Code](https://github.com/fuul-protocol/protocol-contracts)\n- [Subgraphs](https://docs.fuul.xyz/protocol/subgraphs)\n\n## Rate Limits\n\n- Standard endpoints: 100 requests/minute\n- Batch endpoints: 10 requests/minute\n- Leaderboard endpoints: 60 requests/minute (cached for 1 minute)\n"
  },
  "servers": [
    {
      "url": "https://api.fuul.xyz/api"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Bad Request - Invalid request parameters or malformed request body",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "invalid_identifier": {
                "summary": "Invalid user identifier format",
                "value": {
                  "statusCode": 400,
                  "message": "Invalid user identifier format",
                  "error": "Bad Request"
                }
              },
              "missing_field": {
                "summary": "Missing required field",
                "value": {
                  "statusCode": 400,
                  "message": "Missing required field 'dedup_id'",
                  "error": "Bad Request"
                }
              }
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Unauthorized - Missing or invalid API key",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "missing_key": {
                "summary": "Missing API key",
                "value": {
                  "statusCode": 401,
                  "message": "Missing authorization header",
                  "error": "Unauthorized"
                }
              },
              "invalid_key": {
                "summary": "Invalid API key",
                "value": {
                  "statusCode": 401,
                  "message": "Invalid API key",
                  "error": "Unauthorized"
                }
              }
            }
          }
        }
      },
      "Forbidden": {
        "description": "Forbidden - API key lacks required permissions or scope",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "insufficient_scope": {
                "summary": "Insufficient API key scope",
                "value": {
                  "statusCode": 403,
                  "message": "API key lacks required scope 'service_role'",
                  "error": "Forbidden"
                }
              },
              "project_access_denied": {
                "summary": "Project access denied",
                "value": {
                  "statusCode": 403,
                  "message": "API key does not have access to this project",
                  "error": "Forbidden"
                }
              }
            }
          }
        }
      },
      "NotFound": {
        "description": "Not Found - Requested resource does not exist",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "project_not_found": {
                "summary": "Project not found",
                "value": {
                  "statusCode": 404,
                  "message": "Project not found",
                  "error": "Not Found"
                }
              },
              "resource_not_found": {
                "summary": "Resource not found",
                "value": {
                  "statusCode": 404,
                  "message": "Requested resource does not exist",
                  "error": "Not Found"
                }
              }
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "Too Many Requests - Rate limit exceeded",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "rate_limit": {
                "summary": "Rate limit exceeded",
                "value": {
                  "statusCode": 429,
                  "message": "Rate limit exceeded. Maximum 100 requests per minute.",
                  "error": "Too Many Requests"
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "IdentifierType": {
        "type": "string",
        "enum": [
          "evm_address",
          "solana_address",
          "sui_address",
          "xrpl_address",
          "stellar_address",
          "email",
          "uuid"
        ],
        "example": "evm_address",
        "description": "The type of identifier being used for identifying the user."
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "integer",
            "description": "HTTP status code",
            "example": 400
          },
          "message": {
            "type": "string",
            "description": "Human-readable error message",
            "example": "Invalid user identifier format"
          },
          "error": {
            "type": "string",
            "description": "Error type or category",
            "example": "Bad Request"
          }
        },
        "description": "Standard error response structure returned by all endpoints"
      },
      "ProjectAffiliateTierProtectionPublic": {
        "type": "object",
        "required": [
          "tier_id"
        ],
        "properties": {
          "tier_id": {
            "type": "string",
            "format": "uuid",
            "description": "Project tier id for tier protection."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "Fixed protection end time (ISO 8601). Mutually exclusive with `protection_days`.\n"
          },
          "protection_days": {
            "type": "integer",
            "minimum": 1,
            "maximum": 365,
            "description": "Relative protection length in days; expiry is computed from request time. Mutually exclusive with `expires_at`.\n"
          }
        }
      },
      "UpdateProjectAffiliatePublicRequest": {
        "type": "object",
        "properties": {
          "alias": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "Active",
              "Paused",
              "Flagged",
              "Terminated"
            ]
          },
          "note": {
            "type": "string"
          },
          "audiences": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "approve_project_tier_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Same as create: only manual-approval tiers are approved; other ids ignored. Requires `reviewed_by_user_id` if any listed tier requires manual approval.\n"
          },
          "reviewed_by_user_id": {
            "type": "string",
            "format": "uuid",
            "description": "Required when manual approval is needed for `tier_protection` or for any id in `approve_project_tier_ids` that requires manual approval.\n"
          },
          "tier_protection": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ProjectAffiliateTierProtectionPublic"
              }
            ],
            "description": "Set or replace protection using the object shape. Omit the field or send `null` to clear tier protection for this affiliate.\n"
          }
        }
      },
      "ProjectAffiliatePublicTierSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "rank": {
            "type": "integer"
          }
        }
      },
      "ProjectAffiliatePublicProtection": {
        "type": "object",
        "properties": {
          "tier_id": {
            "type": "string",
            "format": "uuid"
          },
          "tier_name": {
            "type": "string"
          },
          "tier_rank": {
            "type": "integer"
          },
          "ends_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "is_below_effective": {
            "type": "boolean"
          },
          "is_pending_approval": {
            "type": "boolean"
          }
        }
      },
      "ProjectAffiliatePublicAudienceItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "badge_name": {
            "type": "string",
            "nullable": true
          },
          "badge_description": {
            "type": "string",
            "nullable": true
          },
          "badge_image": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "ProjectAffiliatePublicTax": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Stored tax info status when a row exists."
          },
          "expires_at": {
            "type": "string",
            "nullable": true,
            "description": "Expiry date (YYYY-MM-DD) when applicable."
          }
        }
      },
      "ProjectAffiliatePublicDetail": {
        "type": "object",
        "description": "Project-scoped affiliate row with tier summaries, protections, audiences for the project, and tax status when known.\n",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "user_identifier": {
            "type": "string"
          },
          "user_identifier_type": {
            "$ref": "#/components/schemas/IdentifierType"
          },
          "status": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "alias": {
            "type": "string",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "organic_tier": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ProjectAffiliatePublicTierSummary"
              }
            ]
          },
          "tier_approval_status": {
            "type": "string",
            "nullable": true
          },
          "current_tier": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ProjectAffiliatePublicTierSummary"
              }
            ]
          },
          "protections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectAffiliatePublicProtection"
            }
          },
          "protection_status": {
            "type": "string",
            "nullable": true,
            "enum": [
              "protected",
              "expiring",
              "expired"
            ],
            "description": "Derived tier-protection status. `protected` while the protection has more than 30 days left,\n`expiring` within its last 30 days, and `expired` for the 7 days after it lapses.\nNull when the affiliate has no protection, when the protection never pinned its tier\n(awaiting manual approval, or ranked below the effective tier), or once it has been expired\nfor more than 7 days.\n"
          },
          "protection_expires_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Expiry backing `protection_status`; null whenever that is null."
          },
          "audiences": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectAffiliatePublicAudienceItem"
            }
          },
          "tax": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ProjectAffiliatePublicTax"
              }
            ]
          }
        }
      }
    }
  },
  "paths": {
    "/v1/project-affiliates/{projectAffiliateId}": {
      "parameters": [
        {
          "name": "projectAffiliateId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "description": "Project affiliate row id (`projects_affiliates.id`)."
        }
      ],
      "patch": {
        "operationId": "updateProjectAffiliatePublic",
        "summary": "Update project affiliate (managed)",
        "description": "Partially updates configuration, audiences, optional tier protection, and optional tier approvals for a project affiliate.\nSend `tier_protection: null` to clear protection. Include `reviewed_by_user_id` when manual tier approval is required\n(`tier_protection` manual tier or `approve_project_tier_ids` listing any manual tier).\n",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProjectAffiliatePublicRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectAffiliatePublicDetail"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Affiliates"
        ]
      }
    }
  }
}
````