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 v2
Builds on the WordPress REST API framework, offering a more modern and standardized authentication, routing, and responses approach.

REST API v1
Formerly the Web API, it provides endpoints to manage forms, entries, and results over HTTP and is widely used in existing integrations.

Both APIs allow reading, creating, updating, and deleting 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/entries/[entry_id]/workflow/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 /wp-json/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 /wp-json/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]/workflow/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]/workflow/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]/workflow/status

  • Incoming Webhook Create an Entry via Rest API V2

    This endpoint allows external services to submit data directly into a form to create a new entry based on settings defined in the Incoming Webhook Create an Entry feed. It can be accessed as a POST to /wp-json/gf/v2/workflow/webhooks/[feed_id]/[key]

  • Process Incoming Webhook with Rest API v2

    This endpoint allows external services to submit data to complete an incoming webhook step with field values mapped based on settings defined in the Incoming Webhook step. It can be accessed as a POST to /wp-json/gf/v2/entries/[entry_id]/workflow-hooks

  • Process the current step with Rest API V2

    This endpoint allows you to process the current step for the specified entry either in whole or as an assignee. It can be accessed as a POST to /wp-json/gf/v2/entries/[entry_id]/workflow/steps/[step_id]/process.

  • Restart Step with Rest API v2

    This endpoint allows you to restart the current step of the workflow for the specified entry. It can be accessed as a POST to /wp-json/gf/v2/entries/[entry_id]/workflow/steps/[step_id]/restart

  • Restart Workflow with Rest API V2

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

  • Send To Step with Rest API V2

    This endpoint allows you to send the specified entry to a different step in its workflow. It can be accessed as a POST to /wp-json/gf/v2/entries/[entry_id]/workflow/steps/[step_id]/send

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.