---
title: "Perform a batch action (delete, export, removecompany) on a list of profiles. All profile IDs must belong to the same workspace and the list size is capped at MaxPageSize. Always returns a per-profile success/failure result; for Export, SignedLink additionally carries a time-limited download link to a CSV file built from the profiles the caller was allowed to export."
method: POST
path: "/api/v1/profile/batch"
tags: ["Profile"]
---

# Perform a batch action (delete, export, removecompany) on a list of profiles. All profile IDs must belong to the same workspace and the list size is capped at MaxPageSize. Always returns a per-profile success/failure result; for Export, SignedLink additionally carries a time-limited download link to a CSV file built from the profiles the caller was allowed to export.

`POST /api/v1/profile/batch`

## Request

- Base URL: `https://api.intheloop.io`
- URL: `https://api.intheloop.io/api/v1/profile/batch`
- Auth: API key in header `Authorization`

## Headers

- `Authorization` string
- `X-Impersonate-User` string

## Request body

- ProfileBatchActionRequest: Request body for the profile batch action endpoint.
  - `action` 'Delete' | 'RemoveCompany', required: Action to perform in a profile batch action request.
  - `profileIds` string[]: Profile IDs to perform the action on. All profiles must belong to the same workspace.
  - `companyId` string: Company ID. Required for the RemoveCompany action, where it is used as a safety check: a profile is only unlinked if it is currently linked to this exact company. Ignored for other actions.

## Response `200`

OK

- ProfileBatchActionResult: Result of a profile batch action: one outcome entry per requested profile.
  - `results` ProfileBatchActionItemResult[]: Per-profile outcome, in the same order as the requested profile IDs.
    - `profileId` string: Profile ID this result applies to.
    - `success` boolean, required: Whether the action succeeded for this profile.
    - `error` string: Error message describing why the action failed for this profile. Null when Success is true.
  - `signedLink` string: Signed, time-limited download link to the result file. Only set for the Export action, and only when at least one profile was exported; null for every other action.

## Other responses

- `400`: Bad request. Check fields message and error code from response body for additional information.
- `401`: Unauthorized request. Check fields message and error code from response body for additional information.
- `429`: Too many requests. Check response header Retry-After indicating how long to wait before making a new request.
- `451`: Unavailable because account is not verified.

---

[API](https://skmtc.dev/intheloop/apis/loop-api.md) - [All operations](https://skmtc.dev/intheloop/apis/loop-api/llms.txt) - [OpenAPI document](https://skmtc.dev/intheloop/apis/loop-api/revisions/0892c5ba0787?raw)
