Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Endpoints >
Today we have released files in Xero, an exciting new way to store documents and files with your financial data.

In the main application, Files can be associated with invoices, transactions, expense receipts, fixed assets, contacts, chart of accounts, bank accounts and even manual journals.

This morning's API release supports file attachments on expense receipts, and invoices.

Extended support
The release today also extends support of attachments to a much larger range of file types: bmp, csv, doc, docx, gif, jpeg, jpg, odf, pdf, png, ppt, pptx, rar, rtf, tif, tiff, txt, xls, xlsx, zip.

In addition, rather than attaching just one file, you can now attach up to 10 files per document.

Differences to the main application
There are some key differences to the implementation of files in the main application:
- The API supports the uploading of 10 files Vs the absence of a limit in the main application
- The main application supports a maximum file size of 25MB Vs API limit of 3MB
- Files can only be attached to DRAFT invoices and receipts right now via API

Coming up next
The API team will begin prioritising work to expose the files functionality on other endpoints based on demand. We have created feature requests for each, so you can tell us where to concentrate our efforts:
- Bank Transactions
- Contacts
- Credit Notes
- Chart of accounts
- Manual Journals

In addition, we will look to provide a Files API that will let you perform actions like querying the files inbox, create folders in the inbox, upload new files to the inbox, associate files in the inbox with documents (like invoices, SM, RM's etc). If this is of interest, please vote for this feature here.

Remember, by voting on any of the features above you are after, we can keep you up to date on progress and advise you when released.

Questions? Comments?

Ask below.
Thank you guys for adding attachments feature. It is very important for us. From what I can see one can add files using POST requests but not using "wrapper" API libraries like .Net one. Do you have a plan to extend wrapper libraries (.Net in particular) with that new functionality soon?

Greg Ryjikh  

Files extends the existing attachment function in the API which is included in the .NET wrapper library. I'm not fully familiar with the implementation but the model should help you along.

If you are still stuck, let us know.

Ronan Quirke (Community Manager)  

Hey Ronan,
Any chance of adding .msg & .eml files to that list?

Ruairi M  

@Ruairi - we can only support what the main application does, and the list comes from there.

Assuming there are no security reasons for excluding those types, throwing out a comment on our blog might be get it onto our development radar.

Ronan Quirke (Community Manager)  

One thing I'd like to be able to do is attach chase (dunning) letters to invoices to create a log of when and how often a customer had been chased for payment.

Is there any plan to lift the restriction on attaching files to draft documents only?

Darren Grayson  

@Darren yes indeed. Today's release was focused primarily on making sure the existing attachment function in the API still worked with the new files feature. We definitely want to support the ability to attach to documents at various statuses, but it will be a little while before we can get to it.

Ronan Quirke (Community Manager)  

Are there any plans to allow saving files via the API to the Inbox (and custom folders)? Or will the API only ever point to specific endpoints?

Also, the 3MB limit is a bit of a crippling, I might hold off on adding support for this as emails are often over this limit.

Ruairi M  

@Ruairi yes there are plans for a files endpoint.


Ronan Quirke (Community Manager)  

Hi Ronan,

How do we know how much data space we have used and left over if we are not using the files library to attach files to invoices etc.

Ashika Pal  

@Ashika - we haven't added that functionality into the main application yet. Reason being we wanted to release what we have quickly. Before anyone hits any space limits, we will start showing disk usage in the application and also via the files API endpoint.

Important to note that we have said this is a 'soft limit' - if you used up all your officially allocated space tomorrow, you could still keep going, but we might get in touch to chat through your requirements :)

Ronan Quirke (Community Manager)  

Hi Robin,

It's been fantastic having new features of files library to attach files to invoice. Apparently, I have been facing a problem to attach files either uploading to file library or direct to the transaction. Kindly, what could be the reason or rather solution? could it be that internet is slow?

Vincent Chilyobwe  

@Vincent: it could be internet speeds or a browser issue. If using an alternative browser does not help, please drop a line to support@xero.com and we can help trouble shoot!

Ronan Quirke (Community Manager)  

When can we expect the excellent Files feature to work with WorkflowMax?

I especially want this to apply to the custom Admin Job Templates in WFM. Most of the hundreds to thousands of jobs, which professional accountants (the largest group of WFM users) do in a year, involve a few custom WFM Admin Job Templates. I say custom templates because WFM still provides skeleton outlines of the types of templates that professional accountants would want to use. This makes each of us start over from Ground Zero.

WFM does not let us attach files, to these Admin Job Templates, when our professional organizations AND LEGAL REQUIREMENTS make us document responses to one to more than twenty pages of questions for each job. These questions always repeat for each type of job, so it is very wasteful to have to remember to repeatedly attach these files, after we use the Option to apply an Admin template to a new Job.

In writing this I saw we could do this immediately if the Option let us apply an existing actual job template to a second job, instead of only letting us choose from the Admin jobs. In fact, the Option - Copy effectively lets us do that. I will simply create a series of dummy jobs (under Jobs, not Admin) like "z Accounting - interim, z - Accounting -year end and z Income Tax" templates. I will then start all repetitive jobs (90%+) by copying and editing one of these jobs.

Unfortunately, this still leave me with a single pace to attach documents, in the order in which I attach them, not the rich file folder and attach anywhere possibilities of Files. It also leaves me to question whether Files should work with pointers, so it does not make actual copies each time we link the same document.

By the way, when will WFM get its own forums or space in the Xero forums? Cathy said we should send WFM suggestions to support@workflowmax.com. If that were a good idea for WFM, then it should be a good idea for Xero (NOT)!


@Mike I can't speak to WorkflowMax, just the Xero application so prefer to keep this thread clear of any off shoot discussions. Best to continue to email WorkflowMax as suggested for now.

Ronan Quirke (Community Manager)  

Thanks Ronan, but WFM said it is a dead end on files because of the pending U.S. Practice Manager. Xero announced the first release of that, but did not say if we must create new accounts, import WFM data or answer related questions. There also are no forums or Feature Requests for Practice Manager, much less a place for sharing files. SAD!


Since we use Xero to generate invoices for our customers - Can you make it so that the app automatically changes the date required for payment to the 20th of the following month? This would mean one less thing we need to worry about. Thank you.

Trevor Loomis  


Are you able to give an indication as to when the API endpoint for Files will be ready?


Richard Britten-Kelly  

@Richard no ETA at this time. We will update this request thread as we make progress: http://xero.uservoice.com/forums/5528-xero-api/suggestions/4724535-files-api-endpoint

Ronan Quirke (Community Manager)  

Hi folks

We have just launched the Files API today.


Ronan Quirke (Community Manager)  

hi. is it possible to update/rename folder details thru the api? i'm using c# to consume the xero api and it throws error whenever i'm trying to call the 'Update' method.

Louise Ann Apostol  

Can the API limit be raised - either at your end by a sysadmin or at my end by me? Just started using Expensify integrated with Xero, second report I sent was rejected as over 3Mb. These days and with images 3Mb is nothing! Really irritated that I now have to start finding a workaround, rather than these integrated apps empowering me...! Can you help?

BTW at first time of asking, Xero told me this was Expensify's problem (the 3Mb limit) and sent me back to Expensify.. two days later they provided proof this was a Xero limit and sent me back to you. Would be great if we could avoid going around the loop again!


Alastair MacLeod  

Are there any plans to increase the limit of 10 file attachments per document when importing sales and/or purchases invoices into Xero via the API?


Steve K