expense-inbox
Stable. Describes behaviour that is built and covered by tests in this repository.
GET /v1/expense-inbox #
The tenant's invoice inbox address
Invoices received by mail are forwarded to invoices+<token>@<inbound domain>. The attachments wait as items to review; the console reads them in the browser. Made on first use. address is empty until the deployment has an inbound mail domain.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
app_id | query | string · uuid | The inbox of one app instead of the whole tenant |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | OK | ExpenseInbox |
400 | Error envelope | Error |
Example response
{
"token": "string",
"app_id": "string",
"address": "string"
}curl
curl -X GET https://YOUR-API-ADDRESS/v1/expense-inbox \
-H "Authorization: Bearer $PAYRUDDER_API_KEY"POST /v1/expense-inbox/rotate #
Give the invoice inbox a new address
Mail sent to the old address is dropped.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
app_id | query | string · uuid |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | OK | ExpenseInbox |
400 | Error envelope | Error |
Example response
{
"token": "string",
"app_id": "string",
"address": "string"
}curl
curl -X POST https://YOUR-API-ADDRESS/v1/expense-inbox/rotate \
-H "Authorization: Bearer $PAYRUDDER_API_KEY"GET /v1/expense-inbox/items #
The attachments received by mail, newest first
Not paged: the newest page_size items; there is no page_token, so older items come into view once the newer ones are resolved.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
status | query | to_review | accepted | dismissed | |
page_size | query | integer |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | OK | InboxItemPage |
400 | Error envelope | Error |
Example response
{
"items": [
{
"id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
"app_id": "string",
"from": "string",
"subject": "string",
"filename": "string",
"content_type": "string",
"size_bytes": "string",
"status": "to_review",
"expense_id": "string",
"receive_time": "2026-11-03T10:15:00Z"
}
]
}curl
curl -X GET https://YOUR-API-ADDRESS/v1/expense-inbox/items \
-H "Authorization: Bearer $PAYRUDDER_API_KEY"GET /v1/expense-inbox/items/{id}/file #
The bytes of a received attachment
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string · uuid |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | The file as it came (PDF, PNG or JPEG) | |
404 | Error envelope | Error |
curl
curl -X GET https://YOUR-API-ADDRESS/v1/expense-inbox/items/<id>/file \
-H "Authorization: Bearer $PAYRUDDER_API_KEY"POST /v1/expense-inbox/items/{id}/resolve #
Mark a received attachment accepted or dismissed
An item is resolved once. Accepting records the expense that was made from it.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string · uuid |
Request body
| Field | Type | Description |
|---|---|---|
status required | accepted | dismissed | |
expense_id | string · uuid |
Example
{
"status": "accepted"
}Responses
| Status | Meaning | Body |
|---|---|---|
200 | OK | InboxItem |
400 | Error envelope | Error |
404 | Error envelope | Error |
Example response
{
"id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
"app_id": "string",
"from": "string",
"subject": "string",
"filename": "string",
"content_type": "string",
"size_bytes": "string",
"status": "to_review",
"expense_id": "string",
"receive_time": "2026-11-03T10:15:00Z"
}curl
curl -X POST https://YOUR-API-ADDRESS/v1/expense-inbox/items/<id>/resolve \
-H "Authorization: Bearer $PAYRUDDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"status":"accepted"}'Models
Error
| Field | Type | Description |
|---|---|---|
error required | object |
ExpenseInbox
| Field | Type | Description |
|---|---|---|
token required | string | |
app_id required | string | |
address required | string | invoices+<token>@<inbound domain>; empty when no inbound domain is configured |
InboxItem
| Field | Type | Description |
|---|---|---|
id required | string · uuid | |
app_id required | string | |
from required | string | |
subject required | string | |
filename required | string | |
content_type required | string | |
size_bytes required | string · int64 | |
status required | to_review | accepted | dismissed | |
expense_id required | string | |
receive_time required | string · date-time |
InboxItemPage
| Field | Type | Description |
|---|---|---|
items required | array of InboxItem |
ResolveInboxItemRequest
| Field | Type | Description |
|---|---|---|
status required | accepted | dismissed | |
expense_id | string · uuid |