Enroll user in track
curl --request POST \
--url https://api.doozy.live/v1/tracks/{track_id}/enroll \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"email": "user@example.com",
"user_id": "abc123",
"slack_user_id": "U01ABC2DEF3",
"allow_already_completed": false,
"start_at": "2026-02-20T09:00:00.000Z",
"catch_up": true,
"run_every_day": false
}
'import requests
url = "https://api.doozy.live/v1/tracks/{track_id}/enroll"
payload = {
"email": "user@example.com",
"user_id": "abc123",
"slack_user_id": "U01ABC2DEF3",
"allow_already_completed": False,
"start_at": "2026-02-20T09:00:00.000Z",
"catch_up": True,
"run_every_day": False
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'user@example.com',
user_id: 'abc123',
slack_user_id: 'U01ABC2DEF3',
allow_already_completed: false,
start_at: '2026-02-20T09:00:00.000Z',
catch_up: true,
run_every_day: false
})
};
fetch('https://api.doozy.live/v1/tracks/{track_id}/enroll', 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://api.doozy.live/v1/tracks/{track_id}/enroll",
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([
'email' => 'user@example.com',
'user_id' => 'abc123',
'slack_user_id' => 'U01ABC2DEF3',
'allow_already_completed' => false,
'start_at' => '2026-02-20T09:00:00.000Z',
'catch_up' => true,
'run_every_day' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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://api.doozy.live/v1/tracks/{track_id}/enroll"
payload := strings.NewReader("{\n \"email\": \"user@example.com\",\n \"user_id\": \"abc123\",\n \"slack_user_id\": \"U01ABC2DEF3\",\n \"allow_already_completed\": false,\n \"start_at\": \"2026-02-20T09:00:00.000Z\",\n \"catch_up\": true,\n \"run_every_day\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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://api.doozy.live/v1/tracks/{track_id}/enroll")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"user@example.com\",\n \"user_id\": \"abc123\",\n \"slack_user_id\": \"U01ABC2DEF3\",\n \"allow_already_completed\": false,\n \"start_at\": \"2026-02-20T09:00:00.000Z\",\n \"catch_up\": true,\n \"run_every_day\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.doozy.live/v1/tracks/{track_id}/enroll")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"user@example.com\",\n \"user_id\": \"abc123\",\n \"slack_user_id\": \"U01ABC2DEF3\",\n \"allow_already_completed\": false,\n \"start_at\": \"2026-02-20T09:00:00.000Z\",\n \"catch_up\": true,\n \"run_every_day\": false\n}"
response = http.request(request)
puts response.read_body{
"object": "track_enrollment",
"track_id": "yfc8DZmcLB9eETKkvsCB",
"user_id": "8FcwxtxiMiuishmD8kVS",
"instance_id": "269Z8Xs5tIgUaJcOKCFM",
"status": "active",
"enrolled_at": "2026-02-18T10:30:00.000Z",
"starts_at": "2026-02-20T09:00:00.000Z"
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "No such quiz: tYYueINbgmmyss8O3LiD",
"request_id": "req_8KSh4mNxQ1aZbPoLcVrT",
"param": "id",
"doc_url": "https://docs.doozy.live/api/errors#resource_not_found"
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "No such quiz: tYYueINbgmmyss8O3LiD",
"request_id": "req_8KSh4mNxQ1aZbPoLcVrT",
"param": "id",
"doc_url": "https://docs.doozy.live/api/errors#resource_not_found"
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "No such quiz: tYYueINbgmmyss8O3LiD",
"request_id": "req_8KSh4mNxQ1aZbPoLcVrT",
"param": "id",
"doc_url": "https://docs.doozy.live/api/errors#resource_not_found"
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "No such quiz: tYYueINbgmmyss8O3LiD",
"request_id": "req_8KSh4mNxQ1aZbPoLcVrT",
"param": "id",
"doc_url": "https://docs.doozy.live/api/errors#resource_not_found"
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "No such quiz: tYYueINbgmmyss8O3LiD",
"request_id": "req_8KSh4mNxQ1aZbPoLcVrT",
"param": "id",
"doc_url": "https://docs.doozy.live/api/errors#resource_not_found"
}
}Tracks
Enroll user in track
Enroll a user in a track. The user must be connected to Slack and have at least one role assigned. Exactly one of email, user_id, or slack_user_id must be provided to identify the user.
POST
/
v1
/
tracks
/
{track_id}
/
enroll
Enroll user in track
curl --request POST \
--url https://api.doozy.live/v1/tracks/{track_id}/enroll \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"email": "user@example.com",
"user_id": "abc123",
"slack_user_id": "U01ABC2DEF3",
"allow_already_completed": false,
"start_at": "2026-02-20T09:00:00.000Z",
"catch_up": true,
"run_every_day": false
}
'import requests
url = "https://api.doozy.live/v1/tracks/{track_id}/enroll"
payload = {
"email": "user@example.com",
"user_id": "abc123",
"slack_user_id": "U01ABC2DEF3",
"allow_already_completed": False,
"start_at": "2026-02-20T09:00:00.000Z",
"catch_up": True,
"run_every_day": False
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'user@example.com',
user_id: 'abc123',
slack_user_id: 'U01ABC2DEF3',
allow_already_completed: false,
start_at: '2026-02-20T09:00:00.000Z',
catch_up: true,
run_every_day: false
})
};
fetch('https://api.doozy.live/v1/tracks/{track_id}/enroll', 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://api.doozy.live/v1/tracks/{track_id}/enroll",
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([
'email' => 'user@example.com',
'user_id' => 'abc123',
'slack_user_id' => 'U01ABC2DEF3',
'allow_already_completed' => false,
'start_at' => '2026-02-20T09:00:00.000Z',
'catch_up' => true,
'run_every_day' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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://api.doozy.live/v1/tracks/{track_id}/enroll"
payload := strings.NewReader("{\n \"email\": \"user@example.com\",\n \"user_id\": \"abc123\",\n \"slack_user_id\": \"U01ABC2DEF3\",\n \"allow_already_completed\": false,\n \"start_at\": \"2026-02-20T09:00:00.000Z\",\n \"catch_up\": true,\n \"run_every_day\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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://api.doozy.live/v1/tracks/{track_id}/enroll")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"user@example.com\",\n \"user_id\": \"abc123\",\n \"slack_user_id\": \"U01ABC2DEF3\",\n \"allow_already_completed\": false,\n \"start_at\": \"2026-02-20T09:00:00.000Z\",\n \"catch_up\": true,\n \"run_every_day\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.doozy.live/v1/tracks/{track_id}/enroll")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"user@example.com\",\n \"user_id\": \"abc123\",\n \"slack_user_id\": \"U01ABC2DEF3\",\n \"allow_already_completed\": false,\n \"start_at\": \"2026-02-20T09:00:00.000Z\",\n \"catch_up\": true,\n \"run_every_day\": false\n}"
response = http.request(request)
puts response.read_body{
"object": "track_enrollment",
"track_id": "yfc8DZmcLB9eETKkvsCB",
"user_id": "8FcwxtxiMiuishmD8kVS",
"instance_id": "269Z8Xs5tIgUaJcOKCFM",
"status": "active",
"enrolled_at": "2026-02-18T10:30:00.000Z",
"starts_at": "2026-02-20T09:00:00.000Z"
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "No such quiz: tYYueINbgmmyss8O3LiD",
"request_id": "req_8KSh4mNxQ1aZbPoLcVrT",
"param": "id",
"doc_url": "https://docs.doozy.live/api/errors#resource_not_found"
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "No such quiz: tYYueINbgmmyss8O3LiD",
"request_id": "req_8KSh4mNxQ1aZbPoLcVrT",
"param": "id",
"doc_url": "https://docs.doozy.live/api/errors#resource_not_found"
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "No such quiz: tYYueINbgmmyss8O3LiD",
"request_id": "req_8KSh4mNxQ1aZbPoLcVrT",
"param": "id",
"doc_url": "https://docs.doozy.live/api/errors#resource_not_found"
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "No such quiz: tYYueINbgmmyss8O3LiD",
"request_id": "req_8KSh4mNxQ1aZbPoLcVrT",
"param": "id",
"doc_url": "https://docs.doozy.live/api/errors#resource_not_found"
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "No such quiz: tYYueINbgmmyss8O3LiD",
"request_id": "req_8KSh4mNxQ1aZbPoLcVrT",
"param": "id",
"doc_url": "https://docs.doozy.live/api/errors#resource_not_found"
}
}Authorizations
Path Parameters
Body
application/json
Response
User successfully enrolled in track
Was this page helpful?