curl --request PATCH \
--url https://api.1club.ai/v1/platform/document-rules/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"documentIds": [
123
],
"isActive": true,
"mandatoryToAccept": true,
"requiresTypedNameAcceptance": true,
"requiredForEntry": true,
"filters": {
"contactTypes": [],
"planIds": [
123
],
"tags": [
123
],
"householdRoles": []
}
}
'import requests
url = "https://api.1club.ai/v1/platform/document-rules/{id}"
payload = {
"name": "<string>",
"documentIds": [123],
"isActive": True,
"mandatoryToAccept": True,
"requiresTypedNameAcceptance": True,
"requiredForEntry": True,
"filters": {
"contactTypes": [],
"planIds": [123],
"tags": [123],
"householdRoles": []
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
documentIds: [123],
isActive: true,
mandatoryToAccept: true,
requiresTypedNameAcceptance: true,
requiredForEntry: true,
filters: {contactTypes: [], planIds: [123], tags: [123], householdRoles: []}
})
};
fetch('https://api.1club.ai/v1/platform/document-rules/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.1club.ai/v1/platform/document-rules/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'documentIds' => [
123
],
'isActive' => true,
'mandatoryToAccept' => true,
'requiresTypedNameAcceptance' => true,
'requiredForEntry' => true,
'filters' => [
'contactTypes' => [
],
'planIds' => [
123
],
'tags' => [
123
],
'householdRoles' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.1club.ai/v1/platform/document-rules/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"documentIds\": [\n 123\n ],\n \"isActive\": true,\n \"mandatoryToAccept\": true,\n \"requiresTypedNameAcceptance\": true,\n \"requiredForEntry\": true,\n \"filters\": {\n \"contactTypes\": [],\n \"planIds\": [\n 123\n ],\n \"tags\": [\n 123\n ],\n \"householdRoles\": []\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.1club.ai/v1/platform/document-rules/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"documentIds\": [\n 123\n ],\n \"isActive\": true,\n \"mandatoryToAccept\": true,\n \"requiresTypedNameAcceptance\": true,\n \"requiredForEntry\": true,\n \"filters\": {\n \"contactTypes\": [],\n \"planIds\": [\n 123\n ],\n \"tags\": [\n 123\n ],\n \"householdRoles\": []\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/document-rules/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"documentIds\": [\n 123\n ],\n \"isActive\": true,\n \"mandatoryToAccept\": true,\n \"requiresTypedNameAcceptance\": true,\n \"requiredForEntry\": true,\n \"filters\": {\n \"contactTypes\": [],\n \"planIds\": [\n 123\n ],\n \"tags\": [\n 123\n ],\n \"householdRoles\": []\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"description": "<string>",
"isActive": true,
"mandatoryToAccept": true,
"requiresTypedNameAcceptance": true,
"requiredForEntry": true,
"consentChannel": "marketing_email",
"filters": {
"contactTypes": [
"<string>"
],
"planIds": [
123
],
"tags": [
123
],
"householdRoles": [
"<string>"
]
},
"documentIds": [
123
],
"documents": [
{
"id": 123,
"title": "<string>",
"slug": "<string>",
"status": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Update a document rule
Edits a document rule. Send only what changes; an omitted field is left alone, and an empty body is a 400.
documentIds and filters each replace the stored value wholesale when sent: filters is one object, and an axis you leave out of it is cleared (it then means everyone). Read the rule first and send the whole filter set you want. A plan or tag id already on the rule is kept even if it no longer exists; one you add must be the organization’s.
Switching a rule to optional (mandatoryToAccept: false) also switches off its typed-name and entry requirements; switching it to mandatory clears its consentChannel. Explicitly asking for a combination that cannot exist is a 400 with code DOCUMENT_RULE_FLAGS_CONFLICT. Changing a rule never un-signs anybody: signatures already made stay on file.
curl --request PATCH \
--url https://api.1club.ai/v1/platform/document-rules/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"documentIds": [
123
],
"isActive": true,
"mandatoryToAccept": true,
"requiresTypedNameAcceptance": true,
"requiredForEntry": true,
"filters": {
"contactTypes": [],
"planIds": [
123
],
"tags": [
123
],
"householdRoles": []
}
}
'import requests
url = "https://api.1club.ai/v1/platform/document-rules/{id}"
payload = {
"name": "<string>",
"documentIds": [123],
"isActive": True,
"mandatoryToAccept": True,
"requiresTypedNameAcceptance": True,
"requiredForEntry": True,
"filters": {
"contactTypes": [],
"planIds": [123],
"tags": [123],
"householdRoles": []
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
documentIds: [123],
isActive: true,
mandatoryToAccept: true,
requiresTypedNameAcceptance: true,
requiredForEntry: true,
filters: {contactTypes: [], planIds: [123], tags: [123], householdRoles: []}
})
};
fetch('https://api.1club.ai/v1/platform/document-rules/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.1club.ai/v1/platform/document-rules/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'documentIds' => [
123
],
'isActive' => true,
'mandatoryToAccept' => true,
'requiresTypedNameAcceptance' => true,
'requiredForEntry' => true,
'filters' => [
'contactTypes' => [
],
'planIds' => [
123
],
'tags' => [
123
],
'householdRoles' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.1club.ai/v1/platform/document-rules/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"documentIds\": [\n 123\n ],\n \"isActive\": true,\n \"mandatoryToAccept\": true,\n \"requiresTypedNameAcceptance\": true,\n \"requiredForEntry\": true,\n \"filters\": {\n \"contactTypes\": [],\n \"planIds\": [\n 123\n ],\n \"tags\": [\n 123\n ],\n \"householdRoles\": []\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.1club.ai/v1/platform/document-rules/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"documentIds\": [\n 123\n ],\n \"isActive\": true,\n \"mandatoryToAccept\": true,\n \"requiresTypedNameAcceptance\": true,\n \"requiredForEntry\": true,\n \"filters\": {\n \"contactTypes\": [],\n \"planIds\": [\n 123\n ],\n \"tags\": [\n 123\n ],\n \"householdRoles\": []\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/document-rules/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"documentIds\": [\n 123\n ],\n \"isActive\": true,\n \"mandatoryToAccept\": true,\n \"requiresTypedNameAcceptance\": true,\n \"requiredForEntry\": true,\n \"filters\": {\n \"contactTypes\": [],\n \"planIds\": [\n 123\n ],\n \"tags\": [\n 123\n ],\n \"householdRoles\": []\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"description": "<string>",
"isActive": true,
"mandatoryToAccept": true,
"requiresTypedNameAcceptance": true,
"requiredForEntry": true,
"consentChannel": "marketing_email",
"filters": {
"contactTypes": [
"<string>"
],
"planIds": [
123
],
"tags": [
123
],
"householdRoles": [
"<string>"
]
},
"documentIds": [
123
],
"documents": [
{
"id": 123,
"title": "<string>",
"slug": "<string>",
"status": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Authorizations
Organization-scoped bearer credential: a customer API key (1club_sk_live_...) or an MCP OAuth access token.
Headers
Retry-safe key; a repeat of the same request replays the first response
255Path Parameters
Document rule id
Body
Fields accepted when updating a document rule. Send only what changes; documentIds and filters replace the stored value wholesale. Unknown fields are refused.
Internal name, shown to staff in the admin portal.
1 - 255The documents the rule requires: content ids of type document in this organization. Duplicates are ignored. Replaces the whole set when sent on an update.
1 - 50 elementsA switched-off rule asks nobody. Defaults to true on create.
true: members must accept before they can finish setting up their account. false: optional - members may decline. Defaults to true on create.
Members must scroll to the end and type their full name, instead of ticking a box. Mandatory rules only.
A matching member who has not signed cannot check themselves in (tablet, member QR, portal, door access) until they do. Staff check-in is never refused. Mandatory rules only.
Optional rules only: each member's answer is also written to this channel's marketing consent. null records nothing.
marketing_email, marketing_sms, whatsapp, null Who the rule asks. Every axis means everyone when empty or left out. Sent as one object that replaces the stored filters wholesale: an axis left out is cleared. Plan and tag ids must be the organization's (an id already on the rule is kept even if it no longer exists).
Show child attributes
Show child attributes
Response
The updated document rule
A document rule: which members are asked to read and accept which documents, and how.
true: members must accept to finish setting up their account. false: optional, they may decline.
Members type their full name to accept. Only ever true on a mandatory rule.
An unsigned matching member cannot check themselves in. Only ever true on a mandatory rule.
The marketing channel each answer is written to. Only ever set on an optional rule.
marketing_email, marketing_sms, whatsapp, null Who the rule asks. Every axis means everyone when empty; a member must match every axis the rule sets.
Show child attributes
Show child attributes
The documents the rule requires, ascending.
Show child attributes
Show child attributes
Was this page helpful?