{"openapi":"3.0.3","info":{"title":"vltcdn.xyz API","version":"1.0.0","description":"Upload files, manage them, and create short links. Authenticate with an API key from the developer page."},"servers":[{"url":"https://vltcdn.xyz/api/v1"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key (vlt_...). X-API-Key header is also accepted."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"File":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"mime":{"type":"string"},"size":{"type":"integer"},"width":{"type":"integer","nullable":true},"height":{"type":"integer","nullable":true},"pageUrl":{"type":"string"},"rawUrl":{"type":"string"},"url":{"type":"string","description":"The link to share: pageUrl (rich embed) or rawUrl, depending on the account's Discord embeds setting."},"thumbUrl":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}}},"Link":{"type":"object","properties":{"slug":{"type":"string"},"url":{"type":"string"},"shortUrl":{"type":"string"},"clicks":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}}}}},"paths":{"/files":{"post":{"summary":"Upload a file (scope: upload)","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"},"expires_in":{"type":"integer","description":"seconds from now"},"password":{"type":"string"},"max_views":{"type":"integer","description":"1 = one-time link"}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"file":{"$ref":"#/components/schemas/File"}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List your files (scope: full)","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/files/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get file metadata (scope: full)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Change link options (scope: full). Any option makes the file private.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expiresAt":{"type":"string","format":"date-time","nullable":true},"password":{"type":"string","nullable":true},"maxViews":{"type":"integer","nullable":true,"description":"1 = one-time link"}}}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Move to the 7-day trash, or delete for good with ?permanent=true (scope: full)","security":[{"bearerAuth":[]}],"parameters":[{"name":"permanent","in":"query","schema":{"type":"boolean"}}],"responses":{"204":{"description":"Deleted"},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/files/{id}/restore":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Restore a file from the trash (scope: full)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/uploads":{"post":{"summary":"Start a direct upload for a large non-image file (scope: upload). PUT the bytes to the returned url, then call complete.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","size"],"properties":{"name":{"type":"string"},"size":{"type":"integer"},"expiresAt":{"type":"string","nullable":true},"password":{"type":"string","nullable":true},"maxViews":{"type":"integer","nullable":true}}}}}},"responses":{"201":{"description":"Created"},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/uploads/{id}/complete":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Finish a direct upload (scope: upload)","security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Created"},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/links":{"post":{"summary":"Create a short link (scope: upload)","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string"},"slug":{"type":"string","description":"Custom slug, paid plans only"}}}}}},"responses":{"201":{"description":"Created"},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List your short links (scope: full)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"}}}},"/links/{slug}":{"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"summary":"Delete a short link (scope: full)","security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Deleted"},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me":{"get":{"summary":"Account, plan and quota info (scope: full)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"}}}}}}