> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zapier.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Guess a Zap [Beta]

> This endpoint returns a suggested Zap and pre-filled URL to Zapier from a given prompt.

This API is [rate limited](/powered-by-zapier/api-reference/rate-limiting).


## OpenAPI

````yaml https://api.zapier.com/schema post /v2/guess
openapi: 3.1.0
info:
  title: Partner API
  version: 2024.11.0
  description: >

    ## Introduction


    The Partner API is the best tool for complete style control over a user's
    Zapier experience within your app.

    Essentially, it lets you customize how you present Zapier within your
    product without sacrificing your app's look,

    feel, and flow.


    Think of it as a native Zapier integration, helping you showcase your best
    Zapier-powered workflows where it's most

    helpful to your users (within the flow of your tool). You can customize
    styling, streamline Zap set-up for users,

    expose relevant Zap information, and more!


    With the Partner API, you can:


    - Get a list of all the apps available in Zapier's app directory so you can
    power your app directory and show your

    users all the integration possibilities with your Zapier integration.

    - Have complete style control over how you present Zap templates in your
    product. The Partner API gives you access

    to the raw Zap Template data so you can give your users access to your Zap
    template with your product's style, look

    and feel.

    - Get access to all your Zap templates and give your users the ability to
    search to quickly find the one they need.

    - Streamline Zap setup by pre-filling fields on behalf of your users.

    - Show users the Zaps they have set up from right within your product
    keeping them on your site longer and giving them

    complete confidence in their Zapier integration.

    - Embed our Zapier Editor to allow your users to create new Zaps and modify
    existing ones, without needing to leave

    your product.


    ## Authentication


    There are two ways to authenticate with the Partner API.


    1. Your application's `client_id` which you will receive once you are
    approved for access to the API

    (Client ID Authentication)

    2. A user's access token (Access Token Authentication).


    Which authentication method you should use depends on which endpoint(s) you
    are using.

    Review each endpoint's documentation to understand which parameters are
    required.


    > Note: while we do generate a `client_secret`, the type of grant we use
    (implicit) doesn't

    need it so it's not something we provide.'


    ## Learn more


    See the [Workflow API
    documentation](https://docs.zapier.com/partner-solutions/workflow-api/intro)
    for more information.
  contact:
    name: Zapier
    url: https://developer.zapier.com/contact
servers:
  - url: https://api.zapier.com
security: []
tags:
  - name: Accounts
    description: Refers to resources interacting with 'Accounts' associated resources
  - name: Actions
    description: Refers to resources interacting with 'Actions' associated resources
  - name: Apps
    description: Refers to resources interacting with 'Apps' associated resources
  - name: Authentications
    description: >-
      Refers to resources interacting with 'Authentications' associated
      resources
  - name: Categories
    description: Refers to resources interacting with 'Categories' associated resources
  - name: Experimental
    description: Refers to resources interacting with 'Experimental' associated resources
  - name: Inputs
    description: Refers to resources interacting with 'Inputs' associated resources
  - name: Outputs
    description: Refers to resources interacting with 'Outputs' associated resources
  - name: Zaps
    description: Refers to resources interacting with 'Zaps' associated resources
  - name: Zap Templates
    description: Refers to resources interacting with 'Zap Templates' associated resources
paths:
  /v2/guess:
    post:
      tags:
        - Zaps
      summary: Guess a Zap [Beta]
      description: >-
        This endpoint returns a suggested Zap and pre-filled URL to Zapier from
        a given prompt.
      operationId: create-zap-guess
      parameters:
        - in: query
          name: client_id
          schema:
            type: string
          description: See our authentication documentation for how to find your client ID
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ZapGuesserRequest'
            examples:
              ZapGuessRequest:
                value:
                  description: >-
                    Save new leads from Facebook Lead Ads to Google Sheets, and
                    email me the lead in Gmail
                summary: Zap Guess Request
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ZapGuesserResponse'
              examples:
                ZapGuessResponse:
                  value:
                    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
                  summary: Zap Guess Response
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidZapGuesserResponse'
              examples:
                InvalidGuessAZapPrompt:
                  value:
                    messages:
                      - detail: >-
                          This doesn't seem to be a workflow. You could try
                          something like, 'When a new NFL...
                  summary: Invalid Guess a Zap Prompt
          description: This schema can be expected for 400 'Malformed request.' errors
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: 401 Response
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: 403 Response
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: 409 Response
        '429':
          headers:
            Retry-After:
              schema:
                type: string
                format: uri
              description: Indicates when to retry the request
            X-RateLimit-Limit:
              schema:
                type: string
                format: uri
              description: >-
                The maximum number of requests you're permitted to make per
                hour.
            X-RateLimit-Remaining:
              schema:
                type: string
                format: uri
              description: >-
                The number of requests remaining in the current rate limit
                window.
            X-RateLimit-Reset:
              schema:
                type: string
                format: uri
              description: >-
                The time at which the current rate limit window resets in UTC
                epoch seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: 429 Response
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                AServerErrorOccurred.:
                  value:
                    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
                  summary: A server error occurred.
          description: >-
            This schema can be expected for 5xx 'A server error occurred.'
            errors
        '503':
          headers:
            Retry-After:
              schema:
                type: string
                format: uri
              description: Indicates when to retry the request
            X-RateLimit-Limit:
              schema:
                type: string
                format: uri
              description: >-
                The maximum number of requests you're permitted to make per
                hour.
            X-RateLimit-Remaining:
              schema:
                type: string
                format: uri
              description: >-
                The number of requests remaining in the current rate limit
                window.
            X-RateLimit-Reset:
              schema:
                type: string
                format: uri
              description: >-
                The time at which the current rate limit window resets in UTC
                epoch seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: 503 Response
        '504':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: 504 Response
components:
  schemas:
    ZapGuesserRequest:
      type: object
      properties:
        description:
          type: string
          description: The description of the Zap you wish to create
      required:
        - description
    ZapGuesserResponse:
      type: object
      properties:
        title:
          type: string
          description: The generated title for this suggested Zap.
        steps:
          type: array
          items:
            $ref: '#/components/schemas/ZapGuesserStep'
          description: The steps this suggested Zap consists of.
        prefilled_url:
          type: string
          readOnly: true
          description: >-
            A generated prefilled URL to take you to the Zapier editor (selects
            the highest confidence steps).
        messages:
          type: array
          items:
            type: object
            additionalProperties: {}
          description: Contains informational messages about the prompt.
      required:
        - prefilled_url
        - steps
        - title
    InvalidZapGuesserResponse:
      type: object
      properties:
        messages:
          type: array
          items:
            type: object
            additionalProperties: {}
          description: Contains informational messages about the prompt.
    ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
          description: An array of error objects.
      required:
        - errors
    ZapGuesserStep:
      type: object
      properties:
        step:
          allOf:
            - $ref: '#/components/schemas/ZapGuesserRawStep'
          readOnly: true
          description: The highest scoring (most relevant) step for this Zap
        alternatives:
          type: array
          items:
            $ref: '#/components/schemas/ZapGuesserRawStep'
          readOnly: true
          description: >-
            Alternative steps that we are less confident are relevant, but may
            have been intended
      required:
        - alternatives
        - step
    Error:
      type: object
      description: Base Error definition
      properties:
        status:
          type: integer
          description: The HTTP status code applicable to this problem.
        code:
          type: string
          description: A unique identifier for this particular occurrence of the problem.
        title:
          type: string
          description: A short summary of the problem.
        detail:
          type: string
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
        source:
          oneOf:
            - $ref: '#/components/schemas/ErrorSource'
            - type: 'null'
          description: An object containing references to the primary source of the error.
        meta:
          type:
            - object
            - 'null'
          additionalProperties: {}
          description: Freeform metadata about the error
    ZapGuesserRawStep:
      type: object
      properties:
        title:
          type:
            - string
            - 'null'
          description: The title of this step
        app:
          type: string
          description: This step's human-readable name
        api:
          type: string
          description: The Zapier API integration this step uses
      required:
        - api
        - app
        - title
    ErrorSource:
      type: object
      description: Populates the `source` object inside our error responses.
      properties:
        pointer:
          type: string
          description: >-
            Pointer to the value in the request document that caused the error
            e.g. `/actions`.
        parameter:
          type: string
          description: A string indicating which URI query parameter caused the error.
        header:
          type: string
          description: >-
            A string indicating the name of a single request header which caused
            the error.

````