Skip to Content

The WebhookDeliveryAttachment type of the TypeScript SDK, part of WebhookDeliveryMessage.

type WebhookDeliveryAttachment = {
  content: string | null
  contentId: string | null
  contentOmitted?: ('too_large' | 'budget_exhausted')
  contentType: string
  degraded?: true
  filename: string
  inline: boolean
  section: string
  size: number
  url?: string
}

Fields

FieldTypeDescription
contentstring | nullBase64 of the decoded bytes, or null (see contentOmitted)
contentIdstring | nullContent-ID for cid: references, or null
contentOmitted('too_large' | 'budget_exhausted')Optional. Why content is null: the part is over the per-attachment inline ceiling, or the batch's total inline budget was spent
contentTypestring
degradedtrueOptional. Synthetic child of a degraded multipart parse; bytes are a best effort
filenamestring
inlinebooleanTrue for a Content-Disposition: inline part
sectionstringIMAP section number. Fetchable as GET /messages/{id}/parts/{section} when the address also delivers to a mailbox (a webhook TAP); a destination-only webhook has no stored message, so there it is just an identifier
sizenumberEXACT decoded byte length, whether or not content was inlined
urlstringOptional. Signed capability URL for the decoded bytes (GET /deliveries/fetch/{token}), present only when content is null and the fetch feature is configured. Needs no credentials; expires

Used in

WebhookDeliveryMessage.

On this page