Send a client hours PDF on an order's chat
curl --request POST \ --url https://example.com/api/v1/reports/client-hours/send \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "balanceStyle": "simple", "clientId": "example", "endDate": "2026-04-15", "layout": "date", "message": "example", "orderId": "example", "projectId": "example", "scope": "full", "startDate": "2026-04-15" }'Builds the client hours PDF for one order and posts it on that order’s chat with message, as the caller and always visible to the client, whose people are notified as for any shared order message. Sending again posts again. Requires the orders.edit permission, the order within the caller’s reach, and export access to the client’s report: Requires staff access to a client within the actor’s scope (clients.view_all or an assignment). Viewing needs reports.view or reports.export; exporting needs reports.export — the client’s Manager may always view and export regardless of report permissions. layout, scope and balanceStyle shape the PDF as in the export. A missing startDate or endDate follows the selected orders’ default report range: one order opens on its order type’s report range (by default, Hour block, Sprint, Tokens and Time & Materials from the order start to today, or to its end date once passed, and Subscription and Non billable on the current period); several orders that all run from their start open from the earliest start; no order or mixed types open on the current month. A date sent always wins, and the response’s startDate and endDate are the days covered.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”object
Last day, YYYY-MM-DD in the workspace timezone.
The message posted with the PDF, visible to the client.
The order whose chat receives the report.
First day, YYYY-MM-DD in the workspace timezone.
Responses
Section titled “Responses”The posted message and the PDF’s file name.
object
object
Example generated
{ "data": { "fileName": "example", "messageId": "example", "orderId": "example" }}Validation error. Parse failures include field paths and expectations.
Validation error with safe field paths and expected values; submitted values are never returned.
object
object
Stable machine-readable error code.
object
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Unauthorized.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Missing the orders.edit permission, or export access to the client’s report.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Order not found, out of reach, or without an hours report in the period.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Invalid report scope, or the PDF could not be stored.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Rate limit exceeded. Wait for Retry-After before retrying.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Headers
Section titled “Headers”Maximum requests in the current quota window.
Quota policy in requests and window seconds, for example 60;w=60.
Requests left in this quota window (zero when blocked).
Seconds until the current quota window resets, when available from the rate-limit store.
Seconds until another request may be attempted.
Chelsea is operated by Arepa Labs LLC