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), viewSessionTtlSeconds (60-86400), maxViews (0=unlimited)

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 settings. Business plan.

Response

{ "company_name": "Acme", "logo_url": "/uploads/logo.png", "primary_color": "#6366f1", "custom_domain": "share.acme.com" }
POST/api/branding

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

Request Body

company_name (string), primary_color (hex), custom_domain (string), logo (file)

Response

{ "company_name": "Acme", ... }

Blocked File Types

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