# Archive every contact a list filter matches

Archives the active contacts in the caller's tenant that match the contact list's client, search, search terms and filters, minus any excluded ids. A contact must match the search and every search term, and each term may match in a different field. Each archived contact stops being primary, a client whose preferred contact it was is left without one, and when ConnectWise write-back is on its deletion is queued there. More than 5,000 matches answers validation_failed and archives nothing; narrow the filters and try again.

**POST** /v1/contacts/bulk-archive



## Parameters
- Idempotency-Key (header, required): Opaque idempotency key, at most 255 characters, scoped to (tenant, principal, operation). A missing key is validation_failed.

## Request body
- clientId: string
- search: string
- searchTerms: array
- filters: object
- excludedIds: array

## Responses
- **200** Archive every contact a list filter matches — archivedCount (required): integer
- **202** Error envelope. `error.code` carries the typed outcome and `error.type` resolves to its description. — ApprovalRequiredError:; allOf: ErrorEnvelope
- **400** Error envelope. `error.code` carries the typed outcome and `error.type` resolves to its description. — ValidationFailedError:; allOf: ErrorEnvelope
- **401** Error envelope. `error.code` carries the typed outcome and `error.type` resolves to its description. — UnauthorizedError:; allOf: ErrorEnvelope
- **403** Error envelope. `error.code` carries the typed outcome and `error.type` resolves to its description. — ForbiddenError:; allOf: ErrorEnvelope
- **409** Error envelope. `error.code` carries the typed outcome and `error.type` resolves to its description. — ConflictError:; allOf: ErrorEnvelope
- **429** Error envelope. `error.code` carries the typed outcome and `error.type` resolves to its description. — RateLimitedError:; allOf: ErrorEnvelope
- **503** Error envelope. `error.code` carries the typed outcome and `error.type` resolves to its description. — UnavailableError:; allOf: ErrorEnvelope

## Example
```bash
curl --request POST \
  --url 'https://api.scopable.io/v1/contacts/bulk-archive' \
  --header 'Authorization: Bearer $SCOPABLE_API_KEY' \
  --data '<JSON request body>'
```

OpenAPI source: https://api.scopable.io/v1/openapi.json