POST
/
media
/
import
curl --request POST \
  --url https://api.video.dev/v1/media/import \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "source_media_url": "https://external.media/media.mp4",
  "type": "video",
  "webhook": {
    "url": "https://system.new/webhook/v1",
    "events": [
      "complete"
    ]
  }
}'
{
  "status": "processing",
  "media_id": "<string>",
  "source_media_url": "https://external.media/media.mp4",
  "type": "video",
  "webhook": {
    "url": "https://system.new/webhook/v1",
    "events": [
      "complete"
    ]
  }
}

Webhooks

Webhooks allow video.dev to notify your API when results are ready. This eliminates unnecessary requests made by polling, and can get results back faster.

Webhooks can be registered as part of the request and various events can be subscribed to get status of .

The following is a full list of all webhook events which can be subscribed.

EventDescription
completeOccurs when a media import completes
errorOccurs when a media import has encountered errors

The webhook will be POST to the URL you provided with a JSON payload. The payload will contain the event type and the details associated with the event.

Authorizations

X-API-Key
string
header
required

Body

application/json

Response

200
application/json

Media import initiated successfully

The response is of type object.