Update a custom notification rule
curl --request PATCH \
--url https://api.journeybee.io/v1/notification-rules/{uuid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"event_patterns": [
"<string>"
],
"schedule_config": {
"kind": "deal_expiration",
"days_before": 18250
},
"conditions": [
{
"field": "<string>",
"value": "<unknown>"
}
],
"recipient_config": {
"role": "<string>",
"user_uuids": [
"<string>"
]
},
"channels": [],
"email_config": {
"header": "<string>",
"footer": "<string>",
"button_label": "<string>",
"show_branding": true
},
"title_template": "<string>",
"body_template": "<string>",
"sort_order": 1073741823,
"is_active": true
}
'import requests
url = "https://api.journeybee.io/v1/notification-rules/{uuid}"
payload = {
"name": "<string>",
"description": "<string>",
"event_patterns": ["<string>"],
"schedule_config": {
"kind": "deal_expiration",
"days_before": 18250
},
"conditions": [
{
"field": "<string>",
"value": "<unknown>"
}
],
"recipient_config": {
"role": "<string>",
"user_uuids": ["<string>"]
},
"channels": [],
"email_config": {
"header": "<string>",
"footer": "<string>",
"button_label": "<string>",
"show_branding": True
},
"title_template": "<string>",
"body_template": "<string>",
"sort_order": 1073741823,
"is_active": True
}
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>',
description: '<string>',
event_patterns: ['<string>'],
schedule_config: {kind: 'deal_expiration', days_before: 18250},
conditions: [{field: '<string>', value: '<unknown>'}],
recipient_config: {role: '<string>', user_uuids: ['<string>']},
channels: [],
email_config: {
header: '<string>',
footer: '<string>',
button_label: '<string>',
show_branding: true
},
title_template: '<string>',
body_template: '<string>',
sort_order: 1073741823,
is_active: true
})
};
fetch('https://api.journeybee.io/v1/notification-rules/{uuid}', 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.journeybee.io/v1/notification-rules/{uuid}",
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>',
'description' => '<string>',
'event_patterns' => [
'<string>'
],
'schedule_config' => [
'kind' => 'deal_expiration',
'days_before' => 18250
],
'conditions' => [
[
'field' => '<string>',
'value' => '<unknown>'
]
],
'recipient_config' => [
'role' => '<string>',
'user_uuids' => [
'<string>'
]
],
'channels' => [
],
'email_config' => [
'header' => '<string>',
'footer' => '<string>',
'button_label' => '<string>',
'show_branding' => true
],
'title_template' => '<string>',
'body_template' => '<string>',
'sort_order' => 1073741823,
'is_active' => true
]),
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.journeybee.io/v1/notification-rules/{uuid}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"event_patterns\": [\n \"<string>\"\n ],\n \"schedule_config\": {\n \"kind\": \"deal_expiration\",\n \"days_before\": 18250\n },\n \"conditions\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"recipient_config\": {\n \"role\": \"<string>\",\n \"user_uuids\": [\n \"<string>\"\n ]\n },\n \"channels\": [],\n \"email_config\": {\n \"header\": \"<string>\",\n \"footer\": \"<string>\",\n \"button_label\": \"<string>\",\n \"show_branding\": true\n },\n \"title_template\": \"<string>\",\n \"body_template\": \"<string>\",\n \"sort_order\": 1073741823,\n \"is_active\": true\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.journeybee.io/v1/notification-rules/{uuid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"event_patterns\": [\n \"<string>\"\n ],\n \"schedule_config\": {\n \"kind\": \"deal_expiration\",\n \"days_before\": 18250\n },\n \"conditions\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"recipient_config\": {\n \"role\": \"<string>\",\n \"user_uuids\": [\n \"<string>\"\n ]\n },\n \"channels\": [],\n \"email_config\": {\n \"header\": \"<string>\",\n \"footer\": \"<string>\",\n \"button_label\": \"<string>\",\n \"show_branding\": true\n },\n \"title_template\": \"<string>\",\n \"body_template\": \"<string>\",\n \"sort_order\": 1073741823,\n \"is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.journeybee.io/v1/notification-rules/{uuid}")
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 \"description\": \"<string>\",\n \"event_patterns\": [\n \"<string>\"\n ],\n \"schedule_config\": {\n \"kind\": \"deal_expiration\",\n \"days_before\": 18250\n },\n \"conditions\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"recipient_config\": {\n \"role\": \"<string>\",\n \"user_uuids\": [\n \"<string>\"\n ]\n },\n \"channels\": [],\n \"email_config\": {\n \"header\": \"<string>\",\n \"footer\": \"<string>\",\n \"button_label\": \"<string>\",\n \"show_branding\": true\n },\n \"title_template\": \"<string>\",\n \"body_template\": \"<string>\",\n \"sort_order\": 1073741823,\n \"is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"uuid": "<string>",
"name": "<string>",
"description": "<string>",
"is_active": true,
"is_system": true,
"is_transactional": true,
"event_patterns": [
"<string>"
],
"schedule_config": {
"kind": "deal_expiration",
"days_before": 18250
},
"conditions": [
{
"field": "<string>",
"operator": "eq",
"value": "<unknown>"
}
],
"has_app_only_conditions": true,
"recipient_type": "actor",
"recipient_config": {
"role": "<string>",
"user_uuids": [
"<string>"
]
},
"channels": [
"in_app"
],
"integration_destination": {
"provider": "slack",
"channel_name": "<string>",
"channel_type": "public"
},
"email_config": {
"header": "<string>",
"footer": "<string>",
"button_label": "<string>",
"button_object": "lead",
"show_branding": true
},
"audience": "company",
"title_template": "<string>",
"body_template": "<string>",
"sort_order": 123,
"created_at": "<string>",
"updated_at": "<string>",
"last_triggered_at": "<string>",
"trigger_count": 123
}Notification Rules
Update a custom notification rule
Custom rules only: a system rule answers 403, use updateNotificationRuleSystemSettings for those. Only the fields you send change. Sending channels without a Slack or Teams destination removes that destination.
PATCH
/
notification-rules
/
{uuid}
Update a custom notification rule
curl --request PATCH \
--url https://api.journeybee.io/v1/notification-rules/{uuid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"event_patterns": [
"<string>"
],
"schedule_config": {
"kind": "deal_expiration",
"days_before": 18250
},
"conditions": [
{
"field": "<string>",
"value": "<unknown>"
}
],
"recipient_config": {
"role": "<string>",
"user_uuids": [
"<string>"
]
},
"channels": [],
"email_config": {
"header": "<string>",
"footer": "<string>",
"button_label": "<string>",
"show_branding": true
},
"title_template": "<string>",
"body_template": "<string>",
"sort_order": 1073741823,
"is_active": true
}
'import requests
url = "https://api.journeybee.io/v1/notification-rules/{uuid}"
payload = {
"name": "<string>",
"description": "<string>",
"event_patterns": ["<string>"],
"schedule_config": {
"kind": "deal_expiration",
"days_before": 18250
},
"conditions": [
{
"field": "<string>",
"value": "<unknown>"
}
],
"recipient_config": {
"role": "<string>",
"user_uuids": ["<string>"]
},
"channels": [],
"email_config": {
"header": "<string>",
"footer": "<string>",
"button_label": "<string>",
"show_branding": True
},
"title_template": "<string>",
"body_template": "<string>",
"sort_order": 1073741823,
"is_active": True
}
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>',
description: '<string>',
event_patterns: ['<string>'],
schedule_config: {kind: 'deal_expiration', days_before: 18250},
conditions: [{field: '<string>', value: '<unknown>'}],
recipient_config: {role: '<string>', user_uuids: ['<string>']},
channels: [],
email_config: {
header: '<string>',
footer: '<string>',
button_label: '<string>',
show_branding: true
},
title_template: '<string>',
body_template: '<string>',
sort_order: 1073741823,
is_active: true
})
};
fetch('https://api.journeybee.io/v1/notification-rules/{uuid}', 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.journeybee.io/v1/notification-rules/{uuid}",
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>',
'description' => '<string>',
'event_patterns' => [
'<string>'
],
'schedule_config' => [
'kind' => 'deal_expiration',
'days_before' => 18250
],
'conditions' => [
[
'field' => '<string>',
'value' => '<unknown>'
]
],
'recipient_config' => [
'role' => '<string>',
'user_uuids' => [
'<string>'
]
],
'channels' => [
],
'email_config' => [
'header' => '<string>',
'footer' => '<string>',
'button_label' => '<string>',
'show_branding' => true
],
'title_template' => '<string>',
'body_template' => '<string>',
'sort_order' => 1073741823,
'is_active' => true
]),
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.journeybee.io/v1/notification-rules/{uuid}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"event_patterns\": [\n \"<string>\"\n ],\n \"schedule_config\": {\n \"kind\": \"deal_expiration\",\n \"days_before\": 18250\n },\n \"conditions\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"recipient_config\": {\n \"role\": \"<string>\",\n \"user_uuids\": [\n \"<string>\"\n ]\n },\n \"channels\": [],\n \"email_config\": {\n \"header\": \"<string>\",\n \"footer\": \"<string>\",\n \"button_label\": \"<string>\",\n \"show_branding\": true\n },\n \"title_template\": \"<string>\",\n \"body_template\": \"<string>\",\n \"sort_order\": 1073741823,\n \"is_active\": true\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.journeybee.io/v1/notification-rules/{uuid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"event_patterns\": [\n \"<string>\"\n ],\n \"schedule_config\": {\n \"kind\": \"deal_expiration\",\n \"days_before\": 18250\n },\n \"conditions\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"recipient_config\": {\n \"role\": \"<string>\",\n \"user_uuids\": [\n \"<string>\"\n ]\n },\n \"channels\": [],\n \"email_config\": {\n \"header\": \"<string>\",\n \"footer\": \"<string>\",\n \"button_label\": \"<string>\",\n \"show_branding\": true\n },\n \"title_template\": \"<string>\",\n \"body_template\": \"<string>\",\n \"sort_order\": 1073741823,\n \"is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.journeybee.io/v1/notification-rules/{uuid}")
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 \"description\": \"<string>\",\n \"event_patterns\": [\n \"<string>\"\n ],\n \"schedule_config\": {\n \"kind\": \"deal_expiration\",\n \"days_before\": 18250\n },\n \"conditions\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"recipient_config\": {\n \"role\": \"<string>\",\n \"user_uuids\": [\n \"<string>\"\n ]\n },\n \"channels\": [],\n \"email_config\": {\n \"header\": \"<string>\",\n \"footer\": \"<string>\",\n \"button_label\": \"<string>\",\n \"show_branding\": true\n },\n \"title_template\": \"<string>\",\n \"body_template\": \"<string>\",\n \"sort_order\": 1073741823,\n \"is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"uuid": "<string>",
"name": "<string>",
"description": "<string>",
"is_active": true,
"is_system": true,
"is_transactional": true,
"event_patterns": [
"<string>"
],
"schedule_config": {
"kind": "deal_expiration",
"days_before": 18250
},
"conditions": [
{
"field": "<string>",
"operator": "eq",
"value": "<unknown>"
}
],
"has_app_only_conditions": true,
"recipient_type": "actor",
"recipient_config": {
"role": "<string>",
"user_uuids": [
"<string>"
]
},
"channels": [
"in_app"
],
"integration_destination": {
"provider": "slack",
"channel_name": "<string>",
"channel_type": "public"
},
"email_config": {
"header": "<string>",
"footer": "<string>",
"button_label": "<string>",
"button_object": "lead",
"show_branding": true
},
"audience": "company",
"title_template": "<string>",
"body_template": "<string>",
"sort_order": 123,
"created_at": "<string>",
"updated_at": "<string>",
"last_triggered_at": "<string>",
"trigger_count": 123
}Authorizations
Path Parameters
Body
application/json
Response
200 - application/json
Default Response