SnozeDevelopers
API referenceDatabases

Update a validation rule

Changes the rule's label, condition, message, severity, anchored field, enabled flag or order; disabling a rule stops it running without losing its definition. Requires the `databases:write` permission and responds with not-found for an unknown rule. Send an `Idempotency-Key` header to make retries safe; a replay within the window returns the original response.

PATCH
/v1/workspaces/{workspaceId}/databases/{databaseId}/validation-rules/{ruleId}

Authorization

apiKey
headerAuthorizationBearer <snoze_sk_…>

Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.

Path Parameters

workspaceId*string
databaseId*string
ruleId*string

Request Body

application/json
  1. body
label?|null
condition?|null
message?|null
severity?|null
fieldKey?string|null|null
enabled?boolean|null
order?number|null
clientMutationId?string|null

Response Body

Success

application/json
  1. response
data*
Example Request
curl -X PATCH 'https://api.snoze.dev/v1/workspaces/string/databases/string/validation-rules/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "data": {    "id": "string",    "workspaceId": "string",    "databaseId": "string",    "label": "string",    "condition": "string",    "message": "string",    "severity": "block",    "fieldKey": "string",    "enabled": true,    "order": 0,    "createdAt": "string",    "updatedAt": "string"  }}