# Create an invoice

> `POST` `/v1/invoices`

URL: https://www.agencytitan.com/docs/tag/invoices/POST/v1/invoices

Operation ID: `invoices_create`

Tag: [invoices](https://www.agencytitan.com/docs/tag/invoices.md)

## Description

Creates a draft invoice for a client from one or more line items. Amounts are integer cents; per-line tax is computed server-side from tax_rate. The invoice is created as a draft and is not sent to the client. Returns the full created invoice.

## Parameters

_None_

## Request body

- Required: yes
- Content-Type: `application/json`
  - Type: `object`
  - Properties:
    - `client_id` (`string`, required) — Client to bill (see List clients).
    - `discount_cents` (`integer`) — Discount to apply, in cents.
    - `due_date` (`string|null`) — Payment due date (ISO date). Defaults to the client/tenant net terms.
    - `line_items` (`array<object>`, required) — Invoice line items. Amounts and tax totals are computed server-side.
    - `memo` (`string|null`) — Internal memo (not shown to the client).
    - `notes_to_client` (`string|null`) — Notes shown to the client on the invoice.
    - `tax_cents` (`integer`) — Optional header-level tax override, in cents. Leave 0 to use computed per-line tax.
    - `terms` (`string|null`) — Payment terms text.

## Responses

- `200` (`application/json`): Successful response.
  - Type: `object`
  - Properties:
    - `data` (`object`, required)
- `400` (`application/json`): Request validation failed (unknown or out-of-range parameters/properties are rejected).
  - Type: `object`
  - Properties:
    - `error` (`object`, required)
- `401` (`application/json`): Missing, invalid, expired, or revoked bearer token.
  - Type: `object`
  - Properties:
    - `error` (`string`, required)
    - `error_description` (`string`, required)
- `403` (`application/json`): The authenticated user does not have permission for this operation.
  - Type: `object`
  - Properties:
    - `error` (`object`, required)
- `404` (`application/json`): The requested resource was not found.
  - Type: `object`
  - Properties:
    - `error` (`object`, required)
- `409` (`application/json`): The request conflicts with an existing record or partially applied.
  - Type: `object`
  - Properties:
    - `error` (`object`, required)
- `429` (`application/json`): Per-tenant rate limit exceeded (600 requests/minute across all /v1 REST endpoints). The Retry-After header indicates how many seconds to wait.
  - Type: `object`
  - Properties:
    - `error` (`object`, required)
- `500` (`application/json`): An unexpected internal error occurred.
  - Type: `object`
  - Properties:
    - `error` (`object`, required)

## Authentication

- `bearerAuth` — http (bearer) — All /v1 endpoints (except `/v1/openapi.json` and `/v1/llms.txt`) require a bearer token. Two equal first-class paths: (1) an OAuth 2.0 access token from the au…

## Useful links

- Interactive page: https://www.agencytitan.com/docs/tag/invoices/POST/v1/invoices
- API reference home: https://www.agencytitan.com/docs/
- Tag page: https://www.agencytitan.com/docs/tag/invoices.md
- This operation as Markdown: https://www.agencytitan.com/docs/tag/invoices/POST/v1/invoices.md
- OpenAPI JSON: https://www.agencytitan.com/docs/openapi.json
- Full API Markdown: https://api.agencytitan.com/v1/llms.txt
- API keys: https://app.agencytitan.com/settings/api-mcp
