Skip to main content
POST

Authentication

All requests to this endpoint must include a valid JWT in the Authorization header.

Path parameters

string
required
The invoice type. Must be rental for this endpoint.

What this endpoint does

This endpoint connects to the user’s Gmail account via the stored OAuth tokens, searches for rental invoice emails matching the configured sender and subject, and uploads any previously unseen invoice PDF attachments to S3. It skips invoices for months that have already been processed. The Gmail account must be connected before calling this endpoint. See Store Gmail tokens.

Response

string
A human-readable confirmation message. Example: "Rental invoices ingested successfully!" or "No rental invoices found for this user."
number
HTTP status code. 200 on success.
object | null
null when no new invoices were found. Otherwise contains the fields below.

Error responses

Error responses follow this structure: