Sample - Box Platform API
PUT/files/{file_id}/watermark

Apply a watermark to a file

Applies a watermark to a file or updates the watermark that already exists. Supply a watermark object with the supported imprint value to create or replace the file's watermark.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter · 1 body field
file_idstringrequired
The unique identifier of the file to apply or update a watermark on.

The watermark configuration to apply to the file.

watermarkobjectrequired
The watermark to imprint on the file.

3 status codes
200Returns the updated watermark when the file already has one.
watermarkobjectoptional
201Returns the newly created watermark when the file did not previously have one.
watermarkobjectoptional
defaultAn unexpected client error.
typestringoptional
The value will always be `error`.
Allowed:error
statusintegeroptional
The HTTP status of the response.
codestringoptional
A Box-specific error code.
Allowed:createdacceptedno_contentredirectnot_modifiedbad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictprecondition_failed
messagestringoptional
A short message describing the error.
context_infoobjectoptional
A free-form object that contains additional context about the error. The possible fields are defined on a per-endpoint basis. `message` is only one example.
help_urlstringoptional
A URL that links to more information about why this error occurred.
request_idstringoptional
A unique identifier for this response, which can be used when contacting Box support.

Error handling

watermark and its imprint field are required. imprint must be default, which is currently the only supported watermark type. file_id must identify the file to watermark.