Skip to main content

API call description

Call this API to upload a media file and obtain the media resource identifier media_id. About media_id:
  • Use multipart/form-data POST to upload the file. The file identifier name is media.
  • media_id is reusable. The same media_id can be used multiple times.
  • The resource file corresponding to a media_id can only be used within the DingTalk client.
  • Media files use a dedicated storage space that DingTalk provides to organizations. Files uploaded through this API do not consume the DingTalk Drive space of your organization.

Request

Query parameters

Request body

Request example

Java
Python
PHP
C#

Response

Response body

Response body example

Error codes

If an error occurs when calling this API, refer to the Global error codes document to find the solution.