curl --request POST \
--url https://api.zapier.com/v2/actions/{action_id}/inputs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"authentication": "928117",
"inputs": {
"spreadsheet": "my_sheet"
}
}
}
'import requests
url = "https://api.zapier.com/v2/actions/{action_id}/inputs"
payload = { "data": {
"authentication": "928117",
"inputs": { "spreadsheet": "my_sheet" }
} }
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: {authentication: '928117', inputs: {spreadsheet: 'my_sheet'}}})
};
fetch('https://api.zapier.com/v2/actions/{action_id}/inputs', 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/actions/{action_id}/inputs",
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' => [
'authentication' => '928117',
'inputs' => [
'spreadsheet' => 'my_sheet'
]
]
]),
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/actions/{action_id}/inputs"
payload := strings.NewReader("{\n \"data\": {\n \"authentication\": \"928117\",\n \"inputs\": {\n \"spreadsheet\": \"my_sheet\"\n }\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/actions/{action_id}/inputs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"authentication\": \"928117\",\n \"inputs\": {\n \"spreadsheet\": \"my_sheet\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zapier.com/v2/actions/{action_id}/inputs")
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 \"authentication\": \"928117\",\n \"inputs\": {\n \"spreadsheet\": \"my_sheet\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"links": {
"next": null,
"prev": null
},
"meta": {
"count": 2,
"limit": null,
"offset": 0
},
"data": [
{
"type": "input_field",
"id": "input",
"default_value": "",
"depends_on": [],
"description": "Use the Input Data fields above to assign key names (left) and map values (right) from previous steps. Use notation `inputData.keyName` or `inputData['keyName']` to access the values within your code. The data will be provided **as strings**. Learn more [here](https://zapier.com/help/create/code-webhooks/use-javascript-code-in-zaps#input-data-for-code-steps).",
"invalidates_input_fields": false,
"is_required": false,
"placeholder": "",
"title": "Input Data",
"value_type": "OBJECT"
},
{
"type": "input_field",
"id": "code",
"default_value": "// this is wrapped in an `async` function\n// you can use await throughout the function\n\noutput = [{id: 123, hello: \"world\"}];",
"depends_on": [],
"description": "**Warning! This is an advanced action!** Uses Node 10.x.x. Please read the [Code documentation for more information](/help/create/code-webhooks/use-javascript-code-in-zaps).",
"format": "CODE",
"invalidates_input_fields": false,
"is_required": true,
"placeholder": "",
"title": "Code",
"value_type": "STRING"
}
]
}{
"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": {}
}
]
}Get Input Fields
Get the Input Fields for a particular Action, using the provided authentication and inputs. See the fields and fieldsets guide for more information. See our docs for more information.
When using OAuth
This endpoint requires the zap:write OAuth scope.
curl --request POST \
--url https://api.zapier.com/v2/actions/{action_id}/inputs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"authentication": "928117",
"inputs": {
"spreadsheet": "my_sheet"
}
}
}
'import requests
url = "https://api.zapier.com/v2/actions/{action_id}/inputs"
payload = { "data": {
"authentication": "928117",
"inputs": { "spreadsheet": "my_sheet" }
} }
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: {authentication: '928117', inputs: {spreadsheet: 'my_sheet'}}})
};
fetch('https://api.zapier.com/v2/actions/{action_id}/inputs', 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/actions/{action_id}/inputs",
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' => [
'authentication' => '928117',
'inputs' => [
'spreadsheet' => 'my_sheet'
]
]
]),
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/actions/{action_id}/inputs"
payload := strings.NewReader("{\n \"data\": {\n \"authentication\": \"928117\",\n \"inputs\": {\n \"spreadsheet\": \"my_sheet\"\n }\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/actions/{action_id}/inputs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"authentication\": \"928117\",\n \"inputs\": {\n \"spreadsheet\": \"my_sheet\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zapier.com/v2/actions/{action_id}/inputs")
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 \"authentication\": \"928117\",\n \"inputs\": {\n \"spreadsheet\": \"my_sheet\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"links": {
"next": null,
"prev": null
},
"meta": {
"count": 2,
"limit": null,
"offset": 0
},
"data": [
{
"type": "input_field",
"id": "input",
"default_value": "",
"depends_on": [],
"description": "Use the Input Data fields above to assign key names (left) and map values (right) from previous steps. Use notation `inputData.keyName` or `inputData['keyName']` to access the values within your code. The data will be provided **as strings**. Learn more [here](https://zapier.com/help/create/code-webhooks/use-javascript-code-in-zaps#input-data-for-code-steps).",
"invalidates_input_fields": false,
"is_required": false,
"placeholder": "",
"title": "Input Data",
"value_type": "OBJECT"
},
{
"type": "input_field",
"id": "code",
"default_value": "// this is wrapped in an `async` function\n// you can use await throughout the function\n\noutput = [{id: 123, hello: \"world\"}];",
"depends_on": [],
"description": "**Warning! This is an advanced action!** Uses Node 10.x.x. Please read the [Code documentation for more information](/help/create/code-webhooks/use-javascript-code-in-zaps).",
"format": "CODE",
"invalidates_input_fields": false,
"is_required": true,
"placeholder": "",
"title": "Code",
"value_type": "STRING"
}
]
}{
"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
Path Parameters
An Action ID, as provided by the /actions endpoint.
Body
Common inputs with inputs and an authentication id.
The common data object that includes inputs and an authentication id.
Show child attributes
Show child attributes
Response
A successful response for getting the input fields for a particular Action.
The links object returned in paginated response bodies.
Show child attributes
Show child attributes
The meta object returned in paginated response bodies.
Show child attributes
Show child attributes
The base concept of a Fieldset, from which others extend
Represents Input Field data as accepted by the API
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Was this page helpful?