v1.0Stable

API Documentation

Manage your links, uploads, integrations and branding programmatically with the LinkVault REST API.

Overview

The LinkVault API is a RESTful JSON API. All endpoints accept and return application/json unless otherwise noted (file uploads use multipart/form-data).

Base URL

https://linkvault.biz/api

Plan requirements: API access requires a Professional plan or above. Integrations and Branding endpoints require a Business plan.

Authentication

Include your API key in the Authorization header of every request:

Authorization: Bearer lv_your_api_key_here

Quick Start Example

curl -H 'Authorization: Bearer lv_your_key' \
     https://linkvault.biz/api/links

Generate API keys from Settings → API Keys. Max 5 keys per account.

Errors

All errors return a JSON object with an error field:

{ "error": "Description of the error" }
StatusMeaning
400Bad Request — invalid parameters
401Unauthorized — missing or invalid API key
403Forbidden — insufficient plan or permissions
404Not Found — resource does not exist
410Gone — link has expired
422Unprocessable Entity — validation failed

Upload

POST/api/upload

Upload a file and create a viewer link. Max 100 MB. Use multipart/form-data.

Form Fields

file (binary), expiration (1h|24h|7d), addPassword (0|1), password (string), hasWatermark (0|1), requiresApproval (0|1), requiresOtp (0|1), allowedEmails (string, comma-separated), allowedDomains (string, comma-separated), bookingUrl (string), previewPages (int), viewSessionTtlSeconds (60-86400), maxViews (0=unlimited), requirePaymentToDownload (0|1), downloadPrice (int, cents, min 50), downloadCurrency (string, e.g. eur)

Response

{ "id": "abc123def456", "viewer_url": "https://linkvault.biz/viewer/abc123def456" }

API Keys

GET/api/api-keys

List all your API keys (masked).

Response

{ "api_keys": [{ "id": 1, "name": "Production", "key_prefix": "lv_a3f1••••", "active": true, "total_requests": 142 }] }
POST/api/api-keys

Generate a new key. The plain key is shown ONLY in this response.

Request Body

{ "name": "My Key" }

Response

{ "api_key": { "id": 1, "name": "My Key", "key": "lv_a3f1b2c4d5e6f789..." }, "message": "Copy it now — it won't be shown again." }
PUT/api/api-keys/{id}/toggle

Activate or deactivate a key.

Response

{ "active": false, "message": "API key deactivated" }
DELETE/api/api-keys/{id}

Permanently deactivate a key.

Response

{ "message": "API key revoked" }

Integrations

GET/api/integrations

List configured Slack/Discord integrations. Business plan.

Response

{ "integrations": [{ "id": 1, "type": "slack", "enabled": true }] }
POST/api/integrations

Create a Slack or Discord webhook integration.

Request Body

{ "type": "slack", "config": { "webhook_url": "https://hooks.slack.com/...", "channel": "#general" } }

Response

{ "ok": true }
DELETE/api/integrations/{id}

Remove an integration.

Response

{ "ok": true }

Branding

GET/api/branding

Get current branding and SMTP settings. Business plan.

Response

{ "company_name": "Acme", "logo_url": "/uploads/logo.png", "primary_color": "#6366f1", "custom_domain": "share.acme.com", "bg_color": "#111827", "btn_radius": "8px", "smtp_host": "smtp.acme.com", "email_locale": "en" }
POST/api/branding

Update branding and custom SMTP. Use multipart/form-data for logo upload.

Request Body

company_name (string), primary_color (hex), bg_color (hex), btn_text_color (hex), btn_radius (string), card_bg_color (hex), card_border_color (hex), text_color (hex), logo_size (int), custom_domain (string), logo (file), smtp_host, smtp_port, smtp_encryption, smtp_username, smtp_password, from_email, from_name, email_locale (string: en,es,fr,pt,it)

Response

{ "ok": true, "company_name": "Acme", ... }
DELETE/api/branding/logo

Remove the custom company logo.

Response

{ "ok": true }

Client Portals

GET/api/client-portals

Returns a list of your client portals.

Response

{ "portals": [{ "id": "uuid", "name": "Acme", "slug": "acme" }] }
POST/api/client-portals

Create a new portal.

Request Body

{ "name": "Acme", "slug": "acme", "allowedEmails": ["user@acme.com"] }

Response

{ "ok": true, "id": "uuid" }
GET/api/client-portals/{id}

Returns details of a specific portal.

Response

{ "portal": { "name": "Acme", "links": [] } }
PUT/api/client-portals/{id}

Update portal details.

Request Body

{ "name": "Acme v2" }

Response

{ "ok": true }
DELETE/api/client-portals/{id}

Delete a client portal.

Response

{ "ok": true }
POST/api/client-portals/{id}/links

Assign existing files to this client portal.

Request Body

{ "linkIds": ["uuid1", "uuid2"] }

Response

{ "ok": true }
DELETE/api/client-portals/{id}/links/{linkId}

Unassign a file from this portal.

Response

{ "ok": true }

Templates

GET/api/templates

Returns a list of your link templates.

Response

{ "templates": [{ "id": 1, "name": "Standard" }] }
POST/api/templates

Create a new template.

Request Body

{ "name": "Standard", "hasWatermark": true }

Response

{ "ok": true, "id": 1 }
PUT/api/templates/{id}

Update template details.

Request Body

{ "name": "Premium" }

Response

{ "ok": true }
DELETE/api/templates/{id}

Delete a link template.

Response

{ "ok": true }

Analytics

GET/api/analytics/global

Returns global metrics and charts for all your links.

Response

{ "metrics": { "totalViews": 150 }, "topLinks": [], "recentActivity": [], "charts": {} }

Monetization

GET/api/stripe/connect-status

Check whether the authenticated user has connected their Stripe Express account and whether charges are enabled.

Response

{ "connected": true, "charges_enabled": true, "account_id": "acct_xxx" }
POST/api/stripe/connect

Creates a Stripe Express account (if needed) and returns an onboarding link. Redirect the user to this URL to complete their Stripe setup.

Response

{ "url": "https://connect.stripe.com/setup/..." }
POST/api/stripe/checkout-download/{linkId}

Initiates a Stripe Checkout session for a paid download. The visitor is redirected to Stripe to complete payment. On success they return with a session_id to retrieve the file.

Request Body

{ "email": "buyer@example.com" }

Response

{ "url": "https://checkout.stripe.com/..." }
GET/api/links/{id}/download-original

Serves the original, un-watermarked file after a successful purchase. Requires a valid download token or Stripe session_id. Files are decrypted at rest and served as attachment.

Query Parameters

token (string) OR session_id (string)

Response

Binary file download (Content-Disposition: attachment)

Blocked File Types

The following extensions are rejected on upload: exe, dll, bat, cmd, msi, bin, iso, img, zip, rar, tar, gz