curl --request POST \
--url https://api.parley.so/v1/automations/{id}/runs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.parley.so/v1/automations/{id}/runs"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.parley.so/v1/automations/{id}/runs', 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.parley.so/v1/automations/{id}/runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.parley.so/v1/automations/{id}/runs"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.parley.so/v1/automations/{id}/runs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.parley.so/v1/automations/{id}/runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"automation": {
"type": "automation",
"id": "<string>",
"name": "<string>"
},
"status": "pending",
"triggerType": "cron",
"event": {
"type": "project.created",
"record": {
"type": "project",
"id": "<string>",
"name": "<string>"
}
},
"triggerId": "<string>",
"scheduledFor": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"error": {
"code": "<string>",
"message": "<string>"
},
"sessionId": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "The request is invalid.",
"details": {
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing or invalid credentials."
}
}{
"error": {
"code": "FORBIDDEN",
"message": "You don't have permission to do this."
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Not found."
}
}{
"error": {
"code": "TOO_MANY_REQUESTS",
"message": "Too many requests."
}
}Run an automation now
Start a run of an automation now, without waiting for a trigger. A paused automation can be run too. Returns the run as soon as it’s queued; follow its progress by listing the automation’s runs. Returns 429 USAGE_LIMIT_REACHED when the organization has reached its limit of automation runs for a given period; don’t retry until older runs fall outside that window.
curl --request POST \
--url https://api.parley.so/v1/automations/{id}/runs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.parley.so/v1/automations/{id}/runs"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.parley.so/v1/automations/{id}/runs', 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.parley.so/v1/automations/{id}/runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.parley.so/v1/automations/{id}/runs"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.parley.so/v1/automations/{id}/runs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.parley.so/v1/automations/{id}/runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"automation": {
"type": "automation",
"id": "<string>",
"name": "<string>"
},
"status": "pending",
"triggerType": "cron",
"event": {
"type": "project.created",
"record": {
"type": "project",
"id": "<string>",
"name": "<string>"
}
},
"triggerId": "<string>",
"scheduledFor": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"error": {
"code": "<string>",
"message": "<string>"
},
"sessionId": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "The request is invalid.",
"details": {
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing or invalid credentials."
}
}{
"error": {
"code": "FORBIDDEN",
"message": "You don't have permission to do this."
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Not found."
}
}{
"error": {
"code": "TOO_MANY_REQUESTS",
"message": "Too many requests."
}
}Authorizations
A Parley API key.
Path Parameters
The automation ID.
1Response
Created.
The run ID.
1The automation that ran.
Show child attributes
Show child attributes
pending: queued and not yet started. running: in progress. succeeded, failed, canceled, and timed_out are final.
pending, running, succeeded, failed, canceled, timed_out What started the run: a trigger of this type, or manual for a run someone started themselves.
cron, manual, event The event that started the run and the record it happened to, or null for a run that no event started.
Show child attributes
Show child attributes
The trigger that started the run, or null for a manual run or a trigger that has since been removed.
1The time a cron trigger set for the run, or null for a run that no cron trigger started.
When the run started.
When the run finished.
Why the run didn't succeed, or null.
Show child attributes
Show child attributes
The session the run worked in, whose messages hold its report, or null once that session is deleted.
When the run was queued.
Was this page helpful?
