Ensure an inbox exists
curl --request PUT \
--url https://api.zapier.com/trigger-inbox/v1/inboxes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"key": "example_inbox",
"subscription": {
"app_key": "SlackCLIAPI@1.0.0",
"action_key": "example_action",
"connection_id": "029a64f8-ced3-889b-aa1a-9d37bcd59ddb",
"inputs": {
"channel": "C1234567890"
}
}
}
'import requests
url = "https://api.zapier.com/trigger-inbox/v1/inboxes"
payload = {
"key": "example_inbox",
"subscription": {
"app_key": "SlackCLIAPI@1.0.0",
"action_key": "example_action",
"connection_id": "029a64f8-ced3-889b-aa1a-9d37bcd59ddb",
"inputs": { "channel": "C1234567890" }
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
key: 'example_inbox',
subscription: {
app_key: 'SlackCLIAPI@1.0.0',
action_key: 'example_action',
connection_id: '029a64f8-ced3-889b-aa1a-9d37bcd59ddb',
inputs: {channel: 'C1234567890'}
}
})
};
fetch('https://api.zapier.com/trigger-inbox/v1/inboxes', 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.zapier.com/trigger-inbox/v1/inboxes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'key' => 'example_inbox',
'subscription' => [
'app_key' => 'SlackCLIAPI@1.0.0',
'action_key' => 'example_action',
'connection_id' => '029a64f8-ced3-889b-aa1a-9d37bcd59ddb',
'inputs' => [
'channel' => 'C1234567890'
]
]
]),
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.zapier.com/trigger-inbox/v1/inboxes"
payload := strings.NewReader("{\n \"key\": \"example_inbox\",\n \"subscription\": {\n \"app_key\": \"SlackCLIAPI@1.0.0\",\n \"action_key\": \"example_action\",\n \"connection_id\": \"029a64f8-ced3-889b-aa1a-9d37bcd59ddb\",\n \"inputs\": {\n \"channel\": \"C1234567890\"\n }\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.zapier.com/trigger-inbox/v1/inboxes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"key\": \"example_inbox\",\n \"subscription\": {\n \"app_key\": \"SlackCLIAPI@1.0.0\",\n \"action_key\": \"example_action\",\n \"connection_id\": \"029a64f8-ced3-889b-aa1a-9d37bcd59ddb\",\n \"inputs\": {\n \"channel\": \"C1234567890\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zapier.com/trigger-inbox/v1/inboxes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"key\": \"example_inbox\",\n \"subscription\": {\n \"app_key\": \"SlackCLIAPI@1.0.0\",\n \"action_key\": \"example_action\",\n \"connection_id\": \"029a64f8-ced3-889b-aa1a-9d37bcd59ddb\",\n \"inputs\": {\n \"channel\": \"C1234567890\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"status": "<string>",
"subscription": {
"app_key": "<string>",
"action_key": "<string>",
"inputs": {},
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"key": "<string>",
"name": "<string>",
"paused_reason": "user",
"notification_url": "<string>"
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"status": "<string>",
"subscription": {
"app_key": "<string>",
"action_key": "<string>",
"inputs": {},
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"key": "<string>",
"name": "<string>",
"paused_reason": "user",
"notification_url": "<string>"
}{
"errors": [
{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"source": {}
}
]
}{
"errors": [
{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"source": {}
}
]
}{
"errors": [
{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"source": {}
}
]
}Inboxes
Ensure an inbox exists
Idempotently ensure an inbox exists for the provided key. Returns the existing inbox if one with the same key and matching configuration already exists, or creates a new one. name remains accepted as a deprecated alias for key. Returns 409 if an inbox with the same key but different configuration exists.
PUT
/
trigger-inbox
/
v1
/
inboxes
Ensure an inbox exists
curl --request PUT \
--url https://api.zapier.com/trigger-inbox/v1/inboxes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"key": "example_inbox",
"subscription": {
"app_key": "SlackCLIAPI@1.0.0",
"action_key": "example_action",
"connection_id": "029a64f8-ced3-889b-aa1a-9d37bcd59ddb",
"inputs": {
"channel": "C1234567890"
}
}
}
'import requests
url = "https://api.zapier.com/trigger-inbox/v1/inboxes"
payload = {
"key": "example_inbox",
"subscription": {
"app_key": "SlackCLIAPI@1.0.0",
"action_key": "example_action",
"connection_id": "029a64f8-ced3-889b-aa1a-9d37bcd59ddb",
"inputs": { "channel": "C1234567890" }
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
key: 'example_inbox',
subscription: {
app_key: 'SlackCLIAPI@1.0.0',
action_key: 'example_action',
connection_id: '029a64f8-ced3-889b-aa1a-9d37bcd59ddb',
inputs: {channel: 'C1234567890'}
}
})
};
fetch('https://api.zapier.com/trigger-inbox/v1/inboxes', 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.zapier.com/trigger-inbox/v1/inboxes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'key' => 'example_inbox',
'subscription' => [
'app_key' => 'SlackCLIAPI@1.0.0',
'action_key' => 'example_action',
'connection_id' => '029a64f8-ced3-889b-aa1a-9d37bcd59ddb',
'inputs' => [
'channel' => 'C1234567890'
]
]
]),
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.zapier.com/trigger-inbox/v1/inboxes"
payload := strings.NewReader("{\n \"key\": \"example_inbox\",\n \"subscription\": {\n \"app_key\": \"SlackCLIAPI@1.0.0\",\n \"action_key\": \"example_action\",\n \"connection_id\": \"029a64f8-ced3-889b-aa1a-9d37bcd59ddb\",\n \"inputs\": {\n \"channel\": \"C1234567890\"\n }\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.zapier.com/trigger-inbox/v1/inboxes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"key\": \"example_inbox\",\n \"subscription\": {\n \"app_key\": \"SlackCLIAPI@1.0.0\",\n \"action_key\": \"example_action\",\n \"connection_id\": \"029a64f8-ced3-889b-aa1a-9d37bcd59ddb\",\n \"inputs\": {\n \"channel\": \"C1234567890\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zapier.com/trigger-inbox/v1/inboxes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"key\": \"example_inbox\",\n \"subscription\": {\n \"app_key\": \"SlackCLIAPI@1.0.0\",\n \"action_key\": \"example_action\",\n \"connection_id\": \"029a64f8-ced3-889b-aa1a-9d37bcd59ddb\",\n \"inputs\": {\n \"channel\": \"C1234567890\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"status": "<string>",
"subscription": {
"app_key": "<string>",
"action_key": "<string>",
"inputs": {},
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"key": "<string>",
"name": "<string>",
"paused_reason": "user",
"notification_url": "<string>"
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"status": "<string>",
"subscription": {
"app_key": "<string>",
"action_key": "<string>",
"inputs": {},
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"key": "<string>",
"name": "<string>",
"paused_reason": "user",
"notification_url": "<string>"
}{
"errors": [
{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"source": {}
}
]
}{
"errors": [
{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"source": {}
}
]
}{
"errors": [
{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"source": {}
}
]
}Headers
Body
application/json
Request to idempotently ensure an inbox exists. A key is required
(name is accepted as a deprecated alias).
The reason the inbox was paused, if applicable.
user- userauthentication- authenticationauthentication_access_revoked- authentication_access_revokedpartner_revoked- partner_revokedsubscribe_failed- subscribe_failedmigrate_failed- migrate_failedabandoned- abandonedunknown- unknownupstream_failures- upstream_failures
Available options:
user, authentication, authentication_access_revoked, partner_revoked, subscribe_failed, migrate_failed, abandoned, unknown, upstream_failures Response
An inbox: a durable, user-scoped queue for a trigger subscription,
identified by its natural key.
An inbox: a durable, user-scoped queue for a trigger subscription,
identified by its natural key.
The reason the inbox was paused, if applicable.
user- userauthentication- authenticationauthentication_access_revoked- authentication_access_revokedpartner_revoked- partner_revokedsubscribe_failed- subscribe_failedmigrate_failed- migrate_failedabandoned- abandonedunknown- unknownupstream_failures- upstream_failures
Available options:
user, authentication, authentication_access_revoked, partner_revoked, subscribe_failed, migrate_failed, abandoned, unknown, upstream_failures Was this page helpful?