v1

OpenAPI 3.1.02026-07-13632897.9 KB
Priority Guardian Priorities

Update Priority

Update a priority's editable fields.

Accepts partial updates - only fields present in body are updated. Type is immutable. calendar_keyword can be reassigned.

For deadline priorities: name, deadline, calendar_keyword For flexible priorities: name, weekly_hour_target, checkpoint_date, calendar_keyword

Keyword reassignment: If the requested keyword is held by another active priority, they automatically swap keywords using a 3-step atomic swap.

Args: priority_id: Priority ID (UUID string) request: Partial update fields user_id: User ID from validated JWT session: Database session

Returns: 200: Full priorities response (same shape as GET /priorities) 404: Priority not found or wrong user 409: Keyword conflict during reassignment 422: Validation error (cross-type field, etc.)

put/api/priority-guardian/priorities/{priority_id}

Path parameters

priority_idstring required

Headers

X-Internal-Secretstring nullable
X-User-IDstring nullable

Request body

namestring nullable

Priority name. Max 100 chars.

calendar_keyword'P1' | 'P2' | 'P3' nullable

Reassign keyword. If held by another active priority, they automatically swap.

deadlinestring date nullable

Hard end date. Only valid for deadline-type priorities.

checkpoint_datestring date nullable

Evaluation checkpoint. Only valid for flexible-type priorities.

Response

Successful Response

{"stackTrail":"paths:/api/priority-guardian/priorities/{priority_id}:put:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}