Requests and validation¶
Typed create requests¶
Create operations use request classes that enforce limits before network transmission.
new CreateProjectRequest(name: 'Platform', key: 'PLAT');
new CreateBoardRequest(name: 'Security Review', wipLimit: 3);
new CreateTicketRequest(title: 'Rotate signing key', boardSlug: 'open');
new CreateDocumentRequest(title: 'Disaster recovery plan');
new SendNotificationRequest([$userId], 'Maintenance', 'Maintenance starts at 18:00.');
Local validation applies to string sizes, item counts, integer boundaries, enums, and the /app URL rule.
Server validation enforces relationship rules, WIP limits, organization boundaries, and authorization.
PATCH builders and explicit null¶
PATCH operations differentiate between omitted fields and explicit null values. PATCH objects use a fluent builder:
$request = UpdateProjectRequest::create()
->name('Platform Engineering')
->description(null)
->archived(false);
Only invoked methods populate the JSON object.
UpdateBoardRequest, UpdateTicketRequest, and UpdateDocumentRequest use this pattern.
Date/time values¶
Ticket due dates accept a DateTimeInterface or a formatted string:
new CreateTicketRequest(
title: 'Production readiness review',
dueAt: new DateTimeImmutable('2026-09-10T15:00:00+08:00'),
);
A DateTimeInterface is serialized with DATE_ATOM.
Arrays¶
Write methods accept an associative array to support newer server fields before an SDK update.
Use array parameters cautiously. Typed request objects offer strict local guarantees.