Skip to main content
POST
Create a program

Authorizations

X-API-Key
string
header
required

Path Parameters

external_id
string
required

Your own id for the teammate.

Required string length: 1 - 255
Pattern: ^[A-Za-z0-9._:-]{1,255}$

Body

application/json
idempotency_key
string
required

Your id for this request. Sending it again with the same body answers the same job.

Required string length: 1 - 128
end_date
string<date>

The last day the program may run to, instead of weeks.

goal
object
session_minutes
number
Required range: 10 <= x <= 240
sessions_per_week
number

Sessions a week. Defaults to the weekdays sent, else 4.

Required range: 2 <= x <= 7
start
enum<string>
default:when_free

when_free starts the program only if the teammate has no active program. replace also replaces an active program your organization created. A program the teammate or a coach made is never replaced.

Available options:
when_free,
replace
start_date
string<date>

The first day. Defaults to today in the teammate's time zone.

training_experience_years
number

Years of training. Used only before the teammate claims their account; after the claim the teammate's own profile is used and this field is listed in inputs_ignored.

Required range: 0 <= x <= 60
training_weekdays
integer[]

The training days, 0 is Monday and 6 is Sunday, one per session.

Required range: 0 <= x <= 6
weeks
number

How many weeks the program runs. Defaults to 12. Send weeks or end_date.

Required range: 1 <= x <= 52

Response

created_at
string
required
error
object | null
required
finished_at
string | null
required
id
string
required
result
object | null
required
status
enum<string>
required
Available options:
queued,
running,
succeeded,
failed
teammate
string
required