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": "02ad1e61-17a9-87fa-971f-8619fb788562",
"inputs": {},
"title": null
},
{
"action": "example_core:V7GpzX40",
"authentication": null,
"inputs": null,
"title": null
}
]
}{
"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 a Zap
This URL creates a Zap based on the given steps and title.
When using OAuth
This endpoint requires the zap:write, or zap:all OAuth scopes.
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": "02ad1e61-17a9-87fa-971f-8619fb788562",
"inputs": {},
"title": null
},
{
"action": "example_core:V7GpzX40",
"authentication": null,
"inputs": null,
"title": null
}
]
}{
"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
Query Parameters
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.
Body
See our Building a Zap guide to get started.
Show child attributes
Show child attributes
Response
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.
Link to open this Zap in the Zapier Editor
Show child attributes
Show child attributes
A list of the steps this Zap consists of
An ordered list of steps that define the logic of the Zap.
Show child attributes
Show child attributes
Whether the Zap is enabled (running) or not.
Was this page helpful?