sitecore Upload API

Endpoints for uploading digital assets into Content Hub, including creating upload requests, uploading binary content, and completing asset ingest.

OpenAPI Specification

sitecore-upload-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Sitecore CDP REST Audit Upload API
  description: The Sitecore CDP REST API provides synchronous access to retrieve, create, update, and delete data stored in Sitecore Customer Data Platform. It exposes guest profiles, orders, order items, order contacts, order consumers, and data extensions through standard HTTP methods. Developers use this API to build integrations that read or write customer data programmatically, enabling use cases such as audience segmentation, data enrichment, and reporting. Authentication uses HTTP Basic Auth with a client key and API token obtained from the CDP instance settings. Regional server endpoints must be used based on the CDP instance's geographic deployment.
  version: v2.1
  contact:
    name: Sitecore Support
    url: https://www.sitecore.com/support
  termsOfService: https://www.sitecore.com/legal/terms-of-service
servers:
- url: https://api-engage-eu.sitecorecloud.io
  description: EU Production Server
- url: https://api-engage-us.sitecorecloud.io
  description: US Production Server
- url: https://api-engage-ap.sitecorecloud.io
  description: Asia-Pacific Production Server
- url: https://api-engage-jpe.sitecorecloud.io
  description: Japan Production Server
security:
- basicAuth: []
tags:
- name: Upload
  description: Endpoints for uploading digital assets into Content Hub, including creating upload requests, uploading binary content, and completing asset ingest.
paths:
  /upload:
    post:
      operationId: createUploadRequest
      summary: Create an upload request
      description: Initiates a new asset upload into Content Hub by creating an upload request. Returns a target URL and upload identifier used for the subsequent binary file upload step.
      tags:
      - Upload
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UploadRequest'
      responses:
        '200':
          description: Upload request created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    Unauthorized:
      description: Authentication token is missing or invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    BadRequest:
      description: The request body or parameters are invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    UploadResponse:
      type: object
      description: Response from creating an upload request with target URLs
      properties:
        uploadId:
          type: string
          description: The unique identifier for the upload session
        uploadUrl:
          type: string
          description: The URL to which the binary file content should be uploaded
          format: uri
        entityId:
          type: integer
          description: The identifier of the entity that will be created upon completion
    UploadRequest:
      type: object
      description: Request body for creating an asset upload request
      required:
      - fileName
      - fileSize
      properties:
        fileName:
          type: string
          description: The name of the file being uploaded
        fileSize:
          type: integer
          description: The size of the file in bytes
        fileType:
          type: string
          description: The MIME type of the file being uploaded
        culture:
          type: string
          description: The culture code for the asset metadata
    ErrorResponse:
      type: object
      description: An error response body
      properties:
        message:
          type: string
          description: A human-readable error message
        statusCode:
          type: integer
          description: The HTTP status code
        errors:
          type: array
          description: List of detailed error messages
          items:
            type: string
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic authentication using a client key as the username and an API token as the password. Credentials are obtained from Sitecore CDP Settings > API access.
externalDocs:
  description: Sitecore CDP REST API Documentation
  url: https://doc.sitecore.com/cdp/en/developers/api/rest-apis.html