Skip to content
API reference/Site members

Change who may join

Try it

Sets who may become a member of the site. Applies on the live site at once.

PATCH/api/v1/sites/{site_id}/members

Authentication

An API key as Authorization: Bearer or x-api-key. It needs the members:write scope — approve, add and remove site members; mark pages members only (live at once).

members:writeChanges the live siteIdempotency-Key optionalMCP tool: update_site_members

Parameters

Named placeholders go in the path; the rest in a JSON body.

site_idstringPath · required
The site's id.1 to 100 characters
signupstringBody · required
approve = anyone may ask, you approve each one; open = anyone who confirms their email; invite = only people you add.One of: approve, open, invite

Response

200 with JSON on success (schema on the right). Errors use the standard envelope; a retry with the same Idempotency-Key gets the first answer back (how retries work).

curl
curl -X PATCH 'https://websites.workflowcorp.com/api/v1/sites/SITE_ID/members' \
  -H "Authorization: Bearer $WEBSITEBUDDY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"signup":"approve"}'
Example arguments
{
  "site_id": "SITE_ID",
  "signup": "approve"
}
Response schema
{
  "type": "object",
  "properties": {
    "signup": {
      "type": "string",
      "enum": [
        "approve",
        "open",
        "invite"
      ],
      "description": "approve = anyone may ask, you approve each one; open = anyone who confirms their email; invite = only people you add."
    },
    "members_only_pages": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "slug"
        ],
        "additionalProperties": false
      }
    },
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "approved"
            ],
            "description": "pending = asked to join, waiting for approval; approved = may sign in."
          },
          "added_by": {
            "type": "string",
            "enum": [
              "visitor",
              "business"
            ]
          },
          "approved_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_sign_in_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "is_sample": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "email",
          "status",
          "added_by",
          "approved_at",
          "last_sign_in_at",
          "created_at",
          "is_sample"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "signup",
    "members_only_pages",
    "data"
  ],
  "additionalProperties": false
}