Welcome
Workflow API
Workflow Element
Embed Enhancements
Getting Started With the API
Categories
Accounts
Zap Templates
Authentications
Experimental
Schemas
- Common Types
Categories
Accounts
Zap Templates
Authentications
Experimental
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.
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": {
"limit": 10,
"offset": 0,
"authentication": "<string>",
"inputs": {}
}
}'
{
"links": {
"next": null,
"prev": null
},
"meta": {
"count": 2,
"limit": null,
"offset": null
},
"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"
}
]
}
Authorizations
See our OAuth2 authentication documentation
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.
An Authentication ID provided by the /authentications
endpoint.
The current set of input fields in a JSON object, where each key is the id
of an Input Field, and the corresponding value the current value of the field.
Used for paginating results. Specifies the maximum number of items to return per page.
x > 1
Used for paginating results. Specifies the offset to use. Defaults to 0
x > 0
Response
A successful response for getting the input fields for a particular Action.
DATETIME
- DATETIMEMULTILINE
- MULTILINEPASSWORD
- PASSWORDCODE
- CODEREADONLY
- READONLYFILE
- FILESELECT
- SELECT
DATETIME
, MULTILINE
, PASSWORD
, CODE
, READONLY
, FILE
, SELECT
STRING
- STRINGNUMBER
- NUMBERINTEGER
- INTEGERBOOLEAN
- BOOLEANARRAY
- ARRAYOBJECT
- OBJECT
STRING
, NUMBER
, INTEGER
, BOOLEAN
, ARRAY
, OBJECT
The meta object returned in paginated response bodies.
curl --request POST \
--url https://api.zapier.com/v2/actions/{action_id}/inputs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"data": {
"limit": 10,
"offset": 0,
"authentication": "<string>",
"inputs": {}
}
}'
{
"links": {
"next": null,
"prev": null
},
"meta": {
"count": 2,
"limit": null,
"offset": null
},
"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"
}
]
}