← Documentation home
PATCH/hyax-api/v1/community/settings

Update community access settings

Replaces all access requirements atomically.

Base URL: https://platform.hyax.com · Replace YOUR_API_KEY with your team API key.

Request body

FieldRequiredDescription
accessTypeYes`FREE` | `PAID`
requiredProductIdsNoString array of product IDs (when PAID)
requiredMembershipPlanIdsNoString array of membership plan IDs (when PAID)

Request examples

Same request in cURL, Node.js (fetch), and PHP (ext-curl).

curl -X PATCH 'https://platform.hyax.com/hyax-api/v1/community/settings' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "accessType": "PAID",
    "requiredProductIds": [],
    "requiredMembershipPlanIds": [
      "clx…"
    ]
  }'

Example response

Shape varies by data; values are illustrative.

{
  "success": true,
  "data": {
    "accessType": "PAID",
    "requiredProducts": [],
    "requiredMembershipPlans": [{ "id": "clx…", "name": "Pro", "status": "ACTIVE" }]
  }
}