GET Entries Assignees REST API v1

Description

Retrieves one or more assignees for the specified entry. If an assignee_key is provided, the response is limited to that specific assignee.

Authentication

For available methods to authenticate to the API, refer to our REST API v1 Authentication guide.

The capability gravityflow_create_steps is required to access this endpoint.

This can be filtered using the gravityflow_web_api_capability_get_entries_assignees filter.

Using the Endpoint

GET /gravityformsapi/entries/{entry_id}/assignees/{assignee_key?}

Required Parameters

KeyTypeDescription
entry_idintegerThe ID of the entry.


Optional Parameters

KeyTypeDescription
assignee_keystringRetrieve a specific assignee by key (e.g., `user_id

Response

Success

A JSON array of assignee objects.

Object Properties

KeyDescription
keyUnique identifier of the assignee (e.g., `user_id
idThe ID of the assignee (e.g., 1).
typeThe type of assignee (e.g., user_id, role, email).
display_nameThe display name of the assignee (e.g., admin).
statusThe workflow status of the assignee (e.g., pending, complete).

Example Response

{
  "status": 200,
  "response": [
    {
      "key": "user_id|1",
      "id": 1,
      "type": "user_id",
      "display_name": "admin",
      "status": "pending"
    }
  ]
}

Failure

If the request fails, an error status code with a message will be returned.

Usage

cURL Request

curl "https://{domain}/gravityformsapi/entries/{entry_id}/assignees?api_key={api_key}&signature={signature}&expires={timestamp}"

PHP Request

$response = wp_remote_get( 'https://{domain}/gravityformsapi/entries/{entry_id}/assignees?api_key={api_key}&signature={signature}&expires={timestamp}' );

if ( ! is_wp_error( $response ) ) {
    if ( 200 == wp_remote_retrieve_response_code( $response ) ) {
        $body = wp_remote_retrieve_body( $response );
        $assignees = json_decode( $body, true );
    } else {
        $error_message = wp_remote_retrieve_response_message( $response );
    }
} else {
    $error_message = $response->get_error_message();
}