Duvet DOCS
GitHub

Embed Resource

An embed represents rich content extracted from URLs in messages, such as link previews, images, videos, and GIFs.

Embed Object

FieldTypeDescription
type ?stringEmbed type (e.g. "link", "image", "gifv", "video")
provider ?stringProvider name (e.g. "YouTube", "GitHub")
title ?stringEmbed title
description ?stringEmbed description
url ?stringSource URL
timestamp ?stringISO 8601 timestamp
color ?EmbedColorColor gradient for the embed accent
footer ?EmbedFooterFooter text and icon
image ?EmbedMediaImage content
thumbnail ?EmbedMediaThumbnail image
video ?EmbedMediaVideo content
author ?EmbedAuthorAuthor information
fields ?EmbedField[]Additional structured fields

EmbedMedia Object

FieldTypeDescription
url stringMedia URL
width ?integerMedia width in pixels
height ?integerMedia height in pixels

EmbedAuthor Object

FieldTypeDescription
name stringAuthor name
url ?stringAuthor URL
icon_url ?stringAuthor icon URL

EmbedFooter Object

FieldTypeDescription
text stringFooter text
icon_url ?stringFooter icon URL

EmbedField Object

FieldTypeDescription
name stringField name
value stringField value
inline booleanWhether the field should be displayed inline

EmbedColor Object

FieldTypeDescription
color_from ?integerStarting color value
color_via ?integerMiddle color value for gradient
color_to ?integerEnding color value for gradient

Example

{
  "type": "link",
  "provider": "YouTube",
  "title": "Never Gonna Give You Up",
  "description": "The official video for "Never Gonna Give You Up" by Rick Astley.",
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "timestamp": null,
  "color": {
    "color_from": 16711680,
    "color_via": null,
    "color_to": null
  },
  "footer": null,
  "image": null,
  "thumbnail": {
    "url": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
    "width": 1280,
    "height": 720
  },
  "video": {
    "url": "https://www.youtube.com/embed/dQw4w9WgXcQ",
    "width": 1280,
    "height": 720
  },
  "author": {
    "name": "Rick Astley",
    "url": "https://www.youtube.com/@RickAstleyYT",
    "icon_url": null
  },
  "fields": []
}