Vault files
The vault file routes: register and read files, get a signed download link as JSON with file-url, and read file summaries.
The vault at /v3/compliance/vault-files holds every file that other compliance resources point at. This page lists the routes and fields, and explains the two download routes. For the three-step upload flow, attaching files, and sharing, see Files and documents.
Scopes: files.files:read and files.files:write.
Endpoints
| Method and path | What it does |
|---|---|
POST /v3/compliance/vault-files/uploads | Reserve a single-use signed upload URL. |
POST /v3/compliance/vault-files | Register a file. |
GET /v3/compliance/vault-files | List files. |
GET /v3/compliance/vault-files/{fileId} | Read a file record. |
PATCH /v3/compliance/vault-files/{fileId} | Change title, description, visibility, or metadata. |
DELETE /v3/compliance/vault-files/{fileId} | Soft-delete a file. |
GET /v3/compliance/vault-files/{fileId}/file | 302 to a signed download URL. |
GET /v3/compliance/vault-files/{fileId}/file-url | The same link as JSON. |
GET /v3/compliance/vault-files/{fileId}/summary | Extracted or computed summary. |
File fields
A VaultFile has id, title, description, filename, fileUrl, mimeType, fileSize, kind, status, visibility, document, payeeId, externalId, accountId, events, actors, and metadata.
| Field | Values |
|---|---|
kind | Generic or Document. Only Document files can be signature request targets. MIME type never sets it. |
status | Created, Uploaded, Deleted. |
visibility | Public or Private. |
fileUrl is a stored reference, never a signed link. For a Public file it is the permanent unsigned link. For any other file it is the absolute URL of the /file route, so opening it still needs your token. File contents, kind, and document lineage can't change after create.
List filters: payeeId, visibility, kind, externalId, each eq.
Download a file: /file and /file-url
/file and /file-urlBoth routes return the same signed link. They differ in how:
GET .../{fileId}/fileanswers302with the link inLocation. Use it from a server or a client that follows redirects.GET .../{fileId}/file-urlanswers200with JSON. Use it where a redirect can't be followed, such as a browser page that must navigate to the file instead of fetching it from script.
curl https://api.wingspan.app/v3/compliance/vault-files/FILE_ID/file-url \
-H "Authorization: Bearer $WINGSPAN_TOKEN"// 200 OK
{ "url": "https://files.example.com/signed-link", "expiresAt": "2026-11-02T17:35:00Z" }- Anyone holding
urlcan download the file untilexpiresAt. Don't store or log it. Call the route again for each download. expiresAtisnullwhen the link doesn't expire, as for aPublicfile.- Both routes send
Cache-Control: no-store. 404when the file doesn't exist for you.503when no link could be issued.
The same pair exists for insurance certificates (see Insurance coverage) and tax form PDFs.
Summary
GET .../{fileId}/summary returns fileId, title, extractedFields, and pageCount.
Delete a file
DELETE soft-deletes the file and returns 204. It returns 409 when the file is referenced by an active attachment, template, signature request, tax form, or identity record.
Errors
| Status | When |
|---|---|
400, 422 | Invalid upload reservation or file fields. |
404 | The file doesn't exist for the caller. |
409 | Duplicate externalId on create. DELETE on a referenced file. |
503 | A download route couldn't issue a link. |
Events
VaultFile.Created and VaultFile.Updated.
Updated about 1 hour ago