---
title: "Invoice project time"
method: POST
path: "/companies/{company}/projects/{project}/time-invoices"
tags: ["Projects"]
---

# Invoice project time

`POST /companies/{company}/projects/{project}/time-invoices`

## Request

- Base URL: `https://api.factuarea.com/v1`
- URL: `https://api.factuarea.com/v1/companies/{company}/projects/{project}/time-invoices`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Turn the selected billable time into a DRAFT invoice for the project billing contact and mark the entries as invoiced.
- Requires `invoices:write`; already invoiced entries return 422 `task_time_entry_invoiced`.
- Resending the same `batch_id` and request returns the same invoice; deleting the draft releases the entries.

## Path parameters

- `company` string, uuid, required
- `project` string, uuid, required

## Headers

- `Idempotency-Key` string
- `Factuarea-Version` string, date

## Request body

- InvoiceTaskTimeV1Request
  - `entry_ids` string[]
  - `period` object
    - `from` string, date
    - `to` string, date
  - `grouping` 'per_task' | 'per_entry' | 'single_line', required
  - `batch_id` string, uuid

## Response `201`

- object
  - `data` TaskTimeInvoice, required: Result of invoicing project time: the draft invoice created for the selected entries.
    - `id` string, uuid, required: UUID of the billing batch that groups the invoiced entries.
    - `object` 'task_time_invoice', required: Stripe-like discriminator. Always `task_time_invoice` for this resource.
    - `project_id` string, uuid, required: UUID of the project.
    - `invoice_id` string, uuid, required: UUID of the draft invoice. Manage it with the invoice API.
    - `grouping` 'per_task' | 'per_entry' | 'single_line', required: How the time becomes invoice lines: one per task, one per entry, or a single line.
    - `status` 'draft', required: Always `draft`: the invoice is numbered when issued.

## Other responses

- `400`: `parameter_unknown` with `subcode` `retired_active_profile_header`: the retired `X-Active-Profile` header was sent; the company goes in the path. `parameter_invalid_format` on `Factuarea-Version`: the header is not a `YYYY-MM-DD` date. `unsupported_api_version`: the `Factuarea-Version` date is not a supported version.
- `401`: Missing or invalid API key.
- `402`: The operation requires a payment that could not be completed: either no payment method is on file (`error.details.payment_setup_url` links to the Billing Portal where it can be set up), the immediate charge was declined by the payment provider, the account lacks the plan or add-on this operation bills against, the annual document limit is reached (`plan_limit_exceeded`, with `error.details.period_end` indicating the end of the period — wait until it has ended or upgrade the plan to continue now), or the account has reached its maximum usage (`storage_quota_exceeded`, raised by upload operations such as signing a delivery note or attaching a file to an expense — contact support before retrying). Nothing was created or modified — resolve the cause and retry the same request. Version note: `error.type` is `payment_required_error` from `Factuarea-Version: 2026-09-01` onwards; earlier versions receive `invalid_request_error` for the three codes that predate that cut (`payment_method_required`, `employee_seat_payment_method_required` and `employee_seat_charge_failed`; every other 402 code, such as `addon_required`, `plan_limit_exceeded` or the additional tax ID codes, is newer and always carries `payment_required_error`). `error.code` is stable across every version.
- `403`: The request is authenticated but not allowed: the API key lacks the required scope (`insufficient_scope`), the plan does not include the public API or this feature (`addon_not_active`, `feature_not_available_in_plan`), or the module is not available with a test key (`module_not_available_in_sandbox`).
- `404`: The requested resource does not exist or belongs to another company.
- `409`: The request conflicts with data that already exists or with a request running at the same time. `idempotency_key_in_use`: another request with the same `batch_id` is still running. Nothing was written by this one; retry after a few seconds with the same `batch_id`. `task_timer_already_running`: the person who owns the credential already has a running timer in this company. Stop it first. `resource_conflict`: another request was reserving identifiers for the same kind of record at that moment and this one could not complete its reservation. Nothing was written; send the request again after a few seconds.
- `422`: Validation failed. The `error.param` field identifies which input is invalid.
- `429`: Rate limit exceeded. Retry after the duration in `Retry-After`.
- `500`: Unexpected server error.

---

[API](https://skmtc.dev/factuarea/apis/factuarea-public-api.md) · [All operations](https://skmtc.dev/factuarea/apis/factuarea-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/factuarea/apis/factuarea-public-api/revisions/718e77934422?raw)
