v1

latestOpenAPI 3.0.42026-07-2481154567.6 KB
Training Content

Create Training Content [Single]

🚧 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 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.
post/apiHub/learningManagementSystem/v1/companies/{companyId}/content

Path parameters

companyIdstring required

The Paylocity Company Identifier. Unique value provided by Paylocity. Allowable Values: 9 char max.

Headers

testModeboolean

If true, responses are mocked and generated randomly.

Request body

titlestring nullable

Title of the media content. Required. Max length 255. Validation: Must not be null or empty, max length 255.

descriptionstring 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.

urlstring 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.

featurePackKeystring nullable

Optional: Identifies content as part of a specific feature pack

Example request

{
  "title": "Introduction to Workplace Safety",
  "description": "An overview of essential safety guidelines and procedures for new employees.",
  "url": "https://cdn.example.com/videos/workplace-safety.mp4",
  "fileDetails": {
    "name": "workplace-safety-guide.pdf",
    "length": 2048000,
    "contentType": "application/pdf"
  },
  "training": {
    "name": "Workplace Safety Fundamentals"
  }
}

Response

Created - Resource has been created.

messagestring 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.

contentIdstring nullable

The globally unique identifier (GUID) assigned to the media content item. This value is used to reference the content in subsequent API calls.

Example response

{
  "message": "\"Request is accepted and being processed.\"",
  "contentId": "\"550e8400-e29b-41d4-a716-446655440000\"",
  "fileUploadDetails": {
    "file": {
      "options": {
        "size": "\"104857600\""
      },
      "guid": "\"123e4567-e89b-12d3-a456-426614174000\"",
      "name": "\"training_video.mp4\"",
      "contentType": "\"video/mp4\""
    },
    "strategies": {
      "signed": {
        "httpMethod": "\"PUT\"",
        "url": "\"https://dev.files.qa.paylocity.com/lmsNextGenContent/companies/b6001/myScorm.zip?signature=eyJhbGciOiJ1iOGMyYWRjMDBiMjgiLCJzY2uYUn7GpJi1DwyVH-8izS-Q\""
      },
      "signedChunked": {
        "chunks": [
          {
            "sequenceNumber": 1,
            "size": 5242880,
            "httpMethod": "\"PUT\"",
            "url": "\"https://dev.files.qa.paylocity.com/lmsNextGenContent/companies/b6001/myScorm.zip?signature=abc123\""
          }
        ],
        "complete": {
          "httpMethod": "\"POST\"",
          "url": "\"https://dev.files.qa.paylocity.com/lmsNextGenContent/companies/b6001/myScorm.zip?signature=xyz\""
        },
        "abort": {
          "httpMethod": "\"POST\"",
          "url": "\"https://dev.files.qa.paylocity.com/lmsNextGenContent/companies/b6001/myScorm.zip?signature=xyz\""
        }
      }
    }
  }
}