Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 3 Next »


Campaign Webhook



Scope

The Publisher API Webhook allows the V2 API to be used without having to use a OAuth token so you can use Webhooks to send data into Convertr. This is done by providing a unique campaign level token which is active for the duration of the campaign. This allows the user to post to the campaign with an optional publisherId without having to renew their access token.


Setup Process

1. Go to ‘Setup’ under the ‘Admin’ tab on the Convertr campaign overview dashboard



2.Once you have been redirected to the setup page, scroll down to the ‘Campaign API’ section. This is where you will see the ‘Campaign API Key’. This will present a code that will function as the access token for the duration of the campaign you have selected.


Using the Campaign API Key

Form Fields Endpoint

This API call will supply an array of forms, which are available to `POST` leads to (see section 3.5) on a given campaign. The response will allow you to see which form fields are available to populate per form (each campaign can have multiple forms).

Example Form Fields Request

GET request - Campaign Form Fields
https://[enterprise].cvtr.io/webhook/campaign/[CampaignID]/form/fields?apikey=[campaignAPIkey]

Example Form Fields Response

GET response - Campaign Form Fields
[
    {
        "formName": "Form Fields Endpoint",
        "formId": 75,
        "fields": [
            "form[firstName]",
            "form[lastName]",
            "form[email]",
            "form[telephone]"
        ]
    }
]


Campaign Links Endpoint

This API method will return an array of available links for the given campaign. Links are required as it provides insight into which channel a lead entered the Convertr Platform or was captured.

Example Campaign Links Request

GET request - Campaign Links
https://[enterprise].cvtr.io/webhook/campaign/[CampaignID]/links?apikey=[campaignAPIkey]

Example Campaign Links Response

GET response - Campaign Links
[
    {
        "id": 135,
        "name": "Campaign Links Endpoint",
        "channel": "Email",
        "destination": "https://Campaign-Links-Endpoint.cvtr.io/lp/Campaign-Links-Endpoint"
    }
]

Campaign Lead Post Endpoint

The API campaign key method will allow you to post leads to the given campaign.

Example Lead Post Request

POST request - Lead Data
https://[enterprise].cvtr.io/webhook/campaign/[CampaignID]/links?apikey=[campaignAPIkey]&campaignLinkId=[linkid]

Example Lead Post Request

Additionally if you want to pass the publisher id with the lead you can post as below (the publisher ID can be obtained from the platform by going to the publisher section https://[enterprise].cvtr.io/publisher/list).

POST request - Lead Data
https://[enterprise].cvtr.io/webhook/campaign/[CampaignID]/links?apikey=[campaignAPIkey]&campaignLinkId=[linkid]&publisherId=[publisherId]

Example Lead Post Payload (unencoded)

GET request - Campaign Links
form[firstName]=Joe&form[lastName]=Bloggs&form[email]=tech@convertrmedia.net&form[telephone]=02036177659

Example Lead Post Response

GET response - Form Fields
{
    "code": 201,
    "message": "Lead was created successfully",
    "data": 55907
}

Error Responses


  • No labels