Assign a certification, course or lesson
curl --request POST \
--url https://public-api.sessionboard.com/v1/organization/{orgId}/learning/assignments/create \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"targetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"audience": {
"allTeam": true,
"userIds": [
123
]
},
"dueInDays": 183,
"required": true,
"slackChannelId": "<string>"
}
'import requests
url = "https://public-api.sessionboard.com/v1/organization/{orgId}/learning/assignments/create"
payload = {
"targetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"audience": {
"allTeam": True,
"userIds": [123]
},
"dueInDays": 183,
"required": True,
"slackChannelId": "<string>"
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
targetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
audience: {allTeam: true, userIds: [123]},
dueInDays: 183,
required: true,
slackChannelId: '<string>'
})
};
fetch('https://public-api.sessionboard.com/v1/organization/{orgId}/learning/assignments/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://public-api.sessionboard.com/v1/organization/{orgId}/learning/assignments/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'targetId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'audience' => [
'allTeam' => true,
'userIds' => [
123
]
],
'dueInDays' => 183,
'required' => true,
'slackChannelId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://public-api.sessionboard.com/v1/organization/{orgId}/learning/assignments/create"
payload := strings.NewReader("{\n \"targetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"audience\": {\n \"allTeam\": true,\n \"userIds\": [\n 123\n ]\n },\n \"dueInDays\": 183,\n \"required\": true,\n \"slackChannelId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://public-api.sessionboard.com/v1/organization/{orgId}/learning/assignments/create")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"targetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"audience\": {\n \"allTeam\": true,\n \"userIds\": [\n 123\n ]\n },\n \"dueInDays\": 183,\n \"required\": true,\n \"slackChannelId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.sessionboard.com/v1/organization/{orgId}/learning/assignments/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"targetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"audience\": {\n \"allTeam\": true,\n \"userIds\": [\n 123\n ]\n },\n \"dueInDays\": 183,\n \"required\": true,\n \"slackChannelId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyOrg — Learning
Assign a certification, course or lesson
Assigns already-published training to the whole team or named teammates and messages each of them. Requires write:learning. Also at POST /v1/learning/assignments/create.
POST
/
v1
/
organization
/
{orgId}
/
learning
/
assignments
/
create
Assign a certification, course or lesson
curl --request POST \
--url https://public-api.sessionboard.com/v1/organization/{orgId}/learning/assignments/create \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"targetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"audience": {
"allTeam": true,
"userIds": [
123
]
},
"dueInDays": 183,
"required": true,
"slackChannelId": "<string>"
}
'import requests
url = "https://public-api.sessionboard.com/v1/organization/{orgId}/learning/assignments/create"
payload = {
"targetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"audience": {
"allTeam": True,
"userIds": [123]
},
"dueInDays": 183,
"required": True,
"slackChannelId": "<string>"
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
targetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
audience: {allTeam: true, userIds: [123]},
dueInDays: 183,
required: true,
slackChannelId: '<string>'
})
};
fetch('https://public-api.sessionboard.com/v1/organization/{orgId}/learning/assignments/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://public-api.sessionboard.com/v1/organization/{orgId}/learning/assignments/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'targetId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'audience' => [
'allTeam' => true,
'userIds' => [
123
]
],
'dueInDays' => 183,
'required' => true,
'slackChannelId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://public-api.sessionboard.com/v1/organization/{orgId}/learning/assignments/create"
payload := strings.NewReader("{\n \"targetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"audience\": {\n \"allTeam\": true,\n \"userIds\": [\n 123\n ]\n },\n \"dueInDays\": 183,\n \"required\": true,\n \"slackChannelId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://public-api.sessionboard.com/v1/organization/{orgId}/learning/assignments/create")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"targetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"audience\": {\n \"allTeam\": true,\n \"userIds\": [\n 123\n ]\n },\n \"dueInDays\": 183,\n \"required\": true,\n \"slackChannelId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.sessionboard.com/v1/organization/{orgId}/learning/assignments/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"targetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"audience\": {\n \"allTeam\": true,\n \"userIds\": [\n 123\n ]\n },\n \"dueInDays\": 183,\n \"required\": true,\n \"slackChannelId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
ApiKeyBearerToken
Organization API token. Generate from Organization Settings → API Tokens.
Path Parameters
Your organization ID. Any other organization returns 404.
Body
application/json
Response
Assigned; payload.assignment and payload.delivery (who was messaged, and how).

