Skip to main content
Update Rule
Updates a rule’s title or description. Only space admins can update rules.

Path Parameters

string
required
UUID of the space.
string
required
UUID of the rule to update.

Body Parameters

string
Updated title.
string | null
Updated description. Pass null to clear.
string
Required with a service key: the user this request acts as. The request has exactly that user’s permissions, so it is refused unless they are an admin of the space, and it is recorded as theirs. A user token always acts as its own user and must not send it (400 space/acting-user-not-allowed).

Response

The updated Rule object.

Error Responses

Returned when spaceId or ruleId isn’t a valid UUID. Checked before sign-in, permissions and the endpoint’s other checks.
A service key sent no actingUserId.
actingUserId is not a user id.
A user token sent actingUserId, even naming its own user. Only a service key names the user it acts as; a user token always acts as its own user.
actingUserId was sent in the query string. On this endpoint every field, actingUserId included, goes in the request body.
Returned when a service key names an actingUserId that isn’t a user in this project.
The caller (or the user named by actingUserId) is not an admin of the space.
See also: useUpdateRule