Funnels

These endpoints allow you to retrieve, create, update, and delete Funnel(s).


List all funnels

This query allows you to retrieve a paginated list of all your funnels. By default, a maximum of 25 funnels are shown per page.

Arguments

  • Name
    query
    Type
    String!
    Description

    Supported filter parameters: order_by (String) order_dir (String) published (Boolean) product_id (String)

  • Name
    after
    Type
    String
    Description

    Returns the elements that come after the specified cursor.

  • Name
    first
    Type
    String
    Description

    Returns up to the first n elements from the list.

Fields

  • Label
    Funnel!
    Description

    The Funnel! query type.

Request

POST
https://services.lightfunnels.com/api/v2
query FunnelsQuery($first: Int, $after: String, $query: String!){
	funnels(query: "order_by:id order_dir:desc product_id:"15858" published:true", after: "WzVE4OTA5LDEe/4OTA5XQ==", first: 10){
		edges{
			node{
				id
				_id
				name
				published
				slug
				created_at
			}
			cursor
		}
		pageInfo{
			endCursor
			hasNextPage
		}
	}
}

Response

{
		"data": {
			"edges": [
				{
					"cursor": "WzVE4OTA5LDEe/4OTA5XQ==",
					"node": {
						"id": "VzVE4OTA5LDFR4OTA5XQ==",
						"_id": 14352,
						"slug": "fsnZ8_t3c",
						"name": "My funnel",
						"created_at": "a day ago",
						"published": true,
						"__typename": "Funnel"
					}
				}
			],
			"pageInfo": {
				"endCursor": "WzE5OTY4LDE5OTY4XQ==",
				"hasNextPage": false
			}
		}
	}

Create a funnel

This query allows you to add a new funnel.

Arguments

Fields

  • Label
    Funnel!
    Description

    The Funnel! query type.

Request

POST
https://services.lightfunnels.com/api/v2
mutation mutationName($node: InputCreateFunnel!) {
	createFunnel(node: $node){
		# Funnel type fields
	}
}

Response

{
		"data": {
			"createFunnel": {
				_id: 2023, 
				id: "RnVubmVsOjIwMTIz"
			}
		}
	}

Retrieve a funnel

This query allows you to retrieve a funnel by providing its id.

Arguments

  • Name
    id
    Type
    ID!
    Description

    The funnel id.

Fields

  • Label
    Funnel!
    Description

    The Funnel! query type.

Request

POST
https://services.lightfunnels.com/api/v2
	query FunnelQuery($id: ID!){
		node(id: $id){
			... on Funnel{
				# Funnel type fields
			}
		}
	}

Response

{
		"data": {
			"funnel": {
				"id": "UHJvZHVjdDoxNTUxMQ==",
				"_id": 15511,
				...
			}
		}
	}

Update a Funnel

This query allows you to perform an update on a Funnel.

Arguments

  • Name
    id
    Type
    ID!
    Description

    The funnel id.

  • Name
    node
    Label
    InputFunnel!
    Description

    The funnel node.

Fields

  • Label
    Funnel!
    Description

    The Funnel! query type.

Request

Post
https://services.lightfunnels.com/api/v2
mutation updateFunnelMutation($node: InputFunnel!, $id: ID!){
		updateFunnel(node: $node, id: $id){
			# Funnel type fields
		}
	}

Response

{
		"data": {
			"funnel": {
				"id": "UHJvZHVjdDoxNTUxMQ==",
				"_id": 15511,
				"name": "My Awesome Funnel",
				...
			}
		}
	}

Delete a Funnel

This query allows you to delete funnels.

Arguments

  • Name
    items
    Type
    [ID!]!
    Description

    The funnel ids.

Fields

  • Name
    [ID]
    Description

    List of funnel ids.

Request

POST
https://services.lightfunnels.com/api/v2
	mutation deleteFunnelsMutation($items: [ID!]!){
		deleteFunnels(items: $items){
			# [ID] type fields
		}
	}

Response

{
	"data": {
		"deleteFunnels": [
			"UHJvZHVjdDoxNTUxMQ==",
			"UHJvZHVjdFKWATUxMQ=="
		]
	}
}