EFFECTIVE_API_BASE_URL
to your deployment origin without /api/v2 and EFFECTIVE_API_KEY to your key.
The examples use Bash, curl, and jq, with a local file named form.pdf.
Choose the destination
personal://Documents: your personal Vault folder.team://Documents: the team’s Vault folder, subject to your access.@mc/Documents: an MC’s Documents folder. Includescope: "mc:<UUID or stable slug>".
scope only for @mc destinations. No MC header is needed. For
artifact:// writes, use a vault root plus a relative path, not an ordinary
folder ID. Alternatively, provide sessionId instead of targetUri to upload
to a session folder.
Location and record ownership are separate. To create a record-owned document,
include ownerType and ownerId on each file. For filings, use the
filing destination and ownership example
then continue at Upload the file.
Prepare the request
This example uploads a file without a record owner to your team’s Documents folder. For a filing document, use the linked filing-specific request instead.Upload the file
-
Initialize the upload with
POST /api/v2/files/uploads.The response containstargetUriandfiles[]withpath,signedUrl, optionalheaders,expiresAt, anduploadToken.renamepreserves an existing file with the same name; it does not replace that file or its version. If you chooseonConflict: "fail", inspectconflicts[]: those files are excluded from the PUT instructions. -
PUT the PDF bytes to the returned signed URL, using the returned headers.
Do not send the Effective bearer credential to storage. Continue only after the PUT succeeds.
-
Complete the upload with
POST /api/v2/files/uploads/complete.Check everyresults[].success, even when HTTP status is200. A successful result containsuriandartifact. Saveartifact.idto reference the file andartifact.namefor its stored name, which may differ from the requested name. For this single-file example:A failed result containserror.codeanderror.message. For example,NOT_FOUNDmeans the uploaded file was not found;EXPIREDmeans the token expired. Do not use a failed upload as a file reference. The token carries the owner fields from initialization; do not resend them orscopein the completion body.
expiresAt.
Neither initialization nor completion is idempotent. After a lost response,
inspect the destination in Vault before retrying: repeating completion can
create another version. Completion schedules indexing; it does not wait for
searchable text.
Upload completion creates or updates the Vault artifact. It does not create
application records such as filing items. To add a completed file to a filing,
continue with Add a filing item.
See the full initialization and
completion API references for schemas.