curl --request POST \
--url https://api.deck.co/v2/triggers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"condition": {
"type": "<string>",
"cron": "<string>",
"timezone": "<string>"
},
"task_id": "<string>",
"description": "<string>",
"credential_ids": [
"<string>"
],
"credential_filter": {
"source_ids": [
"<string>"
],
"status": [
"<string>"
]
},
"input": "<unknown>",
"skip_if": {
"last_run": {
"result": "<string>",
"within_seconds": 123
}
},
"concurrency_max": 123
}
'import requests
url = "https://api.deck.co/v2/triggers"
payload = {
"name": "<string>",
"condition": {
"type": "<string>",
"cron": "<string>",
"timezone": "<string>"
},
"task_id": "<string>",
"description": "<string>",
"credential_ids": ["<string>"],
"credential_filter": {
"source_ids": ["<string>"],
"status": ["<string>"]
},
"input": "<unknown>",
"skip_if": { "last_run": {
"result": "<string>",
"within_seconds": 123
} },
"concurrency_max": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
condition: {type: '<string>', cron: '<string>', timezone: '<string>'},
task_id: '<string>',
description: '<string>',
credential_ids: ['<string>'],
credential_filter: {source_ids: ['<string>'], status: ['<string>']},
input: '<unknown>',
skip_if: {last_run: {result: '<string>', within_seconds: 123}},
concurrency_max: 123
})
};
fetch('https://api.deck.co/v2/triggers', 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.deck.co/v2/triggers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'condition' => [
'type' => '<string>',
'cron' => '<string>',
'timezone' => '<string>'
],
'task_id' => '<string>',
'description' => '<string>',
'credential_ids' => [
'<string>'
],
'credential_filter' => [
'source_ids' => [
'<string>'
],
'status' => [
'<string>'
]
],
'input' => '<unknown>',
'skip_if' => [
'last_run' => [
'result' => '<string>',
'within_seconds' => 123
]
],
'concurrency_max' => 123
]),
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.deck.co/v2/triggers"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"condition\": {\n \"type\": \"<string>\",\n \"cron\": \"<string>\",\n \"timezone\": \"<string>\"\n },\n \"task_id\": \"<string>\",\n \"description\": \"<string>\",\n \"credential_ids\": [\n \"<string>\"\n ],\n \"credential_filter\": {\n \"source_ids\": [\n \"<string>\"\n ],\n \"status\": [\n \"<string>\"\n ]\n },\n \"input\": \"<unknown>\",\n \"skip_if\": {\n \"last_run\": {\n \"result\": \"<string>\",\n \"within_seconds\": 123\n }\n },\n \"concurrency_max\": 123\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.deck.co/v2/triggers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"condition\": {\n \"type\": \"<string>\",\n \"cron\": \"<string>\",\n \"timezone\": \"<string>\"\n },\n \"task_id\": \"<string>\",\n \"description\": \"<string>\",\n \"credential_ids\": [\n \"<string>\"\n ],\n \"credential_filter\": {\n \"source_ids\": [\n \"<string>\"\n ],\n \"status\": [\n \"<string>\"\n ]\n },\n \"input\": \"<unknown>\",\n \"skip_if\": {\n \"last_run\": {\n \"result\": \"<string>\",\n \"within_seconds\": 123\n }\n },\n \"concurrency_max\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deck.co/v2/triggers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"condition\": {\n \"type\": \"<string>\",\n \"cron\": \"<string>\",\n \"timezone\": \"<string>\"\n },\n \"task_id\": \"<string>\",\n \"description\": \"<string>\",\n \"credential_ids\": [\n \"<string>\"\n ],\n \"credential_filter\": {\n \"source_ids\": [\n \"<string>\"\n ],\n \"status\": [\n \"<string>\"\n ]\n },\n \"input\": \"<unknown>\",\n \"skip_if\": {\n \"last_run\": {\n \"result\": \"<string>\",\n \"within_seconds\": 123\n }\n },\n \"concurrency_max\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": "trg_AbC123xYz456",
"object": "<string>",
"name": "<string>",
"description": "<string>",
"status": "<string>",
"condition": {
"type": "<string>",
"cron": "<string>",
"timezone": "<string>"
},
"task_id": "<string>",
"credential_ids": [
"<string>"
],
"credential_filter": {
"source_ids": [
"<string>"
],
"status": [
"<string>"
]
},
"input": "<unknown>",
"skip_if": {
"last_run": {
"result": "<string>",
"within_seconds": 123
}
},
"concurrency_max": 123,
"created_at": "2026-08-24T12:00:00Z",
"updated_at": "2026-08-24T12:00:00Z",
"request_id": "<string>"
}{
"errors": {},
"type": "<string>",
"title": "<string>",
"status": 123,
"traceId": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}Create a trigger
Creates a trigger that runs a task on a schedule across a set of credentials. The trigger is created active and fires on its schedule immediately.
curl --request POST \
--url https://api.deck.co/v2/triggers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"condition": {
"type": "<string>",
"cron": "<string>",
"timezone": "<string>"
},
"task_id": "<string>",
"description": "<string>",
"credential_ids": [
"<string>"
],
"credential_filter": {
"source_ids": [
"<string>"
],
"status": [
"<string>"
]
},
"input": "<unknown>",
"skip_if": {
"last_run": {
"result": "<string>",
"within_seconds": 123
}
},
"concurrency_max": 123
}
'import requests
url = "https://api.deck.co/v2/triggers"
payload = {
"name": "<string>",
"condition": {
"type": "<string>",
"cron": "<string>",
"timezone": "<string>"
},
"task_id": "<string>",
"description": "<string>",
"credential_ids": ["<string>"],
"credential_filter": {
"source_ids": ["<string>"],
"status": ["<string>"]
},
"input": "<unknown>",
"skip_if": { "last_run": {
"result": "<string>",
"within_seconds": 123
} },
"concurrency_max": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
condition: {type: '<string>', cron: '<string>', timezone: '<string>'},
task_id: '<string>',
description: '<string>',
credential_ids: ['<string>'],
credential_filter: {source_ids: ['<string>'], status: ['<string>']},
input: '<unknown>',
skip_if: {last_run: {result: '<string>', within_seconds: 123}},
concurrency_max: 123
})
};
fetch('https://api.deck.co/v2/triggers', 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.deck.co/v2/triggers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'condition' => [
'type' => '<string>',
'cron' => '<string>',
'timezone' => '<string>'
],
'task_id' => '<string>',
'description' => '<string>',
'credential_ids' => [
'<string>'
],
'credential_filter' => [
'source_ids' => [
'<string>'
],
'status' => [
'<string>'
]
],
'input' => '<unknown>',
'skip_if' => [
'last_run' => [
'result' => '<string>',
'within_seconds' => 123
]
],
'concurrency_max' => 123
]),
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.deck.co/v2/triggers"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"condition\": {\n \"type\": \"<string>\",\n \"cron\": \"<string>\",\n \"timezone\": \"<string>\"\n },\n \"task_id\": \"<string>\",\n \"description\": \"<string>\",\n \"credential_ids\": [\n \"<string>\"\n ],\n \"credential_filter\": {\n \"source_ids\": [\n \"<string>\"\n ],\n \"status\": [\n \"<string>\"\n ]\n },\n \"input\": \"<unknown>\",\n \"skip_if\": {\n \"last_run\": {\n \"result\": \"<string>\",\n \"within_seconds\": 123\n }\n },\n \"concurrency_max\": 123\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.deck.co/v2/triggers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"condition\": {\n \"type\": \"<string>\",\n \"cron\": \"<string>\",\n \"timezone\": \"<string>\"\n },\n \"task_id\": \"<string>\",\n \"description\": \"<string>\",\n \"credential_ids\": [\n \"<string>\"\n ],\n \"credential_filter\": {\n \"source_ids\": [\n \"<string>\"\n ],\n \"status\": [\n \"<string>\"\n ]\n },\n \"input\": \"<unknown>\",\n \"skip_if\": {\n \"last_run\": {\n \"result\": \"<string>\",\n \"within_seconds\": 123\n }\n },\n \"concurrency_max\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deck.co/v2/triggers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"condition\": {\n \"type\": \"<string>\",\n \"cron\": \"<string>\",\n \"timezone\": \"<string>\"\n },\n \"task_id\": \"<string>\",\n \"description\": \"<string>\",\n \"credential_ids\": [\n \"<string>\"\n ],\n \"credential_filter\": {\n \"source_ids\": [\n \"<string>\"\n ],\n \"status\": [\n \"<string>\"\n ]\n },\n \"input\": \"<unknown>\",\n \"skip_if\": {\n \"last_run\": {\n \"result\": \"<string>\",\n \"within_seconds\": 123\n }\n },\n \"concurrency_max\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": "trg_AbC123xYz456",
"object": "<string>",
"name": "<string>",
"description": "<string>",
"status": "<string>",
"condition": {
"type": "<string>",
"cron": "<string>",
"timezone": "<string>"
},
"task_id": "<string>",
"credential_ids": [
"<string>"
],
"credential_filter": {
"source_ids": [
"<string>"
],
"status": [
"<string>"
]
},
"input": "<unknown>",
"skip_if": {
"last_run": {
"result": "<string>",
"within_seconds": 123
}
},
"concurrency_max": 123,
"created_at": "2026-08-24T12:00:00Z",
"updated_at": "2026-08-24T12:00:00Z",
"request_id": "<string>"
}{
"errors": {},
"type": "<string>",
"title": "<string>",
"status": 123,
"traceId": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}Authorizations
Secret key (sk_live_...)
Headers
Optional key that makes the request idempotent. Retrying with the same key returns the original response instead of repeating the operation; keys expire after 24 hours. Any string up to 256 characters. See Idempotency.
256"550e8400-e29b-41d4-a716-446655440000"
Body
Creates a trigger. The trigger is created with status: "active" and fires on its schedule immediately.
Display name for the trigger.
When the trigger fires: a cron expression evaluated in a timezone.
Show child attributes
Show child attributes
The task to run. Prefixed with task_. Cannot be changed after creation.
Description of the trigger's purpose.
Explicit credentials to target, one or many. Pass exactly one of credential_ids / credential_filter.
A scope of credentials to fan out across, resolved each time the trigger fires. Pass exactly one of credential_ids / credential_filter.
Show child attributes
Show child attributes
Input passed to every run this trigger creates, validated against the task's input_schema.
Skip condition evaluated per credential before a run is created.
Show child attributes
Show child attributes
Maximum simultaneous runs from this trigger. Omit for no per-trigger cap.
Response
Created
A trigger object. Triggers create task runs on a schedule across a set of credentials.
Unique identifier for the trigger, prefixed with trg_.
^trg_"trg_AbC123xYz456"
Always trigger.
Display name for the trigger.
Description of the trigger's purpose.
active or inactive. Inactive triggers keep their configuration and fire nothing.
When the trigger fires: a cron expression evaluated in a timezone.
Show child attributes
Show child attributes
The task this trigger runs. Prefixed with task_. Fixed at creation.
Explicit credentials the trigger targets. null when the trigger uses credential_filter.
Credential scope the trigger fans out across. null when the trigger uses credential_ids.
Show child attributes
Show child attributes
Input passed to every run this trigger creates, matching the task's input_schema.
Skip condition evaluated per credential before a run is created.
Show child attributes
Show child attributes
Maximum simultaneous runs from this trigger. null means no per-trigger cap.
ISO 8601 timestamp of when the resource was created.
"2026-08-24T12:00:00Z"
ISO 8601 timestamp of when the resource was last updated.
"2026-08-24T12:00:00Z"
Unique identifier for the API request. Include this when contacting support.
Was this page helpful?