Skip to main content
POST
/
v1
/
tracks
/
{trackId}
/
enroll
Enroll user in track
curl --request POST \
  --url https://api.doozy.live/v1/tracks/{trackId}/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"
}
'
{
  "object": "track_enrollment",
  "track_id": "wf_abc123xyz",
  "user_id": "usr_abc123",
  "instance_id": "inst_xyz789",
  "status": "active",
  "enrolled_at": "2026-02-18T10:30:00.000Z",
  "starts_at": "2026-02-20T09:00:00.000Z"
}

Authorizations

x-api-key
string
header
required

API key for authentication. Generate keys in the Doozy dashboard.

Path Parameters

trackId
string
required

The unique identifier of the track

Example:

"wf_abc123xyz"

Body

application/json
email
string<email>

The email address of the user to enroll

Example:

"user@example.com"

user_id
string

The Doozy user ID of the user to enroll

Example:

"abc123"

slack_user_id
string

The Slack user ID of the user to enroll

Example:

"U01ABC2DEF3"

allow_already_completed
boolean
default:false

Allow enrolling a user who has previously completed this track. Defaults to false.

Example:

false

start_at
string<date-time>

ISO 8601 timestamp for when the user should start the track. Defaults to now. Can be set to a future date to schedule enrollment.

Example:

"2026-02-20T09:00:00.000Z"

Response

User successfully enrolled in track

object
enum<string>
required

The object type

Available options:
track_enrollment
Example:

"track_enrollment"

track_id
string
required

The ID of the track the user was enrolled in

Example:

"wf_abc123xyz"

user_id
string
required

The Doozy user ID of the enrolled user

Example:

"usr_abc123"

instance_id
string
required

The ID of the workflow instance created for this enrollment

Example:

"inst_xyz789"

status
enum<string>
required

The status of the enrollment

Available options:
active
Example:

"active"

enrolled_at
string
required

ISO 8601 timestamp of when the user was enrolled

Example:

"2026-02-18T10:30:00.000Z"

starts_at
string
required

ISO 8601 timestamp of when the user will start the track (may be in the future if scheduled)

Example:

"2026-02-20T09:00:00.000Z"