> ## 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 Upload Session

> Generates an uploadId for appending or replacing data. This is Stage 1 of the upload process



## OpenAPI

````yaml /openapi/product/data-sets.yaml post /api/data/v3/datasources/{datasetId}/uploads
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/v3/datasources/{datasetId}/uploads:
    post:
      tags:
        - Datasets API
      summary: Create Upload Session
      description: >-
        Generates an uploadId for appending or replacing data. This is Stage 1
        of the upload process
      parameters:
        - name: datasetId
          in: path
          required: true
          description: Unique identifier of the dataset
          schema:
            type: string
        - name: restateDataTag
          in: query
          description: Specifies a partition for UPDATE/REPLACE actions
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UploadRequest'
            example:
              action: APPEND
              message: Uploading
              appendId: latest
      responses:
        '200':
          description: Upload session created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadResponse'
              example:
                dataSourceId: 0dbe6a6a-5588-4a1e-9db4-989ca98762a5
                uploadId: 10
                requestedAsOf: 1654557838137
      x-codeSamples:
        - lang: HTTP
          source: |
            POST /api/data/v3/datasources/{datasetId}/uploads HTTP/1.1
            Host: {instance}.domo.com
            X-DOMO-Developer-Token: {token}
            Content-Type: application/json

            {
              "action": "APPEND",
              "message": "Uploading",
              "appendId": "latest"
            }
components:
  schemas:
    UploadRequest:
      type: object
      properties:
        action:
          type: string
          enum:
            - APPEND
            - REPLACE
          nullable: true
        appendId:
          type: string
          nullable: true
        message:
          type: string
    UploadResponse:
      type: object
      properties:
        dataSourceId:
          type: string
        uploadId:
          type: integer
        requestedAsOf:
          type: integer
          format: int64
  securitySchemes:
    developerToken:
      type: apiKey
      in: header
      name: X-DOMO-Developer-Token
      description: Developer token obtained from Domo

````