---
title: "Set header row on an embed file"
method: POST
path: "/v1/embeds/{embed_id}/set-header"
tags: ["Headless Importer"]
---

# Set header row on an embed file

`POST /v1/embeds/{embed_id}/set-header`

Set the header row either automatically or by index on an embed file. An embed must be in the `uploaded` state to enable setting headers, and an embed is returned in one of the following states: `headers_set` or `columns_mapped`.

## Path parameters

- `embed_id` integer, required

## Request body

- SetHeaderRequest
  - `index` union, required — Set to the 0-based index of the header row, or "auto" to automatically detect and set the header row.
    - integer
    - 'auto'

## Response `200`

200

- EmbedDetail
  - `id` integer
  - `token` string
  - `template_key` string
  - `status` string
  - `user_jwt` string
  - `imported_row_count` integer — Total number of imported rows. Only present when the embed status is "imported".

## Other responses

- `422` — 422

---

[API](https://skmtc.net/oneschema/apis/templates.md) · [All operations](https://skmtc.net/oneschema/apis/templates/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/oneschema/templates/versions/40674aa6d4d9/schema)
