Attach a file on the client's behalf

The sales rep adding a document the client sent another way — by email, typically —

from the builder's Client answers tab. Same store, same encryption and same limits
as a client upload; only uploadedBy differs, recording the rep.

Do not set Content-Type by hand; the client must produce the multipart boundary.

Path Parameters

ParameterTypeRequiredDescription
idintegerYesQuotation id
blockIdstringYesBlock instance id; must be an html block

Body Fields

FieldTypeRequiredDescription
filebinaryYesThe document

Limits and accepted types are those of the public upload: 10 MB per file, 20 files per
block, 50 MB per quotation, allowlist without SVG or HTML.

Making the file visible to the client

Storing the file is not enough on its own: the micro-app decides where a document
appears, from the descriptor kept in its state. Add the returned descriptor to the
block's answers with Correct block answers under the key the block expects.

Response

  • 200 OK: the descriptor (id, name, size, mime, url, uploadedAt, uploadedBy)
  • 400 Bad Request: no file, or an empty one
  • 403 Forbidden: the quotation belongs to another company
  • 404 Not Found: unknown quotation, or a block that is not html
  • 413 / 415: over a limit, or a type outside the allowlist
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
string
required
Responses
201

Resource created

400

Bad request

401

Unauthorized

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here!