Event Templates
The Event Templates API allows you to create, retrieve, update, and delete templates for events. Templates define reusable configurations that can be applied to multiple events, including field definitions and registration forms.
Authentication
All requests to the Event Templates API must be authenticated using the ONLIVE.SITE authentication scheme. Please refer to the Authentication Guide for detailed instructions.
Base URL
https://openapi.onlive.site/api/v1/event-templates
Endpoints
- Create Event Template
- Get Event Template
- Update Event Template
- Search Event Templates
- Delete Event Template
Create Event Template
Creates a new event template with custom fields and registration form association.
HTTP Request
POST /api/v1/event-templates
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The name of the event template (max 255 characters) |
registrationFormId | string (uuid) | Yes | The registration form identifier associated with this template |
fields | array of objects | Yes | The fields configuration for the event template |
Field Object Structure
Each field in the fields array follows the same structure as described in the Event Registration Forms documentation.
Example Request Body
{
"name": "Weekly Tech Talks",
"registrationFormId": "456e7890-e12b-34c5-d678-426614174000",
"fields": [
{
"name": "duration",
"description": "Event Duration",
"fieldType": "number",
"FieldComponent": "input",
"required": true,
"isSortable": true
},
{
"name": "capacity",
"description": "Maximum Capacity",
"fieldType": "number",
"FieldComponent": "input",
"required": true,
"isFilterable": true
},
{
"name": "location",
"description": "Event Location",
"fieldType": "text",
"FieldComponent": "input",
"required": false,
"isSearchable": true
},
{
"name": "isVirtual",
"description": "Virtual Event",
"fieldType": "boolean",
"FieldComponent": "switch",
"required": false,
"isFilterable": true
}
]
}
Response
Returns the created EventTemplate object.
Example Response
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"organizationId": "987e6543-e21a-34b5-c678-426614174000",
"registrationFormId": "456e7890-e12b-34c5-d678-426614174000",
"name": "Weekly Tech Talks",
"slug": "weekly-tech-talks",
"createdAt": "2025-10-12T10:30:00.000Z",
"updatedAt": "2025-10-12T10:30:00.000Z"
}
Get Event Template
Retrieves a specific event template by its ID.
HTTP Request
GET /api/v1/event-templates/{id}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | Yes | The unique identifier of the event template |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
withTrashed | boolean | No | Include trashed event templates |
Response
Returns the EventTemplate object.
Example Response
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"organizationId": "987e6543-e21a-34b5-c678-426614174000",
"registrationFormId": "456e7890-e12b-34c5-d678-426614174000",
"name": "Weekly Tech Talks",
"slug": "weekly-tech-talks",
"createdAt": "2025-10-12T10:30:00.000Z",
"updatedAt": "2025-10-12T10:30:00.000Z"
}
Update Event Template
Updates an existing event template.
HTTP Request
PUT /api/v1/event-templates/{id}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | Yes | The unique identifier of the event template |
Request Body
All fields are optional. Only the fields you want to update need to be included.
| Field | Type | Description |
|---|---|---|
name | string | The name of the event template (max 255 characters) |
registrationFormId | string (uuid) | The registration form identifier associated with this template |
fields | array of objects | The fields configuration for the event template |
Example Request Body
{
"name": "Updated Weekly Tech Talks",
"fields": [
{
"name": "capacity",
"description": "Maximum Capacity",
"fieldType": "number",
"FieldComponent": "input",
"required": true,
"isFilterable": true
},
{
"name": "location",
"description": "Event Location",
"fieldType": "text",
"FieldComponent": "input",
"required": true,
"isSearchable": true
},
{
"name": "speakerName",
"description": "Speaker Name",
"fieldType": "text",
"FieldComponent": "input",
"required": false,
"isSearchable": true
}
]
}
Response
Returns the updated EventTemplate object.
Search Event Templates
Retrieves a paginated list of event templates based on query parameters.
HTTP Request
GET /api/v1/event-templates
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | number | No | Maximum number of items to return (default: 10, min: 1) |
page | number | No | Page number (starts at 1, default: 1, min: 1) |
sort | string | No | Field name and direction to sort results by. Use "ASC" or "DESC". (default: "createdAt DESC") |
withTrashed | boolean | No | Include soft-deleted event templates in the results |
Example Request
GET /api/v1/event-templates?search=Tech&page=1&limit=20
Response
Returns a paginated response with an array of EventTemplate objects.
Example Response
{
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"organizationId": "987e6543-e21a-34b5-c678-426614174000",
"registrationFormId": "456e7890-e12b-34c5-d678-426614174000",
"name": "Weekly Tech Talks",
"slug": "weekly-tech-talks",
"createdAt": "2025-10-12T10:30:00.000Z",
"updatedAt": "2025-10-12T10:30:00.000Z"
}
],
"meta": {
"total": 1,
"page": 1,
"limit": 20,
"totalPages": 1
}
}
Delete Event Template
Deletes an event template by its ID.
HTTP Request
DELETE /api/v1/event-templates/{id}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | Yes | The unique identifier of the event template |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
withTrashed | boolean | No | Include trashed event templates |
Response
Returns the deleted EventTemplate object.
EventTemplate Object
The EventTemplate object represents a reusable template for creating events.
Properties
| Property | Type | Description |
|---|---|---|
id | string (uuid) | The unique identifier of the event template |
organizationId | string (uuid) | The organization identifier that owns this event template |
registrationFormId | string (uuid) | The registration form identifier associated with this template |
name | string | The name of the event template |
slug | string | The slug for the event template (URL-friendly identifier) |
organization | object | The organization associated with the event template |
createdAt | string (ISO 8601) | The date and time when the template was created |
updatedAt | string (ISO 8601) | The date and time when the template was last updated |
deletedAt | string (ISO 8601) | The deletion date of the event template (if deleted) |
Usage
Event templates are used to quickly create new events with predefined configurations. When creating an event, you can specify a templateId to apply the template's field definitions and settings to the new event. This ensures consistency across similar events and reduces the time needed to set up new events.