Get one project's cost and margin verdict
curl --request GET \ --url 'https://example.com/api/v1/reports/project-margin?projectId=example' \ --header 'Authorization: Bearer <token>'Returns the green/red/unbilled verdict for one project: invoiced vs. real cost, sold vs. used hours, the gifted-hours breakdown, and per-member cost with role labels. Defaults to the project’s whole lifetime; from/to narrow the window. Requires the reports.costs permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Window start (YYYY-MM-DD). Defaults to the project’s lifetime.
Window start (YYYY-MM-DD). Defaults to the project’s lifetime.
Window end (YYYY-MM-DD). Defaults to today.
Window end (YYYY-MM-DD). Defaults to today.
Responses
Section titled “Responses”The project’s margin verdict.
object
A project’s green/red/unbilled verdict: invoiced vs. real cost, hours, gifted, and per-member cost.
object
object
Hours given away for free, valued at real cost: non-billable, over-budget, and courtesy.
object
object
object
object
object
One member’s billable/non-billable minutes, cost, and share of a project’s total cost.
object
The date window, timezone, and data-completeness flags a margin verdict was measured against.
object
True when the entry fetch hit the 500,000-entry cap.
Minutes excluded from realCost because their member had no resolvable cost.
object
Flags for incomplete cost coverage and attribution approximations.
object
Example
{ "data": { "verdict": "green" }}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 reports.costs permission.
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" }}Project not found in this workspace.
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