curl --request POST \
--url https://triggers.app.pinkfish.ai/ext/triggers/{triggerId} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"user_request": "what is the capital of France"
}
'import requests
url = "https://triggers.app.pinkfish.ai/ext/triggers/{triggerId}"
payload = { "user_request": "what is the capital of France" }
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({user_request: 'what is the capital of France'})
};
fetch('https://triggers.app.pinkfish.ai/ext/triggers/{triggerId}', 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://triggers.app.pinkfish.ai/ext/triggers/{triggerId}",
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([
'user_request' => 'what is the capital of France'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://triggers.app.pinkfish.ai/ext/triggers/{triggerId}"
payload := strings.NewReader("{\n \"user_request\": \"what is the capital of France\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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://triggers.app.pinkfish.ai/ext/triggers/{triggerId}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"user_request\": \"what is the capital of France\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://triggers.app.pinkfish.ai/ext/triggers/{triggerId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_request\": \"what is the capital of France\"\n}"
response = http.request(request)
puts response.read_bodynullTrigger a workflow
Executes a workflow using its associated trigger. Supports two execution modes:
-
Asynchronous (default): Set
x-api-wait: falseor omit the header. Returns immediately with an empty (null) response body. The workflow run ID is returned in theX-Pf-Run-Idresponse header — use it to poll for results. -
Synchronous: Set
x-api-wait: true. Waits up to 60 seconds for the workflow to complete. If it finishes in time, the response body contains the full results. If it times out, returns a timeout message with the run ID.
curl --request POST \
--url https://triggers.app.pinkfish.ai/ext/triggers/{triggerId} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"user_request": "what is the capital of France"
}
'import requests
url = "https://triggers.app.pinkfish.ai/ext/triggers/{triggerId}"
payload = { "user_request": "what is the capital of France" }
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({user_request: 'what is the capital of France'})
};
fetch('https://triggers.app.pinkfish.ai/ext/triggers/{triggerId}', 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://triggers.app.pinkfish.ai/ext/triggers/{triggerId}",
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([
'user_request' => 'what is the capital of France'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://triggers.app.pinkfish.ai/ext/triggers/{triggerId}"
payload := strings.NewReader("{\n \"user_request\": \"what is the capital of France\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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://triggers.app.pinkfish.ai/ext/triggers/{triggerId}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"user_request\": \"what is the capital of France\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://triggers.app.pinkfish.ai/ext/triggers/{triggerId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_request\": \"what is the capital of France\"\n}"
response = http.request(request)
puts response.read_bodynullAuthorizations
Headers
Set to true for synchronous execution (waits up to 60 seconds for results). Set to false or omit for asynchronous (fire-and-forget) execution.
true, false Path Parameters
The unique identifier of the trigger
Query Parameters
Optional query parameter for the trigger
Body
The body is of type object.
Response
Workflow triggered successfully.
Async mode (x-api-wait: false): Response body is null. Use the X-Pf-Run-Id and X-Pf-Automation-Id headers to poll for results.
Sync mode (x-api-wait: true): Response body contains the full workflow results if completed within 60 seconds, or a timeout message with the run ID.

