curl --request POST \
--url https://api.zapier.com/v2/action-runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"action": "example_core:Vn7xbE60",
"authentication": "example_QVaAreV1",
"inputs": {
"email": "me@example.com"
},
"callback_url": "https://example.com/post_callback"
}
}
'import requests
url = "https://api.zapier.com/v2/action-runs"
payload = { "data": {
"action": "example_core:Vn7xbE60",
"authentication": "example_QVaAreV1",
"inputs": { "email": "me@example.com" },
"callback_url": "https://example.com/post_callback"
} }
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({
data: {
action: 'example_core:Vn7xbE60',
authentication: 'example_QVaAreV1',
inputs: {email: 'me@example.com'},
callback_url: 'https://example.com/post_callback'
}
})
};
fetch('https://api.zapier.com/v2/action-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.zapier.com/v2/action-runs",
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([
'data' => [
'action' => 'example_core:Vn7xbE60',
'authentication' => 'example_QVaAreV1',
'inputs' => [
'email' => 'me@example.com'
],
'callback_url' => 'https://example.com/post_callback'
]
]),
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/v2/action-runs"
payload := strings.NewReader("{\n \"data\": {\n \"action\": \"example_core:Vn7xbE60\",\n \"authentication\": \"example_QVaAreV1\",\n \"inputs\": {\n \"email\": \"me@example.com\"\n },\n \"callback_url\": \"https://example.com/post_callback\"\n }\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.zapier.com/v2/action-runs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"action\": \"example_core:Vn7xbE60\",\n \"authentication\": \"example_QVaAreV1\",\n \"inputs\": {\n \"email\": \"me@example.com\"\n },\n \"callback_url\": \"https://example.com/post_callback\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zapier.com/v2/action-runs")
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 \"data\": {\n \"action\": \"example_core:Vn7xbE60\",\n \"authentication\": \"example_QVaAreV1\",\n \"inputs\": {\n \"email\": \"me@example.com\"\n },\n \"callback_url\": \"https://example.com/post_callback\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "run",
"id": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"errors": [
{
"status": 400,
"code": "parse_error",
"title": "ParseError",
"detail": "Malformed request.",
"source": null,
"meta": {
"source": "ZAPIER",
"full_details": {
"message": "Malformed request.",
"code": "parse_error"
}
}
}
]
}{
"errors": [
{
"status": 123,
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>",
"header": "<string>"
},
"meta": {}
}
]
}{
"errors": [
{
"status": 123,
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>",
"header": "<string>"
},
"meta": {}
}
]
}{
"errors": [
{
"status": 123,
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>",
"header": "<string>"
},
"meta": {}
}
]
}{
"errors": [
{
"status": 123,
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>",
"header": "<string>"
},
"meta": {}
}
]
}{
"errors": [
{
"status": 500,
"code": "error",
"title": "APIException",
"detail": "A server error occurred.",
"source": null,
"meta": {
"source": "ZAPIER",
"full_details": {
"message": "A server error occurred.",
"code": "error"
}
}
}
]
}{
"errors": [
{
"status": 123,
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>",
"header": "<string>"
},
"meta": {}
}
]
}{
"errors": [
{
"status": 123,
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>",
"header": "<string>"
},
"meta": {}
}
]
}Create an Action Run
Runs an action (step) in the third party API, using the provided authentication and inputs.
This endpoint is asynchronous, and the response will contain an Action Run ID. You can use the /v2/action-runs/:id endpoint to check the status of the run and retrieve the results.
Optionally, include a callback_url in the request body to receive the result via a POST callback instead of polling.
When using OAuth
This endpoint requires the action:run OAuth scope.
curl --request POST \
--url https://api.zapier.com/v2/action-runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"action": "example_core:Vn7xbE60",
"authentication": "example_QVaAreV1",
"inputs": {
"email": "me@example.com"
},
"callback_url": "https://example.com/post_callback"
}
}
'import requests
url = "https://api.zapier.com/v2/action-runs"
payload = { "data": {
"action": "example_core:Vn7xbE60",
"authentication": "example_QVaAreV1",
"inputs": { "email": "me@example.com" },
"callback_url": "https://example.com/post_callback"
} }
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({
data: {
action: 'example_core:Vn7xbE60',
authentication: 'example_QVaAreV1',
inputs: {email: 'me@example.com'},
callback_url: 'https://example.com/post_callback'
}
})
};
fetch('https://api.zapier.com/v2/action-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.zapier.com/v2/action-runs",
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([
'data' => [
'action' => 'example_core:Vn7xbE60',
'authentication' => 'example_QVaAreV1',
'inputs' => [
'email' => 'me@example.com'
],
'callback_url' => 'https://example.com/post_callback'
]
]),
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/v2/action-runs"
payload := strings.NewReader("{\n \"data\": {\n \"action\": \"example_core:Vn7xbE60\",\n \"authentication\": \"example_QVaAreV1\",\n \"inputs\": {\n \"email\": \"me@example.com\"\n },\n \"callback_url\": \"https://example.com/post_callback\"\n }\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.zapier.com/v2/action-runs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"action\": \"example_core:Vn7xbE60\",\n \"authentication\": \"example_QVaAreV1\",\n \"inputs\": {\n \"email\": \"me@example.com\"\n },\n \"callback_url\": \"https://example.com/post_callback\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zapier.com/v2/action-runs")
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 \"data\": {\n \"action\": \"example_core:Vn7xbE60\",\n \"authentication\": \"example_QVaAreV1\",\n \"inputs\": {\n \"email\": \"me@example.com\"\n },\n \"callback_url\": \"https://example.com/post_callback\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "run",
"id": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"errors": [
{
"status": 400,
"code": "parse_error",
"title": "ParseError",
"detail": "Malformed request.",
"source": null,
"meta": {
"source": "ZAPIER",
"full_details": {
"message": "Malformed request.",
"code": "parse_error"
}
}
}
]
}{
"errors": [
{
"status": 123,
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>",
"header": "<string>"
},
"meta": {}
}
]
}{
"errors": [
{
"status": 123,
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>",
"header": "<string>"
},
"meta": {}
}
]
}{
"errors": [
{
"status": 123,
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>",
"header": "<string>"
},
"meta": {}
}
]
}{
"errors": [
{
"status": 123,
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>",
"header": "<string>"
},
"meta": {}
}
]
}{
"errors": [
{
"status": 500,
"code": "error",
"title": "APIException",
"detail": "A server error occurred.",
"source": null,
"meta": {
"source": "ZAPIER",
"full_details": {
"message": "A server error occurred.",
"code": "error"
}
}
}
]
}{
"errors": [
{
"status": 123,
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>",
"header": "<string>"
},
"meta": {}
}
]
}{
"errors": [
{
"status": 123,
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>",
"header": "<string>"
},
"meta": {}
}
]
}Authorizations
See our OAuth2 authentication documentation here: https://docs.zapier.com/powered-by-zapier/api-reference/authentication
Body
Data for the Action Run
Show child attributes
Show child attributes
Callbacks
POST{$request.body#/data/callback_url}actionRunCompleted
Body
Shape of the POST body Zapier sends to the partner's callback_url on run completion. Matches the polling response shape with the addition of id.
The status of the Action Run.
Show child attributes
Show child attributes
Response
Callback acknowledged
Response
The response after an Action Run
Show child attributes
Show child attributes
Was this page helpful?