---
title: "Copy a Source"
method: POST
path: "/data_sources/{source_id}/copy"
tags: ["Sources"]
---

# Copy a Source

`POST /data_sources/{source_id}/copy`

## Request

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

Use this endpoint to create a copy of an existing flow.

## Path parameters

- `source_id` integer, required

## Request body

- object
  - `reuse_data_credentials` boolean: Set this to `true` if you do want to reuse the credentials of this source instead of creating a clone of the credentials also.
  - `copy_access_controls` boolean: Set this to `true` if you want the new source to be accessible by all users who have access to the this sink.
  - `owner_id` integer: The default API behavior is to create the new source in the account of the authenticated user making this call. Set this property if you want a different user to be the owner of the new source.
  - `org_id` integer: The default API behavior is to create the new source in the org that the authenticated user making this call belongs to. Set this property if you want the source to be created in a different org.

## Response `200`

Success

- object
  - `id` integer
  - `owner` Owner
    - `id` integer
    - `full_name` string
    - `email` string, email
  - `org` Org
    - `id` integer
    - `name` string
    - `email_domain` string
    - `email` unknown
    - `client_identifier` unknown
  - `access_roles` string[]: This property reflects all the permissions the user/team/organization has to this resource. 1. `collaborator`: The user/team/organization can view the resource but not make any modifications to it. 2. `operator`: The user/team/organization can view the resource and can activate/pause it, but not make any other modifications to it. 3. `administrator`: The user/team/organization has complete administrative rights to this resource. 4. `owner`: This user created the resource and so has complete administrative rights to it.
  - `name` string
  - `description` unknown
  - `status` string
  - `data_sets` object[]
    - `version` integer
    - `id` integer
    - `owner_id` integer
    - `org_id` integer
    - `name` string
    - `description` string
    - `updated_at` string, date-time
    - `created_at` string, date-time
  - `ingest_method` string
  - `source_format` string
  - `source_config` object: The source configuration properties that were set as `source_config` in the payload-to-source create/update API calls.
  - `poll_schedule` unknown
  - `managed` boolean
  - `code_container_id` unknown
  - `source_type` string
  - `connector_type` string
  - `connector` object
    - `id` integer
    - `type` string
    - `connection_type` string
    - `name` string
    - `description` string
    - `nexset_api_compatible` boolean
  - `api_keys` unknown[]
    - unknown
  - `auto_generated` boolean
  - `data_credentials` object
    - `id` integer
    - `name` string
    - `description` string
    - `owner` Owner
      - `id` integer
      - `full_name` string
      - `email` string, email
    - `org` Org
      - `id` integer
      - `name` string
      - `email_domain` string
      - `email` unknown
      - `client_identifier` unknown
    - `access_roles` string[]: This property reflects all the permissions the user/team/organization has to this resource. 1. `collaborator`: The user/team/organization can view the resource but not make any modifications to it. 2. `operator`: The user/team/organization can view the resource and can activate/pause it, but not make any other modifications to it. 3. `administrator`: The user/team/organization has complete administrative rights to this resource. 4. `owner`: This user created the resource and so has complete administrative rights to it.
    - `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` unknown
    - `updated_at` string, date-time
    - `created_at` string, date-time
    - `tags` unknown[]
      - unknown
  - `run_ids` object[]
    - `id` integer
    - `created_at` string, date-time
  - `copied_from_id` unknown
  - `updated_at` string, date-time
  - `created_at` string, date-time
  - `tags` unknown[]
    - unknown
  - `flow_type` string
  - `ingestion_mode` string

## Other responses

- `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)
