Create Event Template

Create event template within specified project.

Create Event Template

POST https://environment.monterosa.cloud/api/v2/event_templates

Headers

NameTypeDescription

Authorization

string

Bearer JmsmU5gZb6xNVUgQGoKcQLvQjRhKAUSb

Content-Type

string

application/vnd.api+json

Request Body

NameTypeDescription

name

string

Event template name.

duration

integer

Event template duration.

settings

array

List of fields of event template settings. Each field is updated separately and if present its content is rewritten completely.

{
  "data": {
    "id": "b9cb1ba0-d1d3-4f44-8248-d78f8bd4a323",
    "type": "event_templates",
    "attributes": {
      "duration": 600,
      "name": "Event Template",
      "settings": [
        {
          "key": "text",
          "values": {
            "all": "value"
          }
        }
      ]
    },
    "relationships": {
      "elements": {
        "links": {
          "related": "https://environment.lvis.io/api/v2/event_templates/b9cb1ba0-d1d3-4f44-8248-d78f8bd4a323/elements"
        }
      },
      "project": {
        "data": {
          "id": "2773ab5e-227a-4e66-8749-84da7d94c2d2",
          "type": "projects"
        }
      }
    },
    "links": {
      "self": "https://environment.lvis.io/api/v2/event_templates/b9cb1ba0-d1d3-4f44-8248-d78f8bd4a323"
    }
  }
}

Example

// POST /api/v2/event_templates
// Host: environment.monterosa.cloud
// Authorization: Bearer JmsmU5gZb6xNVUgQGoKcQLvQjRhKAUSb
// Content-Type: application/vnd.api+json

{
  "data": {
    "type": "event_templates",
    "relationships": {
      "project": {
        "data": {
          "type": "projects",
          "id": "850e644e-f1ea-444d-bae3-cf38badbe501"
        }
      }
    },
    "attributes": {
      "name": "Event Template",
      "duration": 3600,
      "settings": [
        {
          "key": "hold_prompt",
          "values": {
            "en": "We will be back shortly",
            "de": "Wir sind gleich wieder da"
          }
        },
        {
          "key": "advert_code",
          "values": {
            "all" : "Advert code"
          }
        }
      ]
    }
  }
}