---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/api/errors/61311#article
headline: "61311: Content type doesn't match the declared file"
url: https://www.twilio.com/docs/api/errors/61311
inLanguage: en
dateModified: 2026-11-18T23:54:25.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# 61311: Content type doesn't match the declared file

Log Type: APPLICATION

Log Level: ERROR

## Description

Twilio rejected your document upload because the file's actual content type doesn't match the type declared by its filename or extension. For example, you might upload a PNG image but give it a `.pdf` extension.

### Possible causes

* The file was renamed to an extension for a different format without converting it. For example, renaming `scan.png` to `scan.pdf`.
* The `Content-Type` header sent with the upload doesn't match the file's actual format.
* The file was saved or exported incorrectly, so its content doesn't match the extension.

### Possible solutions

* Convert the file to the format indicated by its extension, or rename it so the extension matches the actual format.
* Make sure the `Content-Type` header in the upload request matches the file's actual format.
* Re-export the document from its source application, then upload it again.
