API reference

Download spec
put

Update notification rule

Updates a rule's name, description, event types, enabled flag, or channel targets. When `channels` is sent it replaces all existing targets.

Required API key scope
notifications:update
/api/v1/team/notifications/rules/{ruleId}

Code samples

curl --request PUT \
  --url https://api.emailguard.co/api/v1/team/notifications/rules/YOUR_ID \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{}'

Parameters

Path parameters

NameTypeDescription
ruleIdrequiredstring

UUID of the notification rule to update

Request body

Fields to update on the rule

channelsunknown[]

Replaces all channel targets when provided.

conditionsobject

Updated conditions. Omit to leave unchanged.

descriptionstring

Updated description. Omit to leave unchanged.

event_typesstring[]

Updated event types. Omit to leave unchanged.

itemsstring
is_enabledboolean

Enable or disable delivery for this rule.

namestring

Updated display name. Omit to leave unchanged.

Responses

200
OK
OK
codestringrequired

Machine-readable status code (for example OK or INVALID_BODY).

messagestring

Human-readable detail when the code is not OK.

400
Bad Request
Bad Request
codestringrequired

Machine-readable status code (for example OK or INVALID_BODY).

messagestring

Human-readable detail when the code is not OK.

401
Unauthorized
Unauthorized
codestringrequired

Machine-readable status code (for example OK or INVALID_BODY).

messagestring

Human-readable detail when the code is not OK.

403
Forbidden
Forbidden
codestringrequired

Machine-readable status code (for example OK or INVALID_BODY).

messagestring

Human-readable detail when the code is not OK.