---
title: "Set Quarantine Data Export Settings for A User"
method: POST
path: "/users/{user_id}/quarantine_settings"
tags: ["Quarantine Settings"]
---

# Set Quarantine Data Export Settings for A User

`POST /users/{user_id}/quarantine_settings`

## Request

- Base URL: `https://dataops.nexla.io/nexla-api`
- URL: `https://dataops.nexla.io/nexla-api/users/{user_id}/quarantine_settings`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/nexla/apis/nexla-rest-api/docs/users/:user_id/quarantine_settings/post.ts> (a function with typed inputs; its response is checked against the schema)

Sets Quarantine Data Export Settings for all resources owned by a user so that all erroneous records can be automatically exported by the platform to a file system regularly.

## Path parameters

- `user_id` integer, required

## Headers

- `Accept` 'application/vnd.nexla.api.v1+json' | 'application/json': Setting to `application/vnd.nexla.api.v1+json` is recommended.

## Request body

- QuarantineSettingCreate
  - `data_credentials_id` integer, required: Nexla data credential to a file storage system where all error data should be exported. Configure the base folder within the location accessible by this credential by setting an appropriate value for `configure["path"]`.
  - `config` object, required
    - `start.cron` string, required: The interval at which Nexla should scan all quarantined records in the user's account and export them to the specified file storage. This should be a valid cron expression.
    - `path` string, required: The base folder where all quarantined records will be exported. Nexla will automatically create subfolder tree in this base folder when exporting error data files. These subfolders will be of the pattern `<base-path>/<nexla-env-code>/<resource-type>/<resource-id>/<yyyy>/<MM>/<dd>/<unique-file-name>.json`

## Response `200`

Success

- QuarantineSetting
  - `id` integer
  - `owner` UserSimplified
    - `id` integer
    - `full_name` string
    - `email` string
    - `email_verified_at` string, date-time
  - `org` OrgSimplified
    - `id` integer
    - `name` string
    - `email_domain` string
    - `email` string
    - `client_identifier` string
    - `org_webhook_host` string
  - `resource_type` 'ORG' | 'USER' | 'FLOW' | 'PIPELINE' | 'DATA_FLOW' | 'CUSTOM_DATA_FLOW' | 'SOURCE' | 'DATASET' | 'SINK'
  - `resource_id` integer
  - `config` object
    - `start.cron` string
    - `path` string
  - `data_credentials_id` integer
  - `credentials_type` string
  - `data_credentials` DataCredential
    - `id` integer
    - `name` string
    - `description` string
    - `owner` UserSimplified
      - `id` integer
      - `full_name` string
      - `email` string
      - `email_verified_at` string, date-time
    - `org` OrgSimplified
      - `id` integer
      - `name` string
      - `email_domain` string
      - `email` string
      - `client_identifier` string
      - `org_webhook_host` string
    - `access_roles` string[]
    - `credentials_version` string
    - `managed` boolean
    - `credentials_type` string
    - `connector` object
      - `id` integer
      - `type` string
      - `connection_type` string
      - `name` string
      - `description` string
      - `nexset_api_compatible` boolean
    - `api_keys` unknown[]
      - unknown
    - `credentials_non_secure_data` object
    - `verified_status` string
    - `verified_at` string, date-time
    - `copied_from_id` integer
    - `updated_at` string, date-time
    - `created_at` string, date-time
    - `tags` unknown[]
      - unknown

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found

---

[API](https://skmtc.dev/nexla/apis/nexla-rest-api.md) - [All operations](https://skmtc.dev/nexla/apis/nexla-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nexla/apis/nexla-rest-api/revisions/ef02be92fe7b?raw)
