curl --request POST \
--url https://api.zapier.com/v2/zaps \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"steps": [
{
"action": "example_core:5m2y9p7J",
"inputs": {
"code": "output = [{id: Math.round(Date.now()/1000), n: Math.random()}];"
},
"authentication": null,
"alias": null
},
{
"action": "example_core:VBz2NGB5",
"inputs": {
"code": "output = [{ id: inputData.id, n: inputData.n * 2}];",
"inputs": {
"n": "{{n}}",
"id": "{{id}}"
}
},
"authentication": null,
"alias": null
}
],
"title": "My Critically Important Program"
}
}
'{
"type": "zap",
"id": "033cc069f2d3-4d63-8666-10c07ab38dac",
"is_enabled": true,
"last_successful_run_date": "2019-08-24T14:15:22Z",
"updated_at": "2024-03-14T22:02:36+00:00",
"title": "My Critically Important Program",
"links": {
"html_editor": "https://zapier.com/editor/104826178?utm_source=partner&utm_medium=embed&utm_campaign=partner_api&referer=zapier"
},
"steps": [
{
"action": "example_core:Vn7xbE60",
"authentication": "2kyXZ8VJ",
"inputs": {},
"title": null
},
{
"action": "example_core:V7GpzX40",
"authentication": null,
"inputs": null,
"title": null
}
]
}This URL creates a Zap based on the given steps and title.
This endpoint requires the zap:write OAuth scope.
curl --request POST \
--url https://api.zapier.com/v2/zaps \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"steps": [
{
"action": "example_core:5m2y9p7J",
"inputs": {
"code": "output = [{id: Math.round(Date.now()/1000), n: Math.random()}];"
},
"authentication": null,
"alias": null
},
{
"action": "example_core:VBz2NGB5",
"inputs": {
"code": "output = [{ id: inputData.id, n: inputData.n * 2}];",
"inputs": {
"n": "{{n}}",
"id": "{{id}}"
}
},
"authentication": null,
"alias": null
}
],
"title": "My Critically Important Program"
}
}
'{
"type": "zap",
"id": "033cc069f2d3-4d63-8666-10c07ab38dac",
"is_enabled": true,
"last_successful_run_date": "2019-08-24T14:15:22Z",
"updated_at": "2024-03-14T22:02:36+00:00",
"title": "My Critically Important Program",
"links": {
"html_editor": "https://zapier.com/editor/104826178?utm_source=partner&utm_medium=embed&utm_campaign=partner_api&referer=zapier"
},
"steps": [
{
"action": "example_core:Vn7xbE60",
"authentication": "2kyXZ8VJ",
"inputs": {},
"title": null
},
{
"action": "example_core:V7GpzX40",
"authentication": null,
"inputs": null,
"title": null
}
]
}See our OAuth2 authentication documentation here: https://docs.zapier.com/powered-by-zapier/api-reference/authentication
A comma separated list of Zap fields that should be expanded from ids to full objects in the response. Fields that may not be expanded will remain as ids.
See our Building a Zap guide to get started.
Show child attributes
The list of steps that the Zap should consist of
Show child attributes
The ID of the Action to be associated with this step
The authentication, if required, for this Action to run
Optional alias for this step to be referenced by later steps (snake_case, max 64 chars)
64The title to be set for this Zap
A Zap is an automated workflow that connects your apps and services together.
The type of this object.
A unique identifier of the Zap.
The date/time at which this Zap last ran successfully. A null value indicates that a Zap has never run successfully.
The last time this Zap was updated
The human readable name of the Zap.
A list of the steps this Zap consists of
An ordered list of steps that define the logic of the Zap.
Show child attributes
Action
Show child attributes
The ID to refer to this action (unstable, may change when referenced app changes)
The developer provided identifier for this Action (stable)
Apps
Show child attributes
Unique id of the app
Default image/icon to represent the app.
A url that, when visited, will direct the user to authenticate with the app and allow Zapier access to the app, thus creating a new Authentication.
If value is `null`, then no authentication is required to use the app. Client ID-authenticated requests will never have this object's fields populated.Show child attributes
A list of action types for this specific App
Human readable name of the app
The URL of images (of various sizes) for this specific App
Show child attributes
16x16 resolution image URL
32x32 resolution image URL
64x64 resolution image URL
128x128 resolution image URL
A branded color that can be used to represent the app.
Human readable description of the app.
The type of this object.
The type of this object
action - actionaction The type of this Action
READ - READREAD_BULK - READ_BULKWRITE - WRITESEARCH - SEARCHSEARCH_OR_WRITE - SEARCH_OR_WRITESEARCH_AND_WRITE - SEARCH_AND_WRITEFILTER - FILTERaction Will be set to true if this Action triggers instantly. May only be true when type is READ.
The title of this Action.
A longer description of this Action, usually describing what it does in more detail.
Authentication
Show child attributes
The type of this object.
authentication - authenticationauthentication The identifier for this specific Authentication
An app that integrates with Zapier.
Show child attributes
Unique id of the app
Default image/icon to represent the app.
A url that, when visited, will direct the user to authenticate with the app and allow Zapier access to the app, thus creating a new Authentication.
If value is `null`, then no authentication is required to use the app. Client ID-authenticated requests will never have this object's fields populated.Show child attributes
A list of action types for this specific App
Human readable name of the app
The URL of images (of various sizes) for this specific App
Show child attributes
16x16 resolution image URL
32x32 resolution image URL
64x64 resolution image URL
128x128 resolution image URL
A branded color that can be used to represent the app.
Human readable description of the app.
The type of this object.
If true, this Authentication has expired. It will not be usable, and the user needs to be directed to reconnect it.
The title of this specific Authentication
The inputs for this specific Zap's step
The custom title of a Zap Step. If a step has not been given a custom title by the user, then the value will be null.
Whether the Zap is enabled (running) or not.
Was this page helpful?