Skip to main content
PUT
/
trigger-inbox
/
v1
/
inboxes
Ensure a named inbox exists.
curl --request PUT \
  --url https://api.zapier.com/trigger-inbox/v1/inboxes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "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 = {
"name": "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({
name: '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([
'name' => '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 \"name\": \"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 \"name\": \"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 \"name\": \"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"
  },
  "name": "<string>",
  "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"
},
"name": "<string>",
"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": {}
}
]
}

Authorizations

Authorization
string
header
required

OAuth 2.0 authentication.

Headers

Zapier-Causation-Id
string

Optional UUID identifying the event or action that caused this request.

Zapier-Correlation-Id
string

Optional UUID to trace this request through downstream systems.

Body

application/json

Serializer for PUT ensure endpoint — name is required.

name
string
required

Name for the inbox. Required for ensure.

Maximum string length: 100
subscription
object
required

Trigger subscription configuration for an inbox.

paused_reason

The reason the inbox was paused, if applicable.

  • user - user
  • authentication - authentication
  • authentication_access_revoked - authentication_access_revoked
  • partner_revoked - partner_revoked
  • subscribe_failed - subscribe_failed
  • migrate_failed - migrate_failed
  • abandoned - abandoned
  • unknown - unknown
  • upstream_failures - upstream_failures
Available options:
user,
authentication,
authentication_access_revoked,
partner_revoked,
subscribe_failed,
migrate_failed,
abandoned,
unknown,
upstream_failures
notification_url
string<uri> | null

URL to POST notifications to when messages become available.

Maximum string length: 2048

Response

id
string<uuid>
required
read-only

The unique identifier for the inbox.

created_at
string<date-time>
required
read-only

Creation timestamp in ISO 8601 format.

status
string
required
read-only

The status of the inbox.

subscription
object
required

Trigger subscription configuration for an inbox.

name
string | null

An optional name for the inbox. Must be unique per user within the context of an account.

Maximum string length: 100
paused_reason

The reason the inbox was paused, if applicable.

  • user - user
  • authentication - authentication
  • authentication_access_revoked - authentication_access_revoked
  • partner_revoked - partner_revoked
  • subscribe_failed - subscribe_failed
  • migrate_failed - migrate_failed
  • abandoned - abandoned
  • unknown - unknown
  • upstream_failures - upstream_failures
Available options:
user,
authentication,
authentication_access_revoked,
partner_revoked,
subscribe_failed,
migrate_failed,
abandoned,
unknown,
upstream_failures
notification_url
string<uri> | null

URL to POST notifications to when messages become available.

Maximum string length: 2048