The Workflow Web/REST API


Overview

Gravity Flow includes two REST APIs that allow developers to connect workflows and form/entry data with external systems.

  • REST API v1, formerly the Web API, provides endpoints to manage forms, entries, and results over HTTP and is widely used in existing integrations.
  • REST API v2 builds on the WordPress REST API framework, offering a more modern and standardized authentication, routing, and responses approach.

Both APIs make it possible to read, create, update, and delete resources, with v2 recommended for new projects while v1 remains available for legacy support. The following endpoints are currently available for the Gravity Flow Web/REST API v2 and v1.

REST API v2 Endpoints

  • Cancel Workflow with Rest API v2

    This endpoint allows you to cancel the active workflow for the specified entry. It can be accessed as a POST to /wp-json/gf/v2/workflows/[entry_id]/cancel

  • Get Current Step with Rest API v2

    This endpoint allows you to retrieve the current step of the workflow for the specified entry. It can be accessed as a GET to /gf/v2/entries/[entry_id]/workflow/steps/current

  • Get Specific Step with Rest API v2

    This endpoint allows you to retrieve a specific step of the workflow for the specified entry. It can be accessed as a GET to /gf/v2/entries/[entry_id]/workflow/steps/[step_id]

  • Get Steps By Entry with Rest API v2

    This endpoint allows you to retrieve all steps of the workflow for the specified entry. It can be accessed as a GET to /wp-json/gf/v2/entries/[entry_id]/workflows/steps

  • Get Steps By Form with Rest API v2

    This endpoint allows you to retrieve all steps of the workflow for the specified form. It can be accessed as a GET to /wp-json/gf/v2/forms/[form_id]/workflows/steps

  • Get Workflow Status with Rest API V2

    This endpoint allows you to get the workflow status, and current step details if available, for an existing entry. It can be accessed as a GET to /wp-json/gf/v2/entries/[entry_id]/workflows/status

REST API v1 Endpoints

  • GET Entries Assignees REST API v1

    The Get Entries Assignees endpoint retrieves assignee details for a specific entry, with the option to filter by assignee_key.

  • GET Entries Steps REST API v1

    Retrieves all workflow steps for the specified entry, including the current step status and details about each step.

  • GET Forms Steps REST API v1

    The Get Form Steps endpoint retrieves all steps defined on a form, while the Get Entry Steps endpoint retrieves the steps for a specific entry, including which step is active and its assignee status.

  • POST Entries Assignees Status REST API v1

    The Assignee Status endpoint processes a status change for a specific assignee on the current step of an entry, such as marking it approved or complete.

  • POST Process Incoming Webhook API v1

    The Incoming Webhook endpoint processes a POST request with the step’s API key and secret, optionally updating entry fields before continuing the workflow.