v2

latestSwagger 2.02026-08-04108164321.0 KB
FileAttachment

Uploads a single file via multipart/form-data. Send the file in a "file" form field. Optional query parameters linkToEntityType + linkToEntityId inline-link the upload to a Task, Expense, Estimate, or Invoice in the same call. When no link is supplied, the row is inserted as AttachmentType="Draft" and reaped by the cleanup job after 24 hours if never linked.

post/api/FileAttachment

Query parameters

linkToEntityTypestring

Optional. One of: "Task", "Expense", "Estimate", "Invoice". When supplied, linkToEntityId must also be supplied.

linkToEntityIdinteger

Optional. The target entity's primary key. Required when linkToEntityType is supplied.

Response

Returns the uploaded file attachment details.