Managing Add-On Feeds with REST API v2Getting FeedsMethodPathRequired PropertiesOptional PropertiesResponseUsage ExamplesExample 1Example 2Example 3Getting a Specific FeedMethodPathRequired PropertiesOptional PropertiesResponseUsage ExamplesExample 1Getting Feeds for a Specific FormMethodPathRequired PropertiesOptional PropertiesResponseUsage ExamplesExample 1Example 2Example 3Adding a FeedMethodPathRequired PropertiesOptional PropertiesResponseUsage ExamplesExample RequestExample ResponseAdding a Feed for a Specific FormMethodPathRequired PropertiesOptional PropertiesResponseUsage ExamplesExample RequestExample ResponseUpdating a FeedMethodPathRequired PropertiesOptional PropertiesResponseUsage ExamplesExample RequestExample ResponsePartially Updating a FeedMethodPathRequired PropertiesOptional PropertiesResponseUsage ExamplesExample RequestExample ResponseUpdating Specific Feed PropertiesMethodPathRequired PropertiesOptional PropertiesResponseUsage ExamplesExample RequestExample ResponseDeleting a Specific FeedMethodPathRequired PropertiesOptional PropertiesResponseUsage ExamplesExample 1
Getting Feeds
Method
GET
Path
/gf/v2/feeds
Required Properties
There are no required properties.
Optional Properties
include – The ID of the Feed or an array of Feed IDs.
addon – The slug of the add-on to which the Feeds belong, including the gravityforms prefix. See the Gravity Forms Add-On Slugs article for a list of possible slugs.
Response
The JSON response will contain an array of Feed Objects.
[
{
"id": "1",
"form_id": "0",
"addon_slug": "gravityformscoupons",
"meta": {
"gravityForm": "0",
"couponName": "Military Discount",
"couponCode": "MD10",
"couponAmountType": "percentage",
"couponAmount": 10,
"startDate": "",
"endDate": "",
"usageLimit": "",
"isStackable": "0",
"usageCount": 5
}
},
{
"id": "6",
"form_id": "8",
"addon_slug": "gravityformswebhooks",
"meta": {
"feedName": "My Test",
"requestURL": "www.rocketgenius.com",
"requestMethod": "POST",
"requestFormat": "form",
"requestHeaders": [
{
"key": "gf_custom",
"value": "id",
"custom_key": "MyCustomKey",
"custom_value": ""
}
],
"requestBodyType": "all_fields",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": []
}
},
{
"id": "34",
"form_id": "190",
"addon_slug": "gravityformsmailchimp",
"meta": {
"feedName": "Test API Feed Creation 10",
"mailchimpList": "b19814053f",
"mappedFields_EMAIL": "2",
"mappedFields_FNAME": "1.3",
"mappedFields_LNAME": "1.6",
"mappedFields_MMERGE4": "",
"mappedFields_MMERGE5": "",
"mappedFields_MMERGE6": "",
"double_optin": "1",
"markAsVIP": "0",
"note": "",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": []
}
}
]
Usage Examples
Example 1
This example shows how you can get all active feeds for all forms.
https://example.com/wp-json/gf/v2/feeds
Example 2
This example shows how you can get specific feeds.
https://example.com/wp-json/gf/v2/feeds?include[0]=1&include[1]=32
Example 3
This example shows how you can get all feeds for a specific add-on.
https://example.com/wp-json/gf/v2/feeds?addon=gravityformsmailchimp
Getting a Specific Feed
Method
GET
Path
/gf/v2/feeds/[FEED_ID]
Required Properties
There are no required properties.
Optional Properties
There are no optional properties.
Response
The JSON response will contain a Feed Object.
{
"id": "1",
"form_id": "0",
"addon_slug": "gravityformscoupons",
"meta": {
"gravityForm": "0",
"couponName": "Military Discount",
"couponCode": "MD10",
"couponAmountType": "percentage",
"couponAmount": 10,
"startDate": "",
"endDate": "",
"usageLimit": "",
"isStackable": "0",
"usageCount": 5
}
}
Usage Examples
Example 1
This example shows how you can get a specific feed, in this case feed ID 1.
https://example.com/wp-json/gf/v2/feeds/1
Getting Feeds for a Specific Form
Method
GET
Path
/gf/v2/forms/[FORM_ID]/feeds
Required Properties
There are no required properties.
Optional Properties
include – The ID of the Feed or an array of Feed IDs.
addon – The slug of the add-on to which the Feeds belong, including the gravityforms prefix. See the Gravity Forms Add-On Slugs article for a list of possible slugs.
Response
The JSON response will contain an array of Feed Objects for the specified form.
[
{
"id": "30",
"form_id": "190",
"addon_slug": "gravityformsmailchimp",
"meta": {
"feedName": "MailChimp Feed 2",
"mailchimpList": "b19814053f",
"mappedFields_EMAIL": "2",
"mappedFields_FNAME": "1.3",
"mappedFields_LNAME": "1.6",
"mappedFields_MMERGE4": "",
"mappedFields_MMERGE5": "",
"mappedFields_MMERGE6": "",
"double_optin": "1",
"markAsVIP": "0",
"note": "",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": []
}
},
{
"id": "31",
"form_id": "190",
"addon_slug": "gravityformsuserregistration",
"meta": {
"feedName": "User Registration Feed 4",
"feedType": "create",
"username": "1",
"first_name": "1.3",
"last_name": "1.6",
"nickname": "",
"displayname": "nickname",
"email": "2",
"password": "generatepass",
"role": "editor",
"userMeta": "",
"sendEmail": "1",
"userActivationEnable": "0",
"userActivationValue": "email",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": []
}
}
]
Usage Examples
Example 1
This example shows how you can get all active feeds for a specific form, in this case form ID 190.
https://example.com/wp-json/gf/v2/forms/190/feeds
Example 2
This example shows how you can get specific active feeds for a specific form, in this case form ID 190.
https://example.com/wp-json/gf/v2/forms/190/feeds?include[0]=31&include[1]=32
Example 3
This example shows how you can get all active Mailchimp feeds for a specific form, in this case form ID 190.
https://example.com/wp-json/gf/v2/forms/190/feeds?addon=gravityformsmailchimp
Adding a Feed
Method
POST
Path
/gf/v2/feeds
Required Properties
Sent as JSON in the request body.
form_id – The ID of the Form the Feed is for.
meta – The feed properties, see the meta property of the Feed Object.
addon_slug – The slug of the add-on to which the Feeds belong, including the gravityforms prefix. See the Gravity Forms Add-On Slugs article for a list of possible slugs.
Optional Properties
There are no optional properties.
Response
The JSON response will contain a Feed Object.
Usage Examples
Example Request
https://example.com/wp-json/gf/v2/feeds
{
"form_id": "180",
"addon_slug": "gravityformsmailchimp",
"meta": {
"feedName": "Test API Feed Creation",
"mailchimpList": "b19814053f",
"mappedFields_EMAIL": "2",
"mappedFields_FNAME": "1.3",
"mappedFields_LNAME": "1.6",
"mappedFields_MMERGE4": "",
"mappedFields_MMERGE5": "",
"mappedFields_MMERGE6": "",
"double_optin": "1",
"markAsVIP": "0",
"note": "",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": []
}
}
Example Response
{
"form_id": 180,
"addon_slug": "gravityformsmailchimp",
"meta": {
"feedName": "Test API Feed Creation x",
"mailchimpList": "b19814053f",
"mappedFields_EMAIL": "2",
"mappedFields_FNAME": "1.3",
"mappedFields_LNAME": "1.6",
"mappedFields_MMERGE4": "",
"mappedFields_MMERGE5": "",
"mappedFields_MMERGE6": "",
"double_optin": "1",
"markAsVIP": "0",
"note": "",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": []
},
"id": 39
}
Adding a Feed for a Specific Form
Method
POST
Path
/gf/v2/forms/[FORM_ID]/feeds
Required Properties
Sent as JSON in the request body.
meta – The feed properties, see the meta property of the Feed Object.
addon_slug – The slug of the add-on to which the Feeds belong, including the gravityforms prefix. See the Gravity Forms Add-On Slugs article for a list of possible slugs.
Optional Properties
There are no optional properties.
Response
The JSON response will contain a Feed Object.
Usage Examples
Example Request
https://example.com/wp-json/gf/v2/forms/180/feeds
{
"addon_slug": "gravityformsmailchimp",
"meta": {
"feedName": "Test API Feed Creation",
"mailchimpList": "b19814053f",
"mappedFields_EMAIL": "2",
"mappedFields_FNAME": "1.3",
"mappedFields_LNAME": "1.6",
"mappedFields_MMERGE4": "",
"mappedFields_MMERGE5": "",
"mappedFields_MMERGE6": "",
"double_optin": "1",
"markAsVIP": "0",
"note": "",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": []
}
}
Example Response
{
"form_id": 180,
"addon_slug": "gravityformsmailchimp",
"meta": {
"feedName": "Test API Feed Creation",
"mailchimpList": "b19814053f",
"mappedFields_EMAIL": "2",
"mappedFields_FNAME": "1.3",
"mappedFields_LNAME": "1.6",
"mappedFields_MMERGE4": "",
"mappedFields_MMERGE5": "",
"mappedFields_MMERGE6": "",
"double_optin": "1",
"markAsVIP": "0",
"note": "",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": []
},
"id": 39
}
Updating a Feed
Note: prior to version 2.4.23.4 only the feed meta was updated, now the entire feed is updated.
Method
PUT
Path
/gf/v2/feeds/[FEED_ID]
Required Properties
Sent as JSON in the request body.
form_id – The ID of the Form the Feed is for.
meta – The feed properties, see the meta property of the Feed Object.
addon_slug – The slug of the add-on to which the Feeds belong, including the gravityforms prefix. See the Gravity Forms Add-On Slugs article for a list of possible slugs.
Optional Properties
Sent as JSON in the request body.
is_active – Boolean indicating if the feed is active or inactive.
feed_order – Integer indicating the order the feed will be displayed in the feeds list for the form. Also applies to submission time feed processing. Not all add-ons support feed ordering.
Response
The JSON response will contain a Feed Object.
Usage Examples
Example Request
https://example.com/wp-json/gf/v2/feeds/39
{
"form_id": "180",
"addon_slug": "gravityformsmailchimp",
"meta": {
"feedName": "Test API Feed Update",
"mailchimpList": "b19814053f",
"mappedFields_EMAIL": "2",
"mappedFields_FNAME": "1.3",
"mappedFields_LNAME": "1.6",
"mappedFields_MMERGE4": "",
"mappedFields_MMERGE5": "",
"mappedFields_MMERGE6": "",
"double_optin": "1",
"markAsVIP": "0",
"note": "",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": []
}
}
Example Response
{
"form_id": "180",
"addon_slug": "gravityformsmailchimp",
"meta": {
"feedName": "Test API Feed Update",
"mailchimpList": "b19814053f",
"mappedFields_EMAIL": "2",
"mappedFields_FNAME": "1.3",
"mappedFields_LNAME": "1.6",
"mappedFields_MMERGE4": "",
"mappedFields_MMERGE5": "",
"mappedFields_MMERGE6": "",
"double_optin": "1",
"markAsVIP": "0",
"note": "",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": []
},
"id": "39"
}
Partially Updating a Feed
Support for patching feeds was added in version 2.4.23.4.
Method
PATCH
Path
/gf/v2/feeds/[FEED_ID]
Required Properties
There are no required properties.
Optional Properties
One or more properties to be updated sent as JSON in the request body.
form_id – The ID of the Form the Feed is for.
meta – The feed properties, see the meta property of the Feed Object. Only meta properties included in the request will be updated. Any properties not included in the request will remain configured.
addon_slug – The slug of the add-on to which the Feeds belong, including the gravityforms prefix. See the Gravity Forms Add-On Slugs article for a list of possible slugs.
is_active – Boolean indicating if the feed is active or inactive.
feed_order – Integer indicating the order the feed will be displayed in the feeds list for the form. Also applies to submission time feed processing. Not all add-ons support feed ordering.
Response
The JSON response will contain a Feed Object.
Usage Examples
Example Request
This example shows how to update a feed meta property without having to pass the entire feed.
https://example.com/wp-json/gf/v2/feeds/39
{
"meta": {
"mappedFields_MMERGE4": "3"
}
}
Example Response
{
"form_id": "180",
"addon_slug": "gravityformsmailchimp",
"meta": {
"feedName": "Test API Feed Update",
"mailchimpList": "b19814053f",
"mappedFields_EMAIL": "2",
"mappedFields_FNAME": "1.3",
"mappedFields_LNAME": "1.6",
"mappedFields_MMERGE4": "3",
"mappedFields_MMERGE5": "",
"mappedFields_MMERGE6": "",
"double_optin": "1",
"markAsVIP": "0",
"note": "",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": []
},
"id": "39"
}
Updating Specific Feed Properties
Support for updating specific feed properties feeds was added in version 2.4.23.2.
Method
PUT
Path
/gf/v2/feeds/[FEED_ID]/properties
Required Properties
There are no required properties.
Optional Properties
One or more properties to be updated sent as JSON in the request body.
form_id – The ID of the Form the Feed is for.
meta – The feed properties, see the meta property of the Feed Object. You must pass all the meta properties, any not included will be deleted.
addon_slug – The slug of the add-on to which the Feeds belong, including the gravityforms prefix. See the Gravity Forms Add-On Slugs article for a list of possible slugs.
is_active – Boolean indicating if the feed is active or inactive.
feed_order – Integer indicating the order the feed will be displayed in the feeds list for the form. Also applies to submission time feed processing. Not all add-ons support feed ordering.
Response
The response will contain a message indicating if the operation was successful
Usage Examples
Example Request
This example shows how to update a feed meta property without having to pass the entire feed.
https://example.com/wp-json/gf/v2/feeds/39/properties
{
"is_active": false
}
Example Response
Feed updated successfully
Deleting a Specific Feed
Method
DELETE
Path
/gf/v2/feeds/[FEED_ID]
Required Properties
There are no required properties.
Optional Properties
There are no optional properties.
Response
The JSON response will indicate if the feed was deleted and will also contain the deleted Feed Object.
{
"deleted": true,
"previous": {
"id": "39",
"form_id": "180",
"addon_slug": "gravityformsmailchimp",
"meta": {
"feedName": "Test API Feed Creation",
"mailchimpList": "b19814053f",
"mappedFields_EMAIL": "2",
"mappedFields_FNAME": "1.3",
"mappedFields_LNAME": "1.6",
"mappedFields_MMERGE4": "3",
"mappedFields_MMERGE5": "",
"mappedFields_MMERGE6": "",
"double_optin": "1",
"markAsVIP": "0",
"note": "",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": []
}
}
}
Usage Examples
Example 1
This example shows how you can delete a specific feed, in this case feed ID 1.
https://example.com/wp-json/gf/v2/feeds/1