---
title: "Segment companies by similarity (file upload)"
method: POST
path: "/segment"
---

# Segment companies by similarity (file upload)

`POST /segment`

Segments a list of companies from a file into topic clusters using ML-based clustering. Returns a task ID for async processing.

## Query parameters

- `domain_column` string — Column name containing domains (auto-detected if not provided).
- `max_segments` integer, nullable — Maximum number of segments to create (2-100).
- `query_id` string[], nullable — Include domains from these saved queries in the segmentation.

## Response `202`

Successful Response

- TaskResponse — Async task creation response for 202 Accepted responses. Returned when an operation is accepted for async processing. Use the task_id to poll for status and retrieve results.
  - `task_id` string, required — Unique task identifier for polling status

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/discolike/apis/discolike-api.md) · [All operations](https://skmtc.net/discolike/apis/discolike-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/discolike/discolike-api/versions/3248fc62024c/schema)
