Skip to content

Data to embed the video in an email (editor `video` block)

GET
/v1/videos/{video}/embed
curl --request GET \
--url https://api.replifier.com/v1/videos/vid_01hx0000000000000000000000/embed \
--header 'Authorization: Bearer <token>'

Returns the thumbnail, the lightweight animated preview, the fallback MP4 and the generic player link. Only a ready video (409 video_invalid_state). A private video cannot be embedded (409 video_private_no_embed): its email URLs would work for anyone who receives a forward.

video
required
string
/^vid_[a-z0-9]{26}$/

Example

vid_01hx0000000000000000000000

Block data

Media typeapplication/json

What is needed to build an editor video block. The URLs are not recipient secrets, but they are not published either: whoever has them can see that preview.

object
videoId
required
string
thumbnailSrc
required

Still image (fallback and poster). Signed for its exact path, valid for ~13 months

string
nullable
previewSrc
required

Lightweight animated preview (GIF); null if the encoder did not generate it

string
nullable
mp4Src
required

Fallback MP4 for in-email playback (Apple Mail); null if it does not exist

string
nullable
url
required

Generic player link (does not identify the recipient). On send it is replaced by each recipient’s link

string
width
required
integer
nullable
height
required
integer
nullable
previewBytes
required
integer
nullable
expiresAt
required
string

Example generated

{
"videoId": "example",
"thumbnailSrc": "example",
"previewSrc": "example",
"mp4Src": "example",
"url": "example",
"width": 1,
"height": 1,
"previewBytes": 1,
"expiresAt": "example"
}

Invalid data

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

No session, expired session, or invalid, expired or revoked API key

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Not allowed, API key missing the scope, IP not allowed, or request rejected (csrf_rejected)

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Does not exist or is not visible to you

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Conflict

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Internal error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Service temporarily unavailable

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}