> This page is for Talent.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://paylocity.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://paylocity.ferndocs.com/_mcp/server.

# Create Training Content [Single]

POST https://api.paylocity.com/apiHub/learningManagementSystem/v1/companies/{companyId}/content
Content-Type: application/json

All endpoints for this API are restricted to providers that have signed a Paylocity technology partnership agreement. Interested organizations should review our [partner requirements](https://developer.paylocity.com/integrations/docs/partnership-requirements) and [contact guidelines](https://developer.paylocity.com/integrations/docs/partnership-requirements#phase-1--discovery--agreement-terms).

**Summary Description**

Creates a new training content item in a client's LMS library.

**Use Cases**

* Partner wants to add a new video or document to their training catalog.
* Partner needs to upload external content metadata (title, description, URL, file details).

Reference: https://paylocity.ferndocs.com/talent/api-reference/paylocity-ap-is/learning-management-api/create-training-content-single

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `companyId` (string, required)

### Headers

- `testMode` (string, optional) — If true, responses are mocked and generated randomly.
- `Accept` (string, optional)

## Response

### 200

Successful response

## Examples

**Request**

```json
{
  "title": "<string>",
  "description": "<string>",
  "contentType": "Url",
  "url": "<string>",
  "fileDetails": {
    "name": "<string>",
    "length": "<integer>",
    "contentType": "<string>"
  },
  "training": {
    "name": "<string>",
    "in_f": {},
    "occaecat446": {},
    "quis_d": {}
  }
}
```

**Response**

```json
{}
```

**SDK Code**

```python
import requests

url = "https://api.paylocity.com/apiHub/learningManagementSystem/v1/companies/companyId/content"

payload = {
    "title": "<string>",
    "description": "<string>",
    "contentType": "Url",
    "url": "<string>",
    "fileDetails": {
        "name": "<string>",
        "length": "<integer>",
        "contentType": "<string>"
    },
    "training": {
        "name": "<string>",
        "in_f": {},
        "occaecat446": {},
        "quis_d": {}
    }
}
headers = {
    "testMode": "<boolean>",
    "Accept": "application/json",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.paylocity.com/apiHub/learningManagementSystem/v1/companies/companyId/content';
const options = {
  method: 'POST',
  headers: {
    testMode: '<boolean>',
    Accept: 'application/json',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"title":"<string>","description":"<string>","contentType":"Url","url":"<string>","fileDetails":{"name":"<string>","length":"<integer>","contentType":"<string>"},"training":{"name":"<string>","in_f":{},"occaecat446":{},"quis_d":{}}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.paylocity.com/apiHub/learningManagementSystem/v1/companies/companyId/content"

	payload := strings.NewReader("{\n  \"title\": \"<string>\",\n  \"description\": \"<string>\",\n  \"contentType\": \"Url\",\n  \"url\": \"<string>\",\n  \"fileDetails\": {\n    \"name\": \"<string>\",\n    \"length\": \"<integer>\",\n    \"contentType\": \"<string>\"\n  },\n  \"training\": {\n    \"name\": \"<string>\",\n    \"in_f\": {},\n    \"occaecat446\": {},\n    \"quis_d\": {}\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("testMode", "<boolean>")
	req.Header.Add("Accept", "application/json")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.paylocity.com/apiHub/learningManagementSystem/v1/companies/companyId/content")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["testMode"] = '<boolean>'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"title\": \"<string>\",\n  \"description\": \"<string>\",\n  \"contentType\": \"Url\",\n  \"url\": \"<string>\",\n  \"fileDetails\": {\n    \"name\": \"<string>\",\n    \"length\": \"<integer>\",\n    \"contentType\": \"<string>\"\n  },\n  \"training\": {\n    \"name\": \"<string>\",\n    \"in_f\": {},\n    \"occaecat446\": {},\n    \"quis_d\": {}\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.paylocity.com/apiHub/learningManagementSystem/v1/companies/companyId/content")
  .header("testMode", "<boolean>")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"title\": \"<string>\",\n  \"description\": \"<string>\",\n  \"contentType\": \"Url\",\n  \"url\": \"<string>\",\n  \"fileDetails\": {\n    \"name\": \"<string>\",\n    \"length\": \"<integer>\",\n    \"contentType\": \"<string>\"\n  },\n  \"training\": {\n    \"name\": \"<string>\",\n    \"in_f\": {},\n    \"occaecat446\": {},\n    \"quis_d\": {}\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.paylocity.com/apiHub/learningManagementSystem/v1/companies/companyId/content', [
  'body' => '{
  "title": "<string>",
  "description": "<string>",
  "contentType": "Url",
  "url": "<string>",
  "fileDetails": {
    "name": "<string>",
    "length": "<integer>",
    "contentType": "<string>"
  },
  "training": {
    "name": "<string>",
    "in_f": {},
    "occaecat446": {},
    "quis_d": {}
  }
}',
  'headers' => [
    'Accept' => 'application/json',
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'testMode' => '<boolean>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.paylocity.com/apiHub/learningManagementSystem/v1/companies/companyId/content");
var request = new RestRequest(Method.POST);
request.AddHeader("testMode", "<boolean>");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"title\": \"<string>\",\n  \"description\": \"<string>\",\n  \"contentType\": \"Url\",\n  \"url\": \"<string>\",\n  \"fileDetails\": {\n    \"name\": \"<string>\",\n    \"length\": \"<integer>\",\n    \"contentType\": \"<string>\"\n  },\n  \"training\": {\n    \"name\": \"<string>\",\n    \"in_f\": {},\n    \"occaecat446\": {},\n    \"quis_d\": {}\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "testMode": "<boolean>",
  "Accept": "application/json",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "title": "<string>",
  "description": "<string>",
  "contentType": "Url",
  "url": "<string>",
  "fileDetails": [
    "name": "<string>",
    "length": "<integer>",
    "contentType": "<string>"
  ],
  "training": [
    "name": "<string>",
    "in_f": [],
    "occaecat446": [],
    "quis_d": []
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.paylocity.com/apiHub/learningManagementSystem/v1/companies/companyId/content")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```