SnozeDevelopers
API referenceDatabases

Reorder a database's validation rules

Sets the order the rules are evaluated in. `orderedIds` must list every rule on the database exactly once; a partial order is rejected rather than reshuffling the rules it omits. Requires the `databases:write` permission. Send an `Idempotency-Key` header to make retries safe; a replay within the window returns the original response.

POST
/v1/workspaces/{workspaceId}/databases/{databaseId}/validation-rules/reorder

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

Request Body

application/json
  1. body
orderedIds*array<string>
clientMutationId?string|null

Response Body

Success

application/json
  1. response
data*array<>
Example Request
curl -X POST 'https://api.snoze.dev/v1/workspaces/string/databases/string/validation-rules/reorder' \  -H 'Content-Type: application/json' \  -d '{  "orderedIds": [    "string"  ]}'
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"    }  ]}