# Managing templates The following API endpoints can be used to create, update, view, and delete templates. Templates can be used to create [specialty desk trips](/docs/spotnana/spd_create_spdevent_workflow) and [session events](/docs/spotnana/spd_create_session_workflow). > **Note:** Only the user profiles with the role of `COMPANY_ADMIN`, `COMPANY_TRAVEL_ARRANGER`, `TRAVEL_ARRANGER`, or `TMC_ADMIN` are allowed to create and manage templates. ## Creating a new template | Name | Endpoint | Details | | --- | --- | --- | | [Create a new template](/docs/openapi/templateapi#operation/createeventtemplate) | `/v2/event-templates` | Create a new template for a recurring company program. **Request body contains:** The event name, `customFieldResponses`, `companyId`, `travelerTypes`, and `bookingStyle`. **Response will contain:** `templateId` **Other APIs will use:** `templateId` **Note:** Payment sources cannot be mapped using this endpoint. After creating a new template, use the [update template guidelines](/docs/openapi/templateapi#operation/updatetemplatebookingguidelines) endpoint to map the payment source to the template. | In the [create a new template](/docs/openapi/templateapi#operation/createeventtemplate) endpoint request there are optional fields such as the event `description`, `location`, `allowedBookingTypes`, `internalNotes`, etc. Any information provided in the request schema (i.e., both required and optional) of a template can be inherited when creating an [SPD trip](/docs/spotnana/spd_create_spdevent_workflow) or a [SPD session event](/docs/spotnana/spd_create_session_workflow) from that template. For example, administrators can use the `internalNotes` field to provide instructions to the event coordinators when they create a new [SPD trip](/docs/spotnana/spd_create_spdevent_workflow). Ideally, a template should contain as much reusable information as possible. This allows the event coordinators to prefill most recurring information, making the [SPD trip](/docs/spotnana/spd_create_spdevent_workflow) and the [SPD event](/docs/spotnana/spd_create_session_workflow) creation process faster and more efficient. ## Updating a template The following endpoints allow you to update an existing template. > **Note:** Use the [get template](/docs/openapi/templateapi#operation/geteventtemplate) endpoint to view template information before making any updates. | Name | Endpoint | Details | | --- | --- | --- | | [Update a template’s basic information](/docs/openapi/templateapi#operation/updatetemplatebasicinfo) | `/v2/event-templates/{templateId}/edit-basic-info` | Update a template’s basic information such as the name, description, internal notes, location, traveler types, booking style, and policy details. **URL path requires:** `templateId` generated using the [create an event template](/docs/openapi/templateapi#operation/createeventtemplate) endpoint. **Request body requires:** The event `name`, `description`, `internalNotes`, `location`, `travelerTypes`, `bookingStyle`, and `policyId`. Include these optional fields based on which information you’d like to update. | | [Update a template’s booking guidelines](/docs/openapi/templateapi#operation/updatetemplatebookingguidelines) | `/v2/event-templates/{templateId}/edit-booking-guidelines` | Update a template’s booking guidelines such as allowed booking types (e.g., air, hotel, etc.), booking guidelines (e.g., allowed airports, departure and arrival windows, etc), and payment mappings. **URL path requires:** `templateId` generated using the [create an event template](/docs/openapi/templateapi#operation/createeventtemplate) endpoint. **Request body requires:** The event `bookingGuidelines`, `allowedBookingTypes`, and `paymentMappings`. | | [Update a template’s custom field responses](/docs/openapi/templateapi#operation/updatetemplatecustomfieldresponses) | `/v2/event-templates/{templateId}/custom-field-responses` | Update the template’s custom field responses that are presented to a traveler during checkout. **URL path requires:** `templateId` generated using the [create an event template](/docs/openapi/templateapi#operation/createeventtemplate) endpoint. **Request body requires:** The `customFieldId`, `responseItems`, and `travelerAccess` (e.g., `READ_ACCESS`). |