Create a new event

Supported Formats

json

Errors

Code Description
400 Bad Request: body has wrong syntax or unable to handle request
401 Unauthorized: auth_token omitted or authentication failed
403 Forbidden: This action cannot be performed
404 Not Found: The requested resource could not be found
406 Not Acceptable: Accept or Content-Type headers must be application/json, text/csv or application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
422 Unprocessable Entity: body has wrong attributes

Examples

REQUEST
Content-Type: application/json
{
  "html": "<div class=\"main\">Checkout my CTA!</div>",
  "event_type": "marketo_form"
}

RESPONSE
201 (Created)
{
  "id": 1024,
  "html": "<div class=\"main\">Checkout my CTA!</div>",
  "event_type": "marketo_form",
  "created_at": 1374261385,
  "updated_at": 1374261385
}

Params

Param name Description
auth_token
optional

API token needed to authorize requests
This can appear as an attribute in the body of the request or the query parameters on the URL

Validations:

  • Must be a String

name
optional

User-friendly name for the event

Validations:

  • Must be a String

description
optional

User-friendly description for the event’s contents

Validations:

  • Must be a String

fullscreen
optional

Determines if the event should be displayed as a fullscreen event

Validations:

  • Parameter has to be Boolean.

background_color
optional

Background color for the event’s container

Validations:

  • Must be a String

annotation_css
optional

CSS values for width and height, top and left position, annotation background color, and opacity

Validations:

  • Must be an array of any type

blur
optional

Amount to blur the video by when a fullscreen event is displayed

Validations:

  • Parameter has to be Integer.

event_type
optional

The type of Event to create: “simple_post_roll”, “simple_overlay”, “simple_email”, “fullscreen”, “annotation”, “marketo_form”

Validations:

  • Must be a String

html
required

HTML this Event will display. May include JavaScript and HTML forms.

Validations:

  • Must be a String

closeable
optional

Allow the Event to be closed (skipped) by viewers.

Validations:

  • Parameter has to be Boolean.