Inbound
Update account-level blocklist rule
Updates an existing account-level blocklist rule. Can update metadata and/or conditions. When updating conditions, the entire condition type is replaced.
PATCH
/
inbound
/
account
/
blocklist
/
{uuid}
Update account-level blocklist rule
curl --request PATCH \
--url https://api.jetemail.com/inbound/account/blocklist/{uuid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"enabled": true,
"senders": [
{}
],
"recipients": [
{}
],
"subjects": [
{}
],
"body": [
{}
],
"headers": [
{}
],
"ips": [
{}
],
"size": {},
"attachments": [
{}
]
}
'import requests
url = "https://api.jetemail.com/inbound/account/blocklist/{uuid}"
payload = {
"name": "<string>",
"description": "<string>",
"enabled": True,
"senders": [{}],
"recipients": [{}],
"subjects": [{}],
"body": [{}],
"headers": [{}],
"ips": [{}],
"size": {},
"attachments": [{}]
}
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>',
enabled: true,
senders: [{}],
recipients: [{}],
subjects: [{}],
body: JSON.stringify([{}]),
headers: [{}],
ips: [{}],
size: {},
attachments: [{}]
})
};
fetch('https://api.jetemail.com/inbound/account/blocklist/{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.jetemail.com/inbound/account/blocklist/{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>',
'enabled' => true,
'senders' => [
[
]
],
'recipients' => [
[
]
],
'subjects' => [
[
]
],
'body' => [
[
]
],
'headers' => [
[
]
],
'ips' => [
[
]
],
'size' => [
],
'attachments' => [
[
]
]
]),
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.jetemail.com/inbound/account/blocklist/{uuid}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\n \"senders\": [\n {}\n ],\n \"recipients\": [\n {}\n ],\n \"subjects\": [\n {}\n ],\n \"body\": [\n {}\n ],\n \"headers\": [\n {}\n ],\n \"ips\": [\n {}\n ],\n \"size\": {},\n \"attachments\": [\n {}\n ]\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.jetemail.com/inbound/account/blocklist/{uuid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\n \"senders\": [\n {}\n ],\n \"recipients\": [\n {}\n ],\n \"subjects\": [\n {}\n ],\n \"body\": [\n {}\n ],\n \"headers\": [\n {}\n ],\n \"ips\": [\n {}\n ],\n \"size\": {},\n \"attachments\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jetemail.com/inbound/account/blocklist/{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 \"enabled\": true,\n \"senders\": [\n {}\n ],\n \"recipients\": [\n {}\n ],\n \"subjects\": [\n {}\n ],\n \"body\": [\n {}\n ],\n \"headers\": [\n {}\n ],\n \"ips\": [\n {}\n ],\n \"size\": {},\n \"attachments\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"success": false,
"error": "No fields to update"
}{
"success": false,
"error": "Forbidden"
}{
"success": false,
"error": "Not found"
}Authorizations
API key for account management endpoints. Use your api_ prefixed token.
Path Parameters
UUID of the account blocklist rule to update
Body
application/json
Response
Rule updated successfully
Example:
true
⌘I
Update account-level blocklist rule
curl --request PATCH \
--url https://api.jetemail.com/inbound/account/blocklist/{uuid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"enabled": true,
"senders": [
{}
],
"recipients": [
{}
],
"subjects": [
{}
],
"body": [
{}
],
"headers": [
{}
],
"ips": [
{}
],
"size": {},
"attachments": [
{}
]
}
'import requests
url = "https://api.jetemail.com/inbound/account/blocklist/{uuid}"
payload = {
"name": "<string>",
"description": "<string>",
"enabled": True,
"senders": [{}],
"recipients": [{}],
"subjects": [{}],
"body": [{}],
"headers": [{}],
"ips": [{}],
"size": {},
"attachments": [{}]
}
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>',
enabled: true,
senders: [{}],
recipients: [{}],
subjects: [{}],
body: JSON.stringify([{}]),
headers: [{}],
ips: [{}],
size: {},
attachments: [{}]
})
};
fetch('https://api.jetemail.com/inbound/account/blocklist/{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.jetemail.com/inbound/account/blocklist/{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>',
'enabled' => true,
'senders' => [
[
]
],
'recipients' => [
[
]
],
'subjects' => [
[
]
],
'body' => [
[
]
],
'headers' => [
[
]
],
'ips' => [
[
]
],
'size' => [
],
'attachments' => [
[
]
]
]),
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.jetemail.com/inbound/account/blocklist/{uuid}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\n \"senders\": [\n {}\n ],\n \"recipients\": [\n {}\n ],\n \"subjects\": [\n {}\n ],\n \"body\": [\n {}\n ],\n \"headers\": [\n {}\n ],\n \"ips\": [\n {}\n ],\n \"size\": {},\n \"attachments\": [\n {}\n ]\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.jetemail.com/inbound/account/blocklist/{uuid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\n \"senders\": [\n {}\n ],\n \"recipients\": [\n {}\n ],\n \"subjects\": [\n {}\n ],\n \"body\": [\n {}\n ],\n \"headers\": [\n {}\n ],\n \"ips\": [\n {}\n ],\n \"size\": {},\n \"attachments\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jetemail.com/inbound/account/blocklist/{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 \"enabled\": true,\n \"senders\": [\n {}\n ],\n \"recipients\": [\n {}\n ],\n \"subjects\": [\n {}\n ],\n \"body\": [\n {}\n ],\n \"headers\": [\n {}\n ],\n \"ips\": [\n {}\n ],\n \"size\": {},\n \"attachments\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"success": false,
"error": "No fields to update"
}{
"success": false,
"error": "Forbidden"
}{
"success": false,
"error": "Not found"
}