> ## Documentation Index
> Fetch the complete documentation index at: https://domoinc-openapi-sync-dataflows.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Dataset Copy

> Creates a new dataset by copying an existing schema and providing user-defined metadata



## OpenAPI

````yaml /openapi/product/data-sets.yaml post /api/data/v2/datasources
openapi: 3.0.0
info:
  title: Datasets API
  version: v1
  description: >
    The Domo Datasets API provides a set of endpoints for managing, creating,
    and updating datasets within Domo. The API allows developers to execute SQL
    queries on datasets,

    manage access permissions, retrieve metadata, append rows, share datasets,
    and perform various dataset operations.
servers:
  - url: https://{instance}.domo.com
    description: Domo Instance
    variables:
      instance:
        default: example
        description: Your Domo instance name
security:
  - developerToken: []
paths:
  /api/data/v2/datasources:
    post:
      tags:
        - Datasets API
      summary: Create Dataset Copy
      description: >-
        Creates a new dataset by copying an existing schema and providing
        user-defined metadata
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatasetCreateRequest'
            example:
              userDefinedType: api
              dataSourceName: hello world
              schema:
                columns:
                  - type: STRING
                    name: Friend
                  - type: STRING
                    name: Attending
      responses:
        '200':
          description: Dataset created
      x-codeSamples:
        - lang: HTTP
          source: |
            POST /api/data/v2/datasources HTTP/1.1
            Host: {instance}.domo.com
            X-DOMO-Developer-Token: {token}
            Content-Type: application/json

            {
              "userDefinedType": "api",
              "dataSourceName": "hello world",
              "schema": {
                "columns": [
                  {
                    "type": "STRING",
                    "name": "Friend"
                  },
                  {
                    "type": "STRING",
                    "name": "Attending"
                  }
                ]
              }
            }
components:
  schemas:
    DatasetCreateRequest:
      type: object
      properties:
        userDefinedType:
          type: string
          default: api
        dataSourceName:
          type: string
        schema:
          $ref: '#/components/schemas/Schema'
    Schema:
      type: object
      properties:
        columns:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                enum:
                  - STRING
                  - LONG
                  - DOUBLE
                  - DATE
                  - DATETIME
              name:
                type: string
              id:
                type: string
              visible:
                type: boolean
              order:
                type: integer
  securitySchemes:
    developerToken:
      type: apiKey
      in: header
      name: X-DOMO-Developer-Token
      description: Developer token obtained from Domo

````