Skip to content

Models and request DTOs

The SDK uses separate types for responses and writes. Response models represent server state; request DTOs represent only fields accepted by an operation.

Response models

Core OpenAPI models are strongly typed:

Project project = await client.Projects.GetAsync(projectId);
Ticket ticket = await client.Tickets.GetAsync(ticketId);
Document document = await client.Documents.GetAsync(documentId);

Known date-time properties use DateTimeOffset/DateTimeOffset?. Ticket priority and document status use enums. Flexible response types such as organization/member/analytics/comment results expose documented or commonly returned fields and retain unrecognized fields in Extra.

if (organization.Extra.TryGetValue("custom_field", out var custom))
    Console.WriteLine(custom);

Request DTOs

Create requests mark OpenAPI-required properties with C# required. Optional values are omitted unless supplied. Local validation enforces formal limits such as maximum title length, per_page 1–200, document tag limits, and notification recipient limits.

The client does not try to duplicate every business rule. Relationship membership, WIP limits, cross-project constraints, and lifecycle rules remain authoritative on the server and normally surface as 422 or 404.