View, create and delete call to actions.
Create a new event
| 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 |
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
}
| Param name | Description |
|---|---|
|
auth_token optional |
API token needed to authorize requests Validations:
|
|
name optional |
User-friendly name for the event Validations:
|
|
description optional |
User-friendly description for the event’s contents Validations:
|
|
fullscreen optional |
Determines if the event should be displayed as a fullscreen event Validations:
|
|
background_color optional |
Background color for the event’s container Validations:
|
|
annotation_css optional |
CSS values for width and height, top and left position, annotation background color, and opacity Validations:
|
|
blur optional |
Amount to blur the video by when a fullscreen event is displayed Validations:
|
|
event_type optional |
The type of Event to create: “simple_post_roll”, “simple_overlay”, “simple_email”, “fullscreen”, “annotation”, “marketo_form”, “sharing_page_action”, “vy_free_post_roll”, “vy_free_on_pause” Validations:
|
|
html required |
HTML this Event will display. May include JavaScript and HTML forms. Validations:
|
|
closeable optional |
Allow the Event to be closed (skipped) by viewers. Validations:
|
|
is_shared optional |
Determines if the the event should be shared Validations:
|
|
settings optional |
Optional settings Validations:
|
Get all events belonging to your organization.
| 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 |
REQUEST
Accept: application/json
RESPONSE
200 (OK)
[
events: [
{
"id": 8192
"event_type": "fullscreen",
"html": "<div class=\"main\">Checkout my CTA!</div>"
...
},
{
"id": 9297
"event_type": "fullscreen",
"html": "<div class=\"main\">Checkout my CTA!</div>"
...
}
],
summary: {
page: 1,
per_page: 20,
count: 2,
page_count: 1
}
]
| Param name | Description |
|---|---|
|
auth_token optional |
API token needed to authorize requests Validations:
|
|
shared_only optional |
If set to true, will only return shared events from this organization Validations:
|
|
per_page optional |
The number of items to show per page Validations:
|
|
page optional |
The page number to include in the response Validations:
|
Search for events belonging to your organization.
| 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 |
REQUEST
Accept: application/json
RESPONSE
200 (OK)
{
events: [
{
"id": 8192
"event_type": "fullscreen",
"html": "<div class=\"main\">Checkout my CTA!</div>"
...
},
{
"id": 9297
"event_type": "fullscreen",
"html": "<div class=\"main\">Checkout my CTA!</div>"
...
}
],
summary: {
page: 1,
per_page: 20,
count: 2,
page_count: 1
}
}
| Param name | Description |
|---|---|
|
auth_token optional |
API token needed to authorize requests Validations:
|
|
shared_only optional |
If set to true, will only return shared events from this organization Validations:
|
|
per_page optional |
The number of items to show per page Validations:
|
|
page optional |
The page number to include in the response Validations:
|
|
query optional |
Only works if ‘per_page’ or ‘page’ parameters are also set. Validations:
|
|
type optional |
Filter the type of event to return Validations:
|
Make a copy of an event.
| 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 |
REQUEST
Content-Type: application/json
{
name: "This is a duplicate of 23"
organization_id: 2
}
RESPONSE
201 (Created)
{
"id": 24,
"name": "This is a duplicate of 23"
"html": "<div class=\"main\">Checkout my CTA!</div>",
"organization_id": 2,
"created_at": 1374261385,
"updated_at": 1374261385
}
| Param name | Description |
|---|---|
|
auth_token optional |
API token needed to authorize requests Validations:
|
|
id required |
The ID of the event to be duplicated Validations:
|
|
organization_id optional |
The ID of the organization the event will be duplicated to. Validations:
|
|
name optional |
The name to assign to the duplicate event. If not provided, the event will retain the name with ‘Duplicate of’ prepended. Validations:
|
Get a single event.
| 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 |
REQUEST
Accept: application/json
RESPONSE
200 (OK)
{
"id": 8192,
"event_type": "fullscreen",
"html": "<div class=\"main\">Checkout my CTA!</div>",
"created_at": 1374261385,
"updated_at": 1374261385
}
| Param name | Description |
|---|---|
|
auth_token optional |
API token needed to authorize requests Validations:
|
Get information about the players associated with an event
| 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 |
REQUEST
Accept: application/json
RESPONSE
200 (OK)
[{
"name": "My Player",
"width": 640,
"height": 360,
...
"chapters_attributes": [{
"id": 1,
"created_at": 1506710125,
"updated_at": 1506710125,
"position": 0,
"player_id": 1,
"video_id": 1,
"video_attributes": {
"name": "My Video",
"upload_url": "http://www.example.com/video.mp4",
"current_thumbnail_attributes": null,
...
},
"event_attributes": [{
"id": 1,
"created_at": 1506710125,
"updated_at": 1506710125,
"owner_type": "Chapter",
"owner_id": 1,
"event_id": 1,
"second": 2,
"duration": 1,
"annotation_css": null
}]
}]
}]
| Param name | Description |
|---|---|
|
auth_token optional |
API token needed to authorize requests Validations:
|
Update an event.
| 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 |
REQUEST
Content-Type: application/json
{
"name": "This gets a new name",
"html": "<div class=\"main\">Check out my event!</div>",
}
RESPONSE
200 (OK)
{
"id": 23,
"name": "This gets a new name",
"html": "<div class=\"main\">Check out my event!</div>",
"organization_id": 2,
"event_type": "fullscreen",
"prefill": false,
"created_at": 1374261385,
"updated_at": 1374261385,
...
}
| Param name | Description |
|---|---|
|
auth_token optional |
API token needed to authorize requests Validations:
|
Delete a call to action
| 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 |
REQUEST
Accept: application/json
RESPONSE
{
"event_type": "fullscreen",
"html": "<div class=\"main\">Checkout my CTA!</div>",
"id": 8192,
"created_at": 1374261385,
"updated_at": 1374261385
}
| Param name | Description |
|---|---|
|
auth_token optional |
API token needed to authorize requests Validations:
|
Get the event metadata for a player
| 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 |
REQUEST
Accept: application/json
RESPONSE
{
"max_events_width": 350,
"num_public_events": 11,
"num_draft_events": 2
}
| Param name | Description |
|---|---|
|
auth_token optional |
API token needed to authorize requests Validations:
|
Add an event to a player by UUID
| 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 |
| Param name | Description |
|---|---|
|
auth_token optional |
API token needed to authorize requests Validations:
|
|
uuid required |
The player UUID Validations:
|
|
event_id required |
The event ID Validations:
|
|
second required |
The second the event will start on Validations:
|
|
duration required |
The duration of the event Validations:
|