---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/api/errors/63047#article
headline: "63047: Link to a sample media file returned an invalid Content-Type"
url: https://www.twilio.com/docs/api/errors/63047
inLanguage: en
dateModified: 2026-06-08T11:38:30.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# 63047: Link to a sample media file returned an invalid Content-Type

Log Type: APPLICATION

Log Level: ERROR

## Description

Twilio could not create the content template because the sample media URL did not return an accepted MIME type in the `Content-Type` header. For media templates, the sample URL must resolve to a publicly hosted file, and Twilio validates the media response before creating the template.

### Possible causes

* The server hosting the media file did not send a `Content-Type` header.
* The server returned a `Content-Type` header that is not accepted for the sample media file. For this error, accepted sample types are `image/jpeg`, `image/png`, `application/pdf`, or `video/mp4`.
* The sample URL did not resolve to a publicly hosted media file.
* The `Content-Type` header did not match the actual file type returned by the URL.

### Possible solutions

* Configure the host serving the sample file to return a valid `Content-Type` header for the file you provide.
* Use a sample media URL that resolves directly to a publicly hosted file.
* Replace the sample with a supported type for template creation: `image/jpeg`, `image/png`, `application/pdf`, or `video/mp4`.
* If the media URL includes variables, provide a sample path that includes a valid file type and resolves to a publicly hosted file.

#### Additional resources

* [twilio/media](/docs/content/twilio-media)
* [Accepted content types for media](/docs/messaging/guides/accepted-mime-types)
* [Create templates with the Content Template Builder in Console](/docs/content/create-templates-with-the-content-template-builder)
