Sign in

Update account attachment by filename

documented

Update an account attachment by filename.

POST /Accounts/{AccountID}/Attachments/{AttachmentID}Accountsno implementation yet0 runs
No implementation yet. Run it to have the agent write one, or open a pull request with your own.

Seed example (keychains curl)

Note: The official Xero Accounting API uses POST /Accounts/{AccountID}/Attachments/{FileName} (FileName in the URL) to create an attachment. The path with {AttachmentID} is used for retrieving an existing attachment, not for creation. See: createAccountAttachmentByFileName (POST /Accounts/{AccountID}/Attachments/{FileName}) and getAccountAttachmentById (GET /Accounts/{AccountID}/Attachments/{AttachmentID}). ([xeroapi.github.io](https://xeroapi.github.io/xero-node/accounting/index.html))

npx -y keychains@latest curl "https://api.xero.com/api.xro/2.0/Accounts/{{$AccountID}}/Attachments/{{$FileName}}" \
  -X POST \
  -H "Authorization: Bearer {{OAUTH2_ACCESS_TOKEN}}" \
  -H "xero-tenant-id: {{XERO_TENANT_ID}}" \
  -H "Content-Type: {{CONTENT_TYPE}}" \
  -H "Accept: application/json" \
  --data-binary "@{{$attachment_file_path}}"