cURL
curl --request GET \
--url https://www.getinboxzero.com/api/v1/rules/{id} \
--header 'API-Key: <api-key>'import requests
url = "https://www.getinboxzero.com/api/v1/rules/{id}"
headers = {"API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'API-Key': '<api-key>'}};
fetch('https://www.getinboxzero.com/api/v1/rules/{id}', 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://www.getinboxzero.com/api/v1/rules/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.getinboxzero.com/api/v1/rules/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.getinboxzero.com/api/v1/rules/{id}")
.header("API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.getinboxzero.com/api/v1/rules/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"rule": {
"id": "<string>",
"name": "<string>",
"enabled": true,
"runOnThreads": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"condition": {
"aiInstructions": "<string>",
"static": {
"from": "<string>",
"to": "<string>",
"subject": "<string>"
}
},
"actions": [
{
"messagingChannelId": "<string>",
"fields": {
"label": "<string>",
"to": "<string>",
"cc": "<string>",
"bcc": "<string>",
"subject": "<string>",
"content": "<string>",
"webhookUrl": "<string>",
"folderName": "<string>"
},
"delayInMinutes": 123
}
]
}
}API
Get rule
Get a single automation rule for the scoped inbox account.
GET
/
rules
/
{id}
cURL
curl --request GET \
--url https://www.getinboxzero.com/api/v1/rules/{id} \
--header 'API-Key: <api-key>'import requests
url = "https://www.getinboxzero.com/api/v1/rules/{id}"
headers = {"API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'API-Key': '<api-key>'}};
fetch('https://www.getinboxzero.com/api/v1/rules/{id}', 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://www.getinboxzero.com/api/v1/rules/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.getinboxzero.com/api/v1/rules/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.getinboxzero.com/api/v1/rules/{id}")
.header("API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.getinboxzero.com/api/v1/rules/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"rule": {
"id": "<string>",
"name": "<string>",
"enabled": true,
"runOnThreads": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"condition": {
"aiInstructions": "<string>",
"static": {
"from": "<string>",
"to": "<string>",
"subject": "<string>"
}
},
"actions": [
{
"messagingChannelId": "<string>",
"fields": {
"label": "<string>",
"to": "<string>",
"cc": "<string>",
"bcc": "<string>",
"subject": "<string>",
"content": "<string>",
"webhookUrl": "<string>",
"folderName": "<string>"
},
"delayInMinutes": 123
}
]
}
}⌘I