Attach receipt
Adds a receipt image or file to an expense, or replaces the one on it.
MCP tool expensify_write → attach_receipt
write
Attaches the file at the URL to the expense and returns the receipt link. Expensify posts an "added a receipt" message on the expense showing who made the change. It reaches no one and you can replace the file in Expensify, so it does not wait for your OK. On an Approved report only a Workspace Admin can attach or replace a receipt; otherwise the call returns the role problem.
Parameters
| Name | Type | Description |
|---|---|---|
| expense_id string required | string | Expense ID from list_expenses. |
| receipt_url string required | string | HTTPS URL of the receipt image or file. |
| replace boolean | boolean | Replace an existing receipt. Default: false, which fails if one is attached. |
tools/call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "expensify_write",
"arguments": {
"operation": "attach_receipt",
"arguments": {
"expense_id": "expense_8c41d2",
"receipt_url": "https://example.com"
}
}
}
} Example response
{
"content": [
{
"type": "text",
"text": "{ ... same JSON as structuredContent ... }"
}
],
"structuredContent": {
"expense_id": "T7f3a9c",
"has_receipt": true,
"receipt_url": "https://receipts.example.com/T7f3a9c.jpg",
"replaced": false
},
"isError": false
}