Fxiaoke Developer Manual Fxiaoke Developer Manual
  • APL Development Manual
  • PWC Development Manual
  • OpenAPI Documentation
  • Quick Start
  • API Authorization
  • API Basics
  • OpenAPI
  • SSO Integration
  • Client Development
  • FAQ
  • OpenApi Version V1 (opens new window)
  • 简体中文
  • English
  • Quick Start
  • API Authorization
  • API Basics
  • OpenAPI
  • SSO Integration
  • Client Development
  • FAQ
  • OpenApi Version V1 (opens new window)
  • 简体中文
  • English
  • Quick Start

  • API Authorization

  • API Basics

  • OpenAPI

    • CRM Object API

    • CRM Common API

    • Address Book API

    • Other API

      • Task Todo API

      • Attendance Field Work API

      • Collaborative Approval API

      • Enterprise Connect API

      • Message API

      • Material Management API

        • Upload Message Material File
          • Download Material File
          • Upload CRM Material File
          • Delete Material File
        • Network Disk API

        • Marketing API

        • File Service

        • ERP API

        • BI API

        • Offline API

    • SSO Integration

    • Client Development

    • FAQ

    Table of Contents

    Upload Message Material Files

    # Description

    Upload message material files.

    # Request Specification

    HTTP Method: POST + application/json

    Request Path: https://${cloud domain}/media/upload/message?thirdTraceId=${Random String}

    Request Headers: Refer to Common Parameters

    Example (using curl command to upload a media file via FORM):

    curl -F "media=@test.jpg" http://open.fxiaoke.com/media/upload/message?corpAccessToken=xxx&corpId=xxx
    

    File restrictions:

    • Image files: Max 5MB, supports JPG, PNG, GIF, BMP, JPEG formats (for message sending APIs)

    Note: mediaId is reusable. The same mediaId can be used for multiple message sends.

    # Request Parameters

    Parameter Type Required Description
    media Binary Yes Binary stream (form-data media file with filename, filelength, content-type, etc.)

    # Request Example

    {
      "media": "hello"
    }
    

    # Response Parameters

    Parameter Type Description
    traceId string Unique request ID
    errorDescription string Error description
    errorMessage string Error message
    errorCode Int Error codes

    # Response Example

    {
      "traceId": "E-O.827xxxxxx",
      "errorDescription": "success",
      "errorMessage": "OK",
      "errorCode": 0
    }
    

    # Notes

    • Do not use the message field in the response for logical judgments, as errorMessage may change.
    Send Image Message
    Download Material File

    ← Send Image Message Download Material File →

    • 跟随系统
    • 浅色模式
    • 深色模式
    • 阅读模式