Fetch media from a URL
POST
/media/from-url
const url = 'https://api.dropslate.top/v1/media/from-url';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"url":"https://example.com/clip.mp4"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.dropslate.top/v1/media/from-url \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "url": "https://example.com/clip.mp4" }'Https only; private and link-local addresses are refused (10_SECURITY.md §8).
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
url
required
string
filename
string
folderId
string
Example
{ "url": "https://example.com/clip.mp4"}Responses
Section titled “ Responses ”Accepted; processing happens in the background.
Media typeapplication/json
object
id
string
kind
string
originalName
string
mime
string
size
integer
status
string
failReason
string
width
integer
height
integer
durationMs
integer
folderId
string
tags
Array<string>
pinned
A pinned file is never removed after publishing.
boolean
publishedAt
string format: date-time
purgedAt
When the bytes were removed, 72 hours after a post with the file went live (1.3.0). The row, name and metadata stay; a post naming it is refused with media_purged.
string format: date-time
thumbnailUrl
string
createdAt
string format: date-time
Example
{ "kind": "image", "status": "uploading"}The key is missing the “write” scope, or this route needs a signed-in session instead of a key.
Media typeapplication/json
object
code
required
string
message
required
string
hint
string
Example
{ "code": "not_found", "message": "The post does not exist.", "hint": "Check the id and try again."}More than 600 requests in ten minutes for this key, or the workspace hit 60 post requests in an hour.
Media typeapplication/json
object
code
required
string
message
required
string
hint
string
Example
{ "code": "not_found", "message": "The post does not exist.", "hint": "Check the id and try again."}Headers
Section titled “Headers”Retry-After
integer
Seconds to wait.