---
title: "Create Training Content [Single]"
method: POST
path: "/apiHub/learningManagementSystem/v1/companies/{companyId}/content"
tags: ["Training Content"]
---

# Create Training Content [Single]

`POST /apiHub/learningManagementSystem/v1/companies/{companyId}/content`

> 🚧 Partner Restricted
> All LMS API endpoints are restricted to LMS providers that have signed a Paylocity technology partnership agreement.
> [Please reach out to our team](https://www.paylocity.com/contact/partner-form/) if you would like to discuss partnership opportunities.

**Summary Description**

The Create Training Content [Single] endpoint enables partners to add external media content to a client’s LMS library. This endpoint accepts a POST request to create new content in the customer's LMS library. It is the first step in the two-step process for adding content to the customer's LMS partner content library or on-demand library.

The request includes required content metadata, such as title, description, content URL, and file details. Each content item is assigned a unique external content ID and may include an optional thumbnail URL. The resource schema defines the required and optional properties for content creation.

- Option 1: Use the payload to add content directly to the customer library.
- Option 2: Include the training object to add content directly to on-demand trainings.

Ensure that fileDetails.length matches the actual file size. If not, file preview may fail.

**Use Cases**

- Partner needs to upload external content metadata (title, description, URL, file details).
- Partner wants to add content directly to the customer library.
- Partner wants to add content directly to on-demand trainings.

## Path parameters

- `companyId` string, required

## Headers

- `testMode` boolean

## Request body

- MediaContentDto
  - `title` string, nullable — Title of the media content. Required. Max length 255. Validation: Must not be null or empty, max length 255.
  - `description` string, nullable — Description of the media content. Optional. Max length 2000. Validation: If provided, max length 2000.
  - `contentType` 'None' | 'SCORM' | 'Video' | 'File' | 'Url' | 'VideoUpload' | 'Quiz' | 'VideoHub' | 'Audio' | 'Text' — Content type of the media content. Required. Allowed values: File, Url, SCORM, Video. Validation: Must be one of the allowed values.
  - `url` string, nullable — If externally hosted, the URL to access the content. Required if ContentType is Url. Max length 2000. Validation: Required if ContentType is Url, must be a valid URL, max length 2000.
  - `fileDetails` FileDetailsDto
    - `name` string, nullable — Name of the file.
    - `length` integer — Length of the file in bytes.
    - `contentType` string, nullable — MIME type of the file (e.g., video/mp4, image/jpeg).
  - `training` ExternalContentTrainingDto — Optional training metadata determines content placement. Providing it places the content in the LMS On-Demand Trainings area; omitting it keeps the content in the company content library.
    - `name` string, nullable — Training name.
  - `featurePackKey` string, nullable — Optional: Identifies content as part of a specific feature pack

## Response `201`

Created - Resource has been created.

- MediaContentResponseDto — Response returned after creating, updating, or retrieving media content. Contains user-facing messages, the unique identifier for the content, and details required to upload the associated file.
  - `message` string, nullable — A descriptive message providing information about the result of the API operation. Common values include success confirmations or error details when test-mode is enabled.
  - `contentId` string, nullable — The globally unique identifier (GUID) assigned to the media content item. This value is used to reference the content in subsequent API calls.
  - `fileUploadDetails` FileUploadDetailsDto — Provides metadata about the file to be uploaded and the available upload mechanisms.
    - `file` FileInformationDto — Represents detailed information about a media file, prior to upload.
      - `options` FileOptionsDto — Configuration options for file uploads, such file size.
        - `size` string, nullable — The size for the file in bytes.
      - `guid` string, nullable — Universally unique identifier (UUID) generated for this file upload instance.
      - `name` string, nullable — The original filename, including extension (e.g., "training_video.mp4").
      - `contentType` string, nullable — The MIME content type of the file (for example, "video/mp4", "image/jpeg").
    - `strategies` FileUploadStrategiesDto — Defines the set of upload strategies available for a given file.
      - `signed` SignedUploadDto — Contains the HTTP method and URL to perform a single signed upload.
        - `httpMethod` string, nullable — The HTTP verb to use when submitting the file (e.g., PUT or POST).
        - `url` string, nullable — The pre-signed URL to which the client uploads the file in one request.
      - `signedChunked` SignedChunkedUploadDto — Workflow details for chunked file uploads, including per-chunk signing and completion endpoints.
        - `chunks` SignedChunkDetailsDto[], nullable — An ordered list of chunk objects, each containing its own signed URL and metadata.
          - `sequenceNumber` integer — The sequence number of the chunk (1-based index).
          - `size` integer — Size of the chunk in bytes.
          - `httpMethod` string, nullable — HTTP method to use for the chunked upload request (e.g., PUT, POST).
          - `url` string, nullable — The pre-signed URL to which this chunk will be uploaded.
        - `complete` SignedChunkCompletionDto — HTTP method and URL instructions for completing or aborting a chunked upload.
          - `httpMethod` string, nullable — HTTP method to use for completing or aborting the chunked upload (e.g., POST, DELETE).
          - `url` string, nullable — Pre-signed URL to which the complete or abort request will be sent.
        - `abort` SignedChunkCompletionDto — HTTP method and URL instructions for completing or aborting a chunked upload.
          - `httpMethod` string, nullable — HTTP method to use for completing or aborting the chunked upload (e.g., POST, DELETE).
          - `url` string, nullable — Pre-signed URL to which the complete or abort request will be sent.

## Other responses

- `400` — Bad Request - Returns the details of the error.
- `415` — Unsupported Media Type - Returns the details of the error.

---

[API](https://skmtc.net/paylocity/apis/assessments-api.md) · [All operations](https://skmtc.net/paylocity/apis/assessments-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/paylocity/assessments-api/revisions/dd22ab229153/schema)
