---
title: "create template from column mappings"
method: POST
path: "/roster-upload/{templateId}/column-mapping/template"
tags: ["Roster upload"]
---

# create template from column mappings

`POST /roster-upload/{templateId}/column-mapping/template`

Creates a new template from the provided column mappings. Requires the column_mapping_enabled feature flag to be enabled. The mappings are validated against tenant-specific schemas if configured.

## Path parameters

- `templateId` string, required

## Headers

- `tenant-id` string, required

## Request body

- SaveMappingsRequest
  - `updateExistingTemplate` boolean
  - `jobType` 'PRACTITIONER' | 'FACILITY'
  - `mappings` Field[]
    - `name` string
    - `mappedKey` string
    - `mappedEntity` string
    - `entityGroup` string
    - `isRequired` boolean
    - `isStaticField` boolean
    - `isSingleSelect` boolean
    - `validationRegex` string
    - `description` string
    - `enum` string[]
    - `singleSelect` boolean
  - `templateName` string
  - `templateDescription` string

## Response `200`

Template created successfully

- SingleStepTemplateFlowResponse
  - `fields` Field[]
    - `name` string
    - `mappedKey` string
    - `mappedEntity` string
    - `entityGroup` string
    - `isRequired` boolean
    - `isStaticField` boolean
    - `isSingleSelect` boolean
    - `validationRegex` string
    - `description` string
    - `enum` string[]
    - `singleSelect` boolean
  - `status` string
  - `templateId` string
  - `templateUrl` string
  - `schemaUrl` string

## Other responses

- `400` — Invalid input or request
- `401` — Unauthorized - Authentication required
- `403` — Forbidden - Column mapping feature is disabled or insufficient permissions
- `500` — Internal server error

---

[API](https://skmtc.net/certifyos/apis/certify-api-layer.md) · [All operations](https://skmtc.net/certifyos/apis/certify-api-layer/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/certifyos/certify-api-layer/revisions/3d27e9019c7b/schema)
