Browse developer docs

REST API

Available scopes: uploads:write, files:read, shares:write, and shares:read.

Create the narrowest key you need. Rotate by creating and deploying a replacement before revoking the old key. If paid access ends, keys stay saved but calls pause; renewing an eligible plan restores access.

Upload and share files

Authenticate every request with Authorization: Bearer <YOUR_API_KEY>. Create a scoped key in the developer dashboard and save it when shown. API access includes Pro, Business, and $399 Lifetime.

Upload flow

Create a presigned upload, transfer the raw file, complete it, then read its status.

  1. POST /api/v1/uploadsfilename, mimeType, sizeBytes
  2. PUTUpload the raw file to the presigned URL using the returned content type.content-type
  3. POST /api/v1/uploads/{uploadId}/complete.
  4. GET /api/v1/uploads/{uploadId}
curl
curl -X POST https://video2url.com/api/v1/uploads \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{"filename":"demo.mp4","mimeType":"video/mp4","sizeBytes":1048576}'
curl -X PUT "$UPLOAD_URL" -H "Content-Type: video/mp4" --data-binary @demo.mp4
curl -X POST https://video2url.com/api/v1/uploads/$UPLOAD_ID/complete -H "Authorization: Bearer <YOUR_API_KEY>"
curl -X POST https://video2url.com/api/v1/shares -H "Authorization: Bearer <YOUR_API_KEY>" -H "Content-Type: application/json" -d '{"fileId":"<FILE_ID>"}'
JavaScript
const response = await fetch('https://video2url.com/api/v1/uploads', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <YOUR_API_KEY>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ filename: 'demo.mp4', mimeType: 'video/mp4', sizeBytes: 1048576 }),
});
const created = await response.json();
await fetch(created.data.upload.url, { method: 'PUT', headers: created.data.upload.headers, body: file });
const completed = await fetch('https://video2url.com/api/v1/uploads/' + created.data.uploadId + '/complete', { method: 'POST', headers: { Authorization: 'Bearer <YOUR_API_KEY>' } }).then(r => r.json());
await fetch('https://video2url.com/api/v1/shares', { method: 'POST', headers: { Authorization: 'Bearer <YOUR_API_KEY>', 'Content-Type': 'application/json' }, body: JSON.stringify({ fileId: completed.data.file.fileId }) });
Python
import requests

created = requests.post(
    "https://video2url.com/api/v1/uploads",
    headers={"Authorization": "Bearer <YOUR_API_KEY>"},
    json={"filename": "demo.mp4", "mimeType": "video/mp4", "sizeBytes": 1048576},
).json()
with open("demo.mp4", "rb") as video:
    requests.put(created["data"]["upload"]["url"], headers=created["data"]["upload"]["headers"], data=video).raise_for_status()
completed = requests.post("https://video2url.com/api/v1/uploads/" + created["data"]["uploadId"] + "/complete", headers={"Authorization": "Bearer <YOUR_API_KEY>"}).json()
requests.post("https://video2url.com/api/v1/shares", headers={"Authorization": "Bearer <YOUR_API_KEY>"}, json={"fileId": completed["data"]["file"]["fileId"]}).raise_for_status()

Share links

Create, inspect, or revoke links owned by the authenticated user.

  • Title is optional.
  • Password is optional.
  • Visibility is optional.
  • Visibility defaults to unlisted.
  • POST /api/v1/sharesfileId, title, visibility, password
  • GET /api/v1/shares/{shareId}
  • DELETE /api/v1/shares/{shareId}

Password visibility requires 8–128 characters. Supported visibility values are public, unlisted, password.