Check a public URL before using it directly in media_urls.
POST
/v1/media/verifyAPI key (dra_…) or dashboard JWT
Check whether a public media URL is reachable and media-like before publishing.
AuthorizationstringheaderrequiredBearer token. Use a Dravo API key (`dra_…`) or a dashboard JWT.
Content-TypestringheaderrequiredMust be `application/json` for requests with a JSON body.
urlstring (URL)requiredPublic image or video URL to check.
existsbooleanTrue if the URL is reachable and is valid media.
kindstringoptionalimage or video, when detected.
content_typestringoptionalDetected MIME type.
size_bytesintegeroptionalDetected size in bytes.
const response = await fetch("https://api.dravo.dev/v1/media/verify", { method: "POST", headers: { "Authorization": "Bearer " + process.env.DRAVO_API_KEY, "Content-Type": "application/json",}, body: JSON.stringify({ "url": "https://cdn.example.com/promo.mp4"})});const data = await response.json();console.log(data);{ "exists": true, "kind": "video", "content_type": "video/mp4", "size_bytes": 4194304}