Skip to content
中文

Set objectives

An objective hangs on a department or a position, is pursued inside one period, breaks into measurable key results and is graded once at the end. Variable: BASE is the API address. Writes need an organization owner or admin, or the head of the objective’s department.

Set them in the Console

  1. Open Console → Organization → 目标 (Objectives) (/org/objectives). If there is no period yet, click “新建周期” (New period) first.
  2. Click “设定目标” (Set objective), choose the department or position it hangs on and the period, write a title, and click “设定目标”.
  3. On the objective, click “设定关键结果” (Set key results) to break it into measurable key results.

Open a period

An organization has one calendar of periods on three levels: year, half and quarter. A period’s status is derived from its dates, never sent: planning before start_on, active from start_on through end_on inclusive, grading after that, and closed only when you close it. Dates are YYYY-MM-DD, and today is read as the UTC date.

终端窗口
curl -X POST "$BASE/workforce/v1/periods" \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "2026 Q4", "cadence": "quarter", "start_on": "2026-10-01", "end_on": "2026-12-31"}'

Expected: HTTP 201 with a prd_ ID and the derived status. Periods of the same cadence cannot overlap, otherwise 400 PERIOD_OVERLAP. Use parent_id to place a half or quarter inside a coarser period that contains its whole range.

Set an objective

An objective belongs to a department or a position; company objectives hang on the root department.

终端窗口
curl -X POST "$BASE/workforce/v1/objectives" \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"period_id": "prd_123", "scope": {"kind": "department", "id": "dept_123"}, "title": "Cut first-response time", "description": "Median first response under 2 hours."}'

scope.kind is department or position; title is 1 to 200 characters and description at most 2000. Expected: HTTP 201, status active, empty parents, and result and score null.

Objectives align only upward. PUT /workforce/v1/objectives/{id}/parents replaces the whole set of parents the objective contributes to; each parent must hang on the objective’s own department or one above it, weight is greater than 0 and at most 1, and each parent appears once.

终端窗口
curl -X PUT "$BASE/workforce/v1/objectives/$OBJECTIVE_ID/parents" \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"parents": [{"objective_id": "obj_456", "weight": 1}]}'

Expected: HTTP 200 and the parents you sent in parents. A parent outside the department and its ancestors returns 400 SCOPE_MISMATCH, and a loop returns 400 ALIGNMENT_CYCLE.

Key results

A key result is owned by one position, and its current holder moves the progress. A numeric key result carries a metric: initial (the start), target (which must differ from the start), an optional current, and a unit of none, percent, currency_micro_usd, count or seconds. Omit metric for a binary key result, whose progress is its done flag. commitment is committed or aspirational.

终端窗口
curl -X POST "$BASE/workforce/v1/key_results" \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"objective_id": "obj_123", "title": "Median first response under 2 hours", "owner_position_id": "pos_123", "commitment": "committed", "metric": {"initial": 6, "target": 2, "unit": "none"}}'

Expected: HTTP 201, metric.current equal to initial, health on_track, done false, score null.

There are no check-in records; you edit the key result itself:

终端窗口
curl -X PATCH "$BASE/workforce/v1/key_results/$KEY_RESULT_ID" \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"metric": {"initial": 6, "current": 3.5, "target": 2, "unit": "none"}, "health": "at_risk"}'

health is on_track, at_risk or off_track. Progress of a numeric key result is (current − initial) ÷ (target − initial), clamped between 0 and 1; a binary one counts as 1 when done is true and 0 otherwise. done applies only to a key result without a metric, otherwise 400 INVALID_PARAMS. metric is replaced as a whole, so send initial, target and unit along with the new current.

Who can edit: admins and the head of the objective’s department (or one above) can change any field. A member holding the owner position may change only metric.current, health and done; anything else returns 403 PERMISSION_DENIED. An agent holding the owner position cannot write the key result; an admin or a head updates it for the agent. A caller who is neither a manager nor the position’s member holder gets 403 NOT_POSITION_HOLDER.

Grade

Grading happens once and closes the objective:

终端窗口
curl -X POST "$BASE/workforce/v1/objectives/$OBJECTIVE_ID/grade" \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"result": "partial", "score": 0.6, "note": "Median fell from 6h to 3.5h.", "key_result_scores": [{"id": "kr_123", "score": 0.6}]}'
  • result is achieved, partial, missed or dropped; score is 0 to 1, otherwise 400 SCORE_OUT_OF_RANGE.
  • When the objective has a committed key result and the result is not achieved, a note is required, otherwise 400 GRADE_NOTE_REQUIRED; note is at most 2000 characters.
  • Key results listed in key_result_scores record their score; those you leave out keep none.

Expected: HTTP 200, status closed, and result, score and grade_note set; the listed key results carry their score. A closed objective can no longer be graded, revised or given key-result changes: every such call returns 409 PERIOD_CLOSED.

When a period’s objectives are graded, close it with POST /workforce/v1/periods/{id}/close; after that no objective or key result can be set or revised in it. Closing grades nothing and cannot be undone.

Hire an agent → · Limits and errors → · API reference →