---
title: "Generate headcount CSV and upload it to pigment"
method: POST
path: "/{domain}/v1/headcount/upload/pigment"
tags: ["Headcount"]
---

# Generate headcount CSV and upload it to pigment

`POST /{domain}/v1/headcount/upload/pigment`

Generate the headcount CSV and trigger an async upload to Pigment. Optionally pass time-period in the body (currently only `"this-year"` is supported) to scope the CSV to the org's current fiscal year. Refer to the [Pigment Connector API FAQ](/faq/index.html#pigment-connector-api) for more details.

## Path parameters

- `domain` string, required

## Request body

- object
  - `import-configuration-id` string, required
  - `time-period` 'this-year' — Filter records whose effective start date falls within the org's current fiscal year. Valid values: this-year.

## Response `200`

A success message describing the result of the upload.

- string

## Other responses

- `400` — Missing or blank x-pigment-api-key header.
- `401` — Unauthorized
- `500` — Something went wrong. Please contact TeamOhana support.
- `503` — The upload could not be queued. Please retry.

---

[API](https://skmtc.net/teamohana/apis/teamohana-public-api.md) · [All operations](https://skmtc.net/teamohana/apis/teamohana-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/teamohana/teamohana-public-api/revisions/55e225ee4219/schema)
