Edit a Zap
curl --request PATCH \
--url https://api.zapier.com/v2/zaps/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"steps": [
{
"action": "<string>",
"inputs": {},
"authentication": "<string>",
"alias": "<string>"
}
],
"title": "<string>"
}
}
'import requests
url = "https://api.zapier.com/v2/zaps/{id}"
payload = { "data": {
"steps": [
{
"action": "<string>",
"inputs": {},
"authentication": "<string>",
"alias": "<string>"
}
],
"title": "<string>"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
steps: [
{action: '<string>', inputs: {}, authentication: '<string>', alias: '<string>'}
],
title: '<string>'
}
})
};
fetch('https://api.zapier.com/v2/zaps/{id}', 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/zaps/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'steps' => [
[
'action' => '<string>',
'inputs' => [
],
'authentication' => '<string>',
'alias' => '<string>'
]
],
'title' => '<string>'
]
]),
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/zaps/{id}"
payload := strings.NewReader("{\n \"data\": {\n \"steps\": [\n {\n \"action\": \"<string>\",\n \"inputs\": {},\n \"authentication\": \"<string>\",\n \"alias\": \"<string>\"\n }\n ],\n \"title\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.zapier.com/v2/zaps/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"steps\": [\n {\n \"action\": \"<string>\",\n \"inputs\": {},\n \"authentication\": \"<string>\",\n \"alias\": \"<string>\"\n }\n ],\n \"title\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zapier.com/v2/zaps/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"steps\": [\n {\n \"action\": \"<string>\",\n \"inputs\": {},\n \"authentication\": \"<string>\",\n \"alias\": \"<string>\"\n }\n ],\n \"title\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"type": "<string>",
"id": "<string>",
"last_successful_run_date": "<string>",
"updated_at": "<string>",
"title": "<string>",
"links": {},
"steps": [
{
"action": {
"id": "<string>",
"key": "<string>",
"app": {
"id": "<string>",
"image": "<string>",
"links": {},
"action_types": [
"<unknown>"
],
"title": "<string>",
"images": {
"url_16x16": "<string>",
"url_32x32": "<string>",
"url_64x64": "<string>",
"url_128x128": "<string>"
},
"hex_color": "<string>",
"categories": [
{
"slug": "<string>"
}
],
"description": "<string>",
"key": "<string>",
"selected_api": "<string>",
"type": "app"
},
"type": "action",
"action_type": "action",
"is_instant": true,
"title": "<string>",
"description": "<string>"
},
"authentication": {
"type": "authentication",
"id": "<string>",
"app": {
"id": "<string>",
"image": "<string>",
"links": {},
"action_types": [
"<unknown>"
],
"title": "<string>",
"images": {
"url_16x16": "<string>",
"url_32x32": "<string>",
"url_64x64": "<string>",
"url_128x128": "<string>"
},
"hex_color": "<string>",
"categories": [
{
"slug": "<string>"
}
],
"description": "<string>",
"key": "<string>",
"selected_api": "<string>",
"type": "app"
},
"is_expired": true,
"title": "<string>"
},
"inputs": "<unknown>",
"title": "<string>"
}
],
"is_enabled": true
}{
"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": {}
}
]
}Zaps
Edit a Zap
Edits a Zap on behalf of an end user. Accepts title and/or steps; any provided steps fully replace the Zap’s existing step list. Editing steps publishes a new version and enables the Zap, even if it was previously paused. A title-only edit does not change whether the Zap is paused or enabled.
When using OAuth
This endpoint requires the zap:update OAuth scope.
PATCH
/
v2
/
zaps
/
{id}
Edit a Zap
curl --request PATCH \
--url https://api.zapier.com/v2/zaps/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"steps": [
{
"action": "<string>",
"inputs": {},
"authentication": "<string>",
"alias": "<string>"
}
],
"title": "<string>"
}
}
'import requests
url = "https://api.zapier.com/v2/zaps/{id}"
payload = { "data": {
"steps": [
{
"action": "<string>",
"inputs": {},
"authentication": "<string>",
"alias": "<string>"
}
],
"title": "<string>"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
steps: [
{action: '<string>', inputs: {}, authentication: '<string>', alias: '<string>'}
],
title: '<string>'
}
})
};
fetch('https://api.zapier.com/v2/zaps/{id}', 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/zaps/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'steps' => [
[
'action' => '<string>',
'inputs' => [
],
'authentication' => '<string>',
'alias' => '<string>'
]
],
'title' => '<string>'
]
]),
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/zaps/{id}"
payload := strings.NewReader("{\n \"data\": {\n \"steps\": [\n {\n \"action\": \"<string>\",\n \"inputs\": {},\n \"authentication\": \"<string>\",\n \"alias\": \"<string>\"\n }\n ],\n \"title\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.zapier.com/v2/zaps/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"steps\": [\n {\n \"action\": \"<string>\",\n \"inputs\": {},\n \"authentication\": \"<string>\",\n \"alias\": \"<string>\"\n }\n ],\n \"title\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zapier.com/v2/zaps/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"steps\": [\n {\n \"action\": \"<string>\",\n \"inputs\": {},\n \"authentication\": \"<string>\",\n \"alias\": \"<string>\"\n }\n ],\n \"title\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"type": "<string>",
"id": "<string>",
"last_successful_run_date": "<string>",
"updated_at": "<string>",
"title": "<string>",
"links": {},
"steps": [
{
"action": {
"id": "<string>",
"key": "<string>",
"app": {
"id": "<string>",
"image": "<string>",
"links": {},
"action_types": [
"<unknown>"
],
"title": "<string>",
"images": {
"url_16x16": "<string>",
"url_32x32": "<string>",
"url_64x64": "<string>",
"url_128x128": "<string>"
},
"hex_color": "<string>",
"categories": [
{
"slug": "<string>"
}
],
"description": "<string>",
"key": "<string>",
"selected_api": "<string>",
"type": "app"
},
"type": "action",
"action_type": "action",
"is_instant": true,
"title": "<string>",
"description": "<string>"
},
"authentication": {
"type": "authentication",
"id": "<string>",
"app": {
"id": "<string>",
"image": "<string>",
"links": {},
"action_types": [
"<unknown>"
],
"title": "<string>",
"images": {
"url_16x16": "<string>",
"url_32x32": "<string>",
"url_64x64": "<string>",
"url_128x128": "<string>"
},
"hex_color": "<string>",
"categories": [
{
"slug": "<string>"
}
],
"description": "<string>",
"key": "<string>",
"selected_api": "<string>",
"type": "app"
},
"is_expired": true,
"title": "<string>"
},
"inputs": "<unknown>",
"title": "<string>"
}
],
"is_enabled": true
}{
"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
application/json
Response
A Zap is an automated workflow that connects your apps and services together.
Was this page helpful?