Create Event Template
Create event template within specified project.
post
https://environment.lvis.io
/api/v2/event_templates
Create Event Template
Request
Response
cURL
// POST /api/v2/event_templates
// Host: environment.lvis.io
// 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"
}
}
]
}
}
}
// Status: 201 Created
{
"data": {
"id": "18b17c20-5e84-4086-8da0-784f21622e16",
"type": "events",
"attributes": {
"name": "Event Template",
"duration": 3600,
"settings": [
{
"key": "hold_prompt",
"values": {
"en": "We will be back shortly",
"de": "Wir sind gleich wieder da"
}
}
],
},
"links": {
"self": "https://example.lvis.io/api/v2/event_templates/18b17c20-5e84-4086-8da0-784f21622e16"
},
"relationships": {
"elements": {
"links": {
"related": "https://example.lvis.io/api/v2/event_templates/18b17c20-5e84-4086-8da0-784f21622e16/elements"
}
},
"project": {
"data": {
"id": "850e644e-f1ea-444d-bae3-cf38badbe501",
"type": "projects"
}
}
}
}
}
curl --request POST \
--url https://environment.lvis.io/api/v2/event_templates \
--header 'Authorization: Bearer JmsmU5gZb6xNVUgQGoKcQLvQjRhKAUSb' \
--header 'Content-Type: application/vnd.api+json' \
--data '{
{
"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"
}
}
]
}
}
}
}'
Last modified 2yr ago