Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Campaign Webhook

Table of Contents

Scope

The campaign webhook allows the user to post data to a Convertr campaign using a campaign API key to authenticate the request.
This endpoint also allows for cross-origin requests allowing client-side applications to POST data to Convertr.

...

Code Block
languagejs
https://{enterprise}.cvtr.io/webhook/campaign/v2/{campaign_id}/global-form/fields?apikey={campaign_api_key}

...

Code Block
[
    {
        "formName": "Form Fields Endpoint",
        "formId": 75,
        "fields": [
            {
                "key": "form[firstName]",
                "hidden": false,
                "required": false
            },
            {
                "key": "form[lastName]",
                "hidden"form[email]",: false,
                "required": false
            },
            {
                "key": "form[hidden]",
                "form[telephone]"hidden": true,
                "required": true
            }
        ]
    }
]

Campaign Links Endpoint

...

Code Block
{
    "code": 201,
    "message": "Lead was created successfully",
    "data": 55907
}

Error Responses

Error code

Error Body

Description

1

500

{"code": 500, "message": ""}

Internal server error.

2

404

The server returned a "404 Not Found"

Campaign ID incorrect, incorrect URL or Global Form ID does not exist

3

404

{"code": 404,"message": "Publisher not found"}

Publisher ID incorrect

4

400

{"code": 400,"message": "Validation failed","data": [{"message": "This form should not contain extra fields."},{"fieldName": "form[field name]","message": ""}]}

The form field(s) submitted is/are incorrect and do not match the correct form mapping

5

400

{"code": 400,"message": "Validation failed","data": [{"message": "This form should not contain extra fields."}]}

Some form field(s) submitted in your request do not exist on the form

6

401

{"code": 401,"message": "Access denied."}

Access denied. Incorrect API key 

7

403

{"code": "403","error": "Campaign is inactive"}

Campaign is inactive