Upload from a link
Needs a key withuploads:write
Copies an image, video or audio file from a public link into the workspace's storage (up to 200 MB) and returns its key, as an upload would. Links to private addresses are refused.
Requires scope uploads:write.
apiKeyx-api-key<token>An API key of your workspace (rmg_…), created in the web app. It acts for that workspace, not for a person, and keeps working when its creator leaves.
Idempotency-Key?stringMakes the request safe to retry: send a unique value (a UUID, say). The same request sent again with the same key within 24 hours gets the first one's response back, and nothing runs or is charged twice. Reusing a key for a different request, or while the first is still running, is 409 CONFLICT. A request that fails frees its key.
1 <= length <= 255application/json- body
url*stringPublic link to an image, video or audio file (a web image someone copied, for example).
urilength <= 2048The copied file.
application/json- response
The file, copied into the workspace's storage.
contentType*stringkey*stringStorage key of the copy: uploads/<organizationId>/<uuid>/<filename>.
kind*string"image""video""audio"name*stringA file name from the link.
curl -X POST 'https://api.remagica.com/api/v1/uploads/from-url' \ -H 'Content-Type: application/json' \ -d '{ "url": "https://example.com/owl.png"}'{ "contentType": "image/png", "key": "uploads/Uq4pY2m0JmHnL1mR/0b6f3c8e-6f1a-4c52-9d61-6c1f2d9f6a10/keynote.mp4", "kind": "image", "name": "owl.png"}