---
title: "Apply a template to a table"
method: POST
path: "/table-templates/{template_id}/apply/"
tags: ["table-templates"]
---

# Apply a template to a table

`POST /table-templates/{template_id}/apply/`

## Request

- Base URL: `https://api.getoneprofile.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.getoneprofile.ai/table-templates/{template_id}/apply/`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Create the template's columns on a table, left to right, as one block at the requested position (appended when omitted), references remapped: template-internal references land on their new counterparts, external ones on the target's same-named columns, and anything unmatched stays visibly broken rather than silently wrong. All or nothing: a column the table refuses undoes the ones created before it. Nothing runs. The created columns wait to be run deliberately.

## Path parameters

- `template_id` string, uuid, required

## Request body

- ColumnTemplateApplySchema: Replay a template onto a table.
  - `position` integer, nullable: Insert position of the FIRST column; the rest follow it contiguously, in template order. Appended when omitted.
  - `table_id` string, uuid, required: The table to create the columns on.

## Response `201`

Successful Response

- ColumnTemplateApplyResponseSchema: What an apply created.
  - `created_column_ids` string[], required: The new columns, in template order.

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Template or table not found.
- `422`: Invalid request made to the API.
- `500`: Internal server error.
- `502`: Bad gateway error.
- `503`: Service unavailable.

---

[API](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile.md) · [All operations](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/llms.txt) · [OpenAPI document](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/revisions/dc5ac3c84444?raw)
