Upload a file with a multipart/form-data request. Send the file itself plus a type describing what the file is for; the response returns the id of the stored file.
Files are attached to a record in one of two ways, depending on the type.
Attached on upload. Send linkedTo with the id of the record the file belongs to and the file is attached immediately, appearing in that record's files (see Search files).
person— a person's files. Requires Write Files.business— a business's files. Requires Limited Write Contributions or Full Write Accounting.sermon— a sermon's files. Requires Full Write Sermons.batch— a contribution batch's files. Requires Limited Write Contributions.bank_reconciliation— a bank reconciliation's files. Requires Full Write Accounting.
Attached by a later request. Omit linkedTo, then send the returned id in the files array of the record you save next. The file stays unattached until that request succeeds.
transaction_file— attach with Update contribution or Add transaction to batch. Requires Limited Write Contributions.journal_entry— attach with Create or Update journal entry, Adjust journal entry, or Create or Update bill. Requires Full Write Accounting.safeguard— attach with Add safeguard or Update safeguard. Requires Write Safeguards.
Uploads of person, business, transaction_file, journal_entry and safeguard files count against your account's storage capacity, and are rejected while the account is on a trial or once that capacity is exhausted.
Required permission: Write Files or Limited Write Contributions or Full Write Accounting or Full Write Sermons or Write Safeguards
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
401Authentication is required, or the Ocs-Api-Key header is missing or invalid.
