Skip to main content
POST
/
v2
/
guess
Guess a Zap [Beta]
curl --request POST \
  --url https://api.zapier.com/v2/guess \
  --header 'Content-Type: application/json' \
  --data '
{
  "description": "Save new leads from Facebook Lead Ads to Google Sheets, and email me the lead in Gmail"
}
'
import requests

url = "https://api.zapier.com/v2/guess"

payload = { "description": "Save new leads from Facebook Lead Ads to Google Sheets, and email me the lead in Gmail" }
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
description: 'Save new leads from Facebook Lead Ads to Google Sheets, and email me the lead in Gmail'
})
};

fetch('https://api.zapier.com/v2/guess', 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/guess",
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([
'description' => 'Save new leads from Facebook Lead Ads to Google Sheets, and email me the lead in Gmail'
]),
CURLOPT_HTTPHEADER => [
"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/guess"

payload := strings.NewReader("{\n \"description\": \"Save new leads from Facebook Lead Ads to Google Sheets, and email me the lead in Gmail\"\n}")

req, _ := http.NewRequest("POST", url, payload)

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/guess")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Save new leads from Facebook Lead Ads to Google Sheets, and email me the lead in Gmail\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.zapier.com/v2/guess")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"Save new leads from Facebook Lead Ads to Google Sheets, and email me the lead in Gmail\"\n}"

response = http.request(request)
puts response.read_body
{
  "title": "Save Facebook Lead Ads leads to Google Sheets and send an email",
  "steps": [
    {
      "step": {
        "title": "Trigger when a new lead is created in Facebook Lead Ads",
        "app": "Facebook Lead Ads",
        "api": "FacebookLeadsAPI"
      },
      "alternatives": [
        {
          "title": null,
          "app": "LinkedIn Ads",
          "api": "LinkedInLeadGenFormsCLIAPI@2.7.1"
        }
      ]
    },
    {
      "step": {
        "title": "Save the lead information to a Google Sheet",
        "app": "Google Sheets",
        "api": "GoogleSheetsV2API"
      },
      "alternatives": []
    }
  ],
  "prefilled_url": "https://api.zapier.com/v1/embed/my-app/create?steps%5B0%5D%5Bapp%5D=FacebookLeadsAPI&steps%5B0%5D%5Baction%5D=lead&steps%5B0%5D%5Btype%5D=read&steps%5B1%5D%5Bapp%5D=GoogleSheetsV2API&steps%5B1%5D%5Baction%5D=add_row&steps%5B1%5D%5Btype%5D=write&utm_campaign=partner_zap_guesser&copilot_prompt=Save+new+leads+from+Facebook+Lead+Ads+to+Google+Sheets%2C+and+email+me+the+lead+in+Gmail&partner_zap_guesser_attempt_id=22f44602-db8f-4a2a-8b09-420b0d277b5f"
}
{
"messages": [
{
"detail": "This doesn't seem to be a workflow. You could try something like, 'When a new NFL..."
}
]
}
{
"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": {}
}
]
}
This API is rate limited.

Query Parameters

client_id
string
required

See our authentication documentation for how to find your client ID

Body

application/json
description
string
required

The description of the Zap you wish to create

Response

title
string
required

The generated title for this suggested Zap.

steps
object[]
required

The steps this suggested Zap consists of.

prefilled_url
string
required
read-only

A generated prefilled URL to take you to the Zapier editor (selects the highest confidence steps).

messages
object[]

Contains informational messages about the prompt.