Solved

Need guidence on creating direct integration with unbounce

  • 12 April 2017
  • 2 replies
  • 70 views

Hi Team,

We have integrated unbounce with our application using webhooks, instead we wanted our application to be a product partner with unbounce. we have submitted a form for being a product partner. we have got response from the unbounce team and they have provided the link to api https://developer.unbounce.com/api_reference/ and this link talks about getting details of landing pages.

But we would like to have a direct integration something similar to “HubSpot”(http://documentation.unbounce.com/hc/en-us/articles/203509934-Integrating-with-HubSpot). please let us know the procedure to be followed to make our application integrated with unbounce as a product partner.

Regards,
Ramya Nuvvula

icon

Best answer by hoyan.leung 9 May 2017, 21:52

View original

2 replies

Hi Rayma,

[TLDR; The current API will only get you part of the way]

I had a quick look at what you’re trying to accomplish with this integration. As I understand it, there are two (possibly more, depending on how much of that process you want to be able to do on behalf of your user) manual steps that need to be done currently:

  1. Add Javascript to Script Manager
  2. Create the web hook integration

On the first one (Javascript), we don’t currently have any API endpoints that allow you to do that - so that would still be something your user would have to do manually.

On the second one (creating that web hook), we do have an endpoint that you can send a POST to to create web hooks on - it’s sort of in beta at the moment, which is why it’s not documented:

To create a web hook via API:

HTTP POST to /pages/:page_id/integrations

…with a payload that looks like:

{
  "type" : "webhook",
  "config" : {
                "url" : "https://your.url.com"
             }
}

So, for example - using cURL (w/basic auth):

curl -u <api-key>: -X POST https://api.unbounce.com/pages/<page-id>/integrations -H "Content-Type:application/json" -d '{ "type" : "webhook", "config" : { "url" : "http://your.url.com" } }'

If the call is successful, you’ll get a 201 Created response , and the Location header will contain the URI of the newly created integration. For example:

Location: https://api.unbounce.com/pages/17be17c9-f444-4b8d-b7ef-b6f5667c5e15/integrations/41c6b1d6-c091-42ac-8503-e0e93381282b

You’ll want to hold onto that URI if you want to perform other operations on that resource.

The /pages/:page_id/integrations/:integration_id resource also supports:

  • GET
  • DELETE
  • PUT

A GET on /pages/:page_id/integrations resource will list all the integrations for a given page.

Hi there! It would be nice to have such important info about webhooks in the documentation)

Reply