---
title: "Create or remove segment-company associations"
method: POST
path: "/channel/v1/segments/{companySegmentId}/associationsBatchUpdate"
tags: ["SegmentFolders"]
---

# Create or remove segment-company associations

`POST /channel/v1/segments/{companySegmentId}/associationsBatchUpdate`

## Request

- Base URL: `https://marketplace.appdirect.com/api`
- URL: `https://marketplace.appdirect.com/api/channel/v1/segments/{companySegmentId}/associationsBatchUpdate`
- Auth: none declared
- TypeScript: <https://skmtc.dev/appdirect/apis/companies/docs/channel/v1/segments/:companySegmentId/associationsBatchUpdate/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates or removes associations between segments and companies

## Path parameters

- `companySegmentId` string, required

## Request body

- CompanySegmentAssociationsBatchUpdateRequest: Data required to create or delete an association between segment and companies
  - `deleteAll` boolean, required: Set to true to delete all associations
  - `companyIdsToAdd` string[], required: The list of company IDs to associate with the segment, up to a maximum of 1000 IDs
  - `companyIdsToRemove` string[], required: The list of company IDs to disassociate from the segment, up to a maximum of 1000 IDs

## Response `204`

The segment to company associations were successfully updated.

## Other responses

- `400`: Bad request
- `409`: The association already exists between the segment and company.

## Changes

- **2026-11-06** `1fc240f06971`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/appdirect/apis/companies/changes/channel/v1/segments/:companySegmentId/associationsBatchUpdate/post.md)

---

[API](https://skmtc.dev/appdirect/apis/companies.md) - [All operations](https://skmtc.dev/appdirect/apis/companies/llms.txt) - [OpenAPI document](https://skmtc.dev/appdirect/apis/companies/revisions/1fc240f06971?raw)
